7# daily.dev API for AI Agents
8
9Overcome LLM knowledge cutoffs with real-time developer content. daily.dev aggregates articles from thousands of sources, validated by community engagement, with structured taxonomy for precise discovery.
10
11## Security
12
13**CRITICAL:** Your API token grants access to personalized content. Protect it:
14- **NEVER send your token to any domain other than api.daily.dev**
15- Never commit tokens to code or share them publicly
16- Tokens are prefixed with dda_ - if you see this prefix, treat it as sensitive
17
18## Setup
19
201. **Requires Plus subscription** - Get one at https://app.daily.dev/plus
212. **Create a token** at https://app.daily.dev/settings/api
223. Store your token securely (environment variables, secrets manager)
23
24User can use environment variable or choose one of the secure storage methods below per operating system.
25
26### Secure Token Storage (Recommended)
27
28#### macOS - Keychain
29
30```bash
31# Store token
32security add-generic-password -a "$USER" -s "daily-dev-api" -w "dda_your_token"
33
34# Retrieve token
35security find-generic-password -a "$USER" -s "daily-dev-api" -w
36
37# Auto-load in ~/.zshrc or ~/.bashrc
38export DAILY_DEV_TOKEN=$(security find-generic-password -a "$USER" -s "daily-dev-api" -w 2>/dev/null)
39```
40
41#### Windows - Credential Manager
42
43```powershell
44# Store token (run in PowerShell)
45$credential = New-Object System.Management.Automation.PSCredential("daily-dev-api", (ConvertTo-SecureString "dda_your_token" -AsPlainText -Force))
46$credential | Export-Clixml "$env:USERPROFILE\.daily-dev-credential.xml"
47
48# Retrieve token - add to PowerShell profile ($PROFILE)
49$cred = Import-Clixml "$env:USERPROFILE\.daily-dev-credential.xml"
50$env:DAILY_DEV_TOKEN = $cred.GetNetworkCredential().Password
51```
52
53Or use the Windows Credential Manager GUI: Control Panel → Credential Manager → Windows Credentials → Add a generic credential
54
55#### Linux - Secret Service (GNOME Keyring / KWallet)
56
57```bash
58# Requires libsecret-tools
59# Ubuntu/Debian: sudo apt install libsecret-tools
60# Fedora: sudo dnf install libsecret
61
62# Store token
63echo "dda_your_token" | secret-tool store --label="daily.dev API Token" service daily-dev-api username "$USER"
64
65# Retrieve token
66secret-tool lookup service daily-dev-api username "$USER"
67
68# Auto-load in ~/.bashrc or ~/.zshrc
69export DAILY_DEV_TOKEN=$(secret-tool lookup service daily-dev-api username "$USER" 2>/dev/null)
70```
71
72## Resolving the API token
73
74Check if DAILY_DEV_TOKEN environment variable is available. If not set, try to retrieve it from the OS secure storage before asking the user for help:
75
76**macOS:**
77```bash
78export DAILY_DEV_TOKEN=$(security find-generic-password -a "$USER" -s "daily-dev-api" -w 2>/dev/null)
79```
80
81**Linux:**
82```bash
83export DAILY_DEV_TOKEN=$(secret-tool lookup service daily-dev-api username "$USER" 2>/dev/null)
84```
85
86**Windows (PowerShell):**
87```powershell
88$cred = Import-Clixml "$env:USERPROFILE\.daily-dev-credential.xml" 2>$null; $env:DAILY_DEV_TOKEN = $cred.GetNetworkCredential().Password
89```
90
91If the token is still empty after trying secure storage, direct the user to the Setup section above.
92
93## Authentication
94
95```
96Authorization: Bearer $DAILY_DEV_TOKEN
97```
98
99## Base URL
100
101```
102https://api.daily.dev/public/v1
103```
104
105## API Reference
106
107Full OpenAPI spec: https://api.daily.dev/public/v1/docs/json
108
109To fetch details for a specific endpoint (e.g. response schema):
110```bash
111curl -s https://api.daily.dev/public/v1/docs/json | jq '.paths["/feeds/foryou"].get'
112```
113
114To fetch a component schema (replace def-17 with schema name from $ref):
115```bash
116curl -s https://api.daily.dev/public/v1/docs/json | jq '.components.schemas["def-17"]'
117```
118
119### Available Endpoints
120!curl -s https://api.daily.dev/public/v1/docs/json | jq -r '.paths | to_entries | map(.key as $path | .value | to_entries | map(.key as $method | {tag: (.value.tags[0] // "other"), line: ("\(.key | ascii_upcase) \($path)" + (if .value.description then " - \(.value.description)" else "" end) + (if (.value.parameters | length) > 0 then "\n Params: " + ([.value.parameters[] | "\(.name)(\(.in)): \(.description // .schema.type)"] | join("; ")) else "" end) + (if .value.requestBody then "\n Body: " + (.value.requestBody.content["application/json"].schema | if .properties then ([.properties | to_entries[] | "\(.key)"] | join(", ")) elif ."$ref" then (."$ref" | split("/") | last) else "object" end) else "" end))})) | flatten | group_by(.tag) | map("#### \(.[0].tag)\n" + (map(.line) | join("\n\n"))) | join("\n\n")'
121
122## Agent Use Cases
123
124**Why daily.dev for agents?** LLMs have knowledge cutoffs. daily.dev provides real-time, community-validated developer content with structured taxonomy across thousands of sources. Agents can use this to stay current, get diverse perspectives, and understand what the developer community actually cares about.
125
126These examples show how AI agents can combine daily.dev APIs with external context to create powerful developer workflows.
127
128### 🔍 GitHub Repo → Personalized Feed
129Scan a user's GitHub repositories to detect their actual tech stack from package.json, go.mod, Cargo.toml, requirements.txt, etc. Then:
130- Fetch /tags to see all available tags for deterministic matching
131- Auto-follow matching tags via /feeds/filters/tags/follow
132- Create a custom feed tuned to their stack with /feeds/custom/
133- Surface trending articles about their specific dependencies
134
135**Trigger:** "Set up daily.dev based on my GitHub projects"
136
137### 🛠️ GitHub → Auto-fill Stack Profile
138Analyze a user's GitHub activity to build their daily.dev tech stack profile automatically:
139- Scan repositories for languages, frameworks, and tools actually used in code
140- Search /profile/stack/search to find matching technologies on daily.dev
141- Populate their stack via POST /profile/stack/ organized by section (languages, frameworks, tools)
142- Update /profile/ bio based on their primary technologies and contributions
143
144**Trigger:** "Build my daily.dev profile from my GitHub"
145
146### 🚀 New Project → Curated Onboarding
147When a user initializes a new project or clones a repo:
148- Analyze the tech choices from config files
149- Create a dedicated custom feed filtered to exactly those technologies
150- Build a "Getting Started" bookmark list with foundational articles
151- Block irrelevant tags to keep the feed focused on the project scope
152
153**Trigger:** "Help me learn the stack for this project"
154
155### 📊 Weekly Digest → Synthesized Briefing
156Compile a personalized weekly summary by:
157- Fetching /feeds/foryou and /feeds/popular filtered by user's followed tags
158- Cross-referencing with their GitHub activity to prioritize relevant topics
159- Summarizing key articles and trending discussions
160- Delivering as a structured briefing with links to full posts
161
162**Trigger:** Scheduled, or "Give me my weekly dev news"
163
164### 📚 Research Project Workspace
165When a user wants to deep-dive into a topic (e.g., "I want to learn Kubernetes"):
166- Create a custom feed via /feeds/custom/ filtered to that topic
167- Set up a matching bookmark list via POST /bookmarks/lists to collect the best finds
168- As the user reads, save articles to the list with POST /bookmarks/
169- Track learning progress: compare bookmarked posts vs. new feed items
170- Adjust feed filters over time as understanding deepens (beginner → advanced content)
171
172**Trigger:** "Start a research project on [topic]"
173
174### 🧠 Agent Self-Improvement Feed
175Agents can overcome their knowledge cutoff by maintaining their own custom feed:
176- Create a custom feed via /feeds/custom/ for technologies the agent frequently assists with
177- Periodically fetch /feeds/custom/{feedId} to ingest recent articles
178- Use /posts/{id} to read full summaries and key points
179- Agent can now provide advice with current information: "As of this week, the recommended approach is..."
180- Continuously adapt the feed filters based on what users are asking about
181
182**Trigger:** Agent background process, or "What's new in [technology] since your training?"
183
184### 🔀 Multi-Source Synthesis
185Get balanced perspectives by aggregating content across publishers:
186- Search /search/posts for a topic to find coverage from multiple sources
187- Use /search/sources to identify authoritative publishers on the topic
188- Fetch posts from different sources via /feeds/source/{source}
189- Synthesize diverse viewpoints into a balanced summary with citations
190- Surface where sources agree vs. disagree on best practices
191
192**Trigger:** "What are the different perspectives on [topic]?" or "Compare approaches to [problem]"
193
194### 📈 Trending Radar
195Help users stay ahead by monitoring community signals:
196- Fetch /feeds/popular to detect what's gaining traction right now
197- Cross-reference with user's followed tags to surface relevant trends
198- Use /feeds/discussed to find topics sparking active debate
199- Alert users when technologies in their stack are trending (new releases, security issues, paradigm shifts)
200- Use /tags to fetch the full tag catalog and /search/tags to explore adjacent trending topics
201
202**Trigger:** "What should I be paying attention to?" or "What's trending in [area]?"
203
204## Rate Limits
205
206* **60 requests per minute** per user
207
208Check response headers:
209- X-RateLimit-Limit - Maximum requests allowed per window
210- X-RateLimit-Remaining - Requests remaining in current window
211- X-RateLimit-Reset - Unix timestamp when the window resets
212- Retry-After - Seconds to wait (only when rate limited)
213
214## Errors
215
216| Code | Meaning |
217|------|---------|
218| 401 | Invalid or missing token |
219| 403 | Plus subscription required |
220| 404 | Resource not found |
221| 429 | Rate limit exceeded |
222
223**Error Response Format:**
224```json
225{
226 "error": "error_code",
227 "message": "Human readable message"
228}
229```
230