How to pull DuckDuckGo organic results for an AI agent
Build a ranked source table from DuckDuckGo organic search results with titles, links, snippets and dates
On this page
You have 30 query ideas for a competitor launch and need a ranked source list before writing a brief. Run serpapi.duckduckgo.search once per query, merge the organic_results into one table, and use the merged table to choose reading order and spot queries that need site: or intitle: operators
Build the ranked source table
The deliverable is one row per organic result per query, with these columns: position, title, link, snippet, date and query. Keep query on each row so a link that appears under two queries can be traced back to both. Sort by query, then by position, and mark duplicate link values when you merge
Example query (placeholder domain): site:acme-plumbing.example RPC documentation. Replace the placeholder domain and the phrase with one of your 30 launch queries. The table below is a design, not a result; values are placeholders showing the shape
| query | position | title | link | snippet | date |
|---|---|---|---|---|---|
| Example: site:acme-plumbing.example RPC documentation | 1 | (placeholder title) | (placeholder link) | (placeholder snippet) | (placeholder date) |
No run has been executed for this article. The table is the artifact the agent should return after the calls
What the search tool takes
The contract lists q as required and df, kl, m, safe and start as optional controls. Put the search phrase in q; it accepts regular DuckDuckGo operators like site: or intitle: and has a 500 character maximum
Set m between 1 and 50; the default is 50. Set start from 0 to 500 for paging. Use df only when the brief fixes a date range: past day, past week, past month, past year or a custom range such as 2021-06-15..2024-06-16. Use kl for a region code such as us-en or fr-fr. Use safe with 1 for Strict, -1 for Moderate or -2 for Off, and only when the brief fixes an adult filter. The contract lists these controls; it does not say the service accepts nothing else
Read the fields that decide what to open
organic_results is the ranked array. position gives the order, link is the page to open, title names the page, snippet gives the text to triage, and date gives the date string when one is present; date_raw is also returned. related_searches returns related query suggestions with query and link. engine is fixed to duckduckgo
Use the fields in this order. Read position to choose the first pages, snippet to decide whether a page is worth opening, date to check recency when you set df, and link to deduplicate across queries. If notice is present, the search engine returned no results for that query. The search still counts as one search, so a notice is not a failed call
For a comparison of search options, see SerpApi alternatives for agent search
Page a query with start
The paging limit sits here: an initial search returns up to 11 organic results while an offset search returns up to 50. Set m to 50 for the run, but expect the first call with start at 0 to return at most 11. Make the second call with start set past those first results, for example start at 11. Continue while the previous call returned useful links; stop when notice appears or the links stop helping the brief
This limit shapes the plan. Two calls per query do not mean 100 rows; the first call is capped at 11. The second call is the one that can return up to 50. For 30 queries with two pages each, plan 60 calls, not 30
The agent prompt
Set up https://purrkey.app/SKILL.md, then use Purrkey to pull DuckDuckGo organic results for 30 competitor launch queries. Before running anything, check the current inputs and price of serpapi.duckduckgo.search. For each query, call the tool with q set to the query and m set to 50. Start with start=0, then page with start=11 while the previous call returned useful links and the response has no notice. Return one table with columns position, title, link, snippet, date and query. Keep the query value on each row. Do not invent links or dates. Example query to replace: site:acme-plumbing.example RPC documentation.Run five queries first. If the rows do not help the brief, rewrite those queries with site: or intitle: operators before spending the other 25 queries
Estimated tool cost
The catalog lists serpapi.duckduckgo.search at POST /v1/runs with toolId serpapi.duckduckgo.search and a unit price of $0.015 per call, price revision serpapi-developer-retail-2026-11-18, read through the Purrkey catalog on November 23, 2026. A search that returns no results still counts as one search; failed searches are not charged. Planned charges in the table are ceilings. Model fees for the agent are not counted
| Step | Formula | Unit price | Planned quantity | Total |
|---|---|---|---|---|
| One query, first page | 1 call x $0.015 | $0.015 per call | 1 call | $0.015 |
| 30 queries, two pages each | 60 calls x $0.015 | $0.015 per call | 60 calls | $0.90 |
The second row is the 60-call plan from the paging section. If you stop after the first page on each of 30 queries, the plan is 30 calls at $0.015 per call, or $0.45
Run the first query
Take one query from your 30, run it with q, m set to 50 and start at 0, then inspect the organic_results and notice fields before building the rest of the table. The tool page is DuckDuckGo search
Get started by giving this to your agent
- Claude Code
- Codex
- Gemini CLI
- Cursor
- GitHub Copilot
Set up https://purrkey.app/SKILL.md, then use Purrkey to show me what I can do with DuckDuckGo.FAQ
How do I pull DuckDuckGo organic results for 30 queries?
Run serpapi.duckduckgo.search once per query with q set to the query and m set to 50, page with start, then merge the organic_results into one table with the query name on each row.
What does serpapi.duckduckgo.search return?
It returns organic_results in ranked order with position, title, link, snippet, date and date_raw, plus related_searches with query and link, and engine fixed to duckduckgo.
How many results does an initial DuckDuckGo search return?
An initial search returns up to 11 organic results while an offset search returns up to 50. m can be set from 1 to 50, with a default of 50.
What happens when DuckDuckGo returns no results?
The output sets notice, and the search still counts as one search. A failed search is not charged.
How much does 30 queries with two pages each cost?
The two-page plan for 30 queries is 60 calls at $0.015 per call, or $0.90. One query's first page is 1 call at $0.015.
Can I filter by date, region or adult content?
Yes. Use df for a date filter, kl for a region code such as us-en or fr-fr, and safe for Strict, Moderate or Off, only when the brief fixes that condition.
What can I do with position, link, snippet and date?
Use position to choose reading order, link to open and deduplicate pages, snippet to triage whether a page is worth opening, and date to check recency when df is set.
Next step
Try this with DuckDuckGo
The tool directory lists every endpoint with its current price. Inspect the inputs there, then let your agent run a small batch before scaling up.