# Social Fetch API - DuckDuckGo endpoints # Base URL: https://api.socialfetch.dev # Auth: x-api-key header (sfk_...) # Full catalog: https://www.socialfetch.dev/llms-endpoints.txt | JSON: https://www.socialfetch.dev/llms.json # Docs hub: https://www.socialfetch.dev/docs/api | OpenAPI: https://www.socialfetch.dev/openapi.json 7 documented DuckDuckGo operations. Do not invent paths - only the routes below (and their linked markdown pages) are supported. ## GET /v1/duckduckgo/search Search DuckDuckGo Credit cost: 1 credit. Failed requests are free. Auth: API key or x402 payment (no key needed for payment) Docs: https://www.socialfetch.dev/docs/api/v1/duckduckgo/search/get.mdx SDK: client.duckduckgo.searchWeb({ query: "marathon training plan" }) Parameters: - query (required, string) - What to search for, e.g. `marathon training plan`. Search operators such as `site:` work. - time (optional, string, enum: day | week | month | year) - Only results from the past `day`, `week`, `month` or `year`. Default: any time. - cursor (optional, string) - Pass `page.nextCursor` from the previous response to get the next page. - country (optional, string) - Two-letter country code of the results' region, e.g. `GB` or `DE`. Default: `US`. - language (optional, string) - Two-letter language code for a country with several, e.g. `fr` with `CH`. Default: the region's first language. Pagination: send query `cursor` from prior `data.page.nextCursor`; stop when `data.page.hasMore` is false. Outcome field: `data.lookupStatus` in `found`, `not_found` curl "https://api.socialfetch.dev/v1/duckduckgo/search?query=marathon%20training%20plan" \ -H "x-api-key: YOUR_API_KEY" ## GET /v1/duckduckgo/rank Check a site's DuckDuckGo rank Credit cost: 1 credit. Failed requests are free. Auth: API key or x402 payment (no key needed for payment) Docs: https://www.socialfetch.dev/docs/api/v1/duckduckgo/rank/get.mdx SDK: client.duckduckgo.checkRank({ query: "marathon training plan", domain: "halhigdon.com" }) Parameters: - query (required, string) - The search to rank in, e.g. `marathon training plan`. - domain (required, string) - The site to find, e.g. `halhigdon.com`. A URL is accepted and reduced to its host; `www.` and subdomains match too. - depth (optional, integer) - How many results to check, 10 to 200. Default: 100. - time (optional, string, enum: day | week | month | year) - Only results from the past `day`, `week`, `month` or `year`. Default: any time. - country (optional, string) - Two-letter country code of the results' region, e.g. `GB` or `DE`. Default: `US`. - language (optional, string) - Two-letter language code for a country with several, e.g. `fr` with `CH`. Default: the region's first language. Outcome field: `data.lookupStatus` in `found`, `not_found` curl "https://api.socialfetch.dev/v1/duckduckgo/rank?query=marathon%20training%20plan&domain=halhigdon.com" \ -H "x-api-key: YOUR_API_KEY" ## GET /v1/duckduckgo/news Search DuckDuckGo News Credit cost: 1 credit. Failed requests are free. Auth: API key or x402 payment (no key needed for payment) Docs: https://www.socialfetch.dev/docs/api/v1/duckduckgo/news/get.mdx SDK: client.duckduckgo.searchNews({ query: "electric cars" }) Parameters: - query (required, string) - What to search the news for, e.g. `electric cars`. - time (optional, string, enum: day | week | month | year) - Only results from the past `day`, `week`, `month` or `year`. Default: any time. - cursor (optional, string) - Pass `page.nextCursor` from the previous response to get the next page. - country (optional, string) - Two-letter country code of the results' region, e.g. `GB` or `DE`. Default: `US`. - language (optional, string) - Two-letter language code for a country with several, e.g. `fr` with `CH`. Default: the region's first language. Pagination: send query `cursor` from prior `data.page.nextCursor`; stop when `data.page.hasMore` is false. Outcome field: `data.lookupStatus` in `found`, `not_found` curl "https://api.socialfetch.dev/v1/duckduckgo/news?query=electric%20cars" \ -H "x-api-key: YOUR_API_KEY" ## GET /v1/duckduckgo/videos Search DuckDuckGo Videos Credit cost: 1 credit. Failed requests are free. Auth: API key or x402 payment (no key needed for payment) Docs: https://www.socialfetch.dev/docs/api/v1/duckduckgo/videos/get.mdx SDK: client.duckduckgo.searchVideos({ query: "marathon training plan" }) Parameters: - query (required, string) - What to search videos for, e.g. `marathon training plan`. - time (optional, string, enum: day | week | month) - Only videos published in the past `day`, `week` or `month`. Default: any time. - cursor (optional, string) - Pass `page.nextCursor` from the previous response to get the next page. - country (optional, string) - Two-letter country code of the results' region, e.g. `GB` or `DE`. Default: `US`. - language (optional, string) - Two-letter language code for a country with several, e.g. `fr` with `CH`. Default: the region's first language. Pagination: send query `cursor` from prior `data.page.nextCursor`; stop when `data.page.hasMore` is false. Outcome field: `data.lookupStatus` in `found`, `not_found` curl "https://api.socialfetch.dev/v1/duckduckgo/videos?query=marathon%20training%20plan" \ -H "x-api-key: YOUR_API_KEY" ## GET /v1/duckduckgo/images Search DuckDuckGo Images Credit cost: 1 credit. Failed requests are free. Auth: API key or x402 payment (no key needed for payment) Docs: https://www.socialfetch.dev/docs/api/v1/duckduckgo/images/get.mdx SDK: client.duckduckgo.searchImages({ query: "eiffel tower" }) Parameters: - query (required, string) - What to search images for, e.g. `red panda`. - time (optional, string, enum: day | week | month | year) - Only images first seen in the past `day`, `week`, `month` or `year`. Default: any time. - size (optional, string, enum: small | medium | large | wallpaper) - `small`, `medium`, `large` or `wallpaper`. Default: any size. - color (optional, string, enum: color | monochrome | red | orange | yellow | green | blue | purple | pink | brown | black | gray | teal | white) - `color` (colour images only), `monochrome`, or a main colour such as `red` or `teal`. Default: any. - type (optional, string, enum: photo | clipart | gif | transparent | line) - `photo`, `clipart`, `gif` (animated), `transparent` or `line` (line drawings). Default: any type. - layout (optional, string, enum: square | tall | wide) - `square`, `tall` or `wide`. Default: any layout. - license (optional, string, enum: any | public | share | share_commercially | modify | modify_commercially) - Usage rights: `any` (any Creative Commons licence), `public` (public domain), `share`, `share_commercially`, `modify` or `modify_commercially`. Default: any licence, including none. - safeSearch (optional, string, enum: strict | moderate | off) - `strict`, `moderate` or `off`. Default: `moderate`. - cursor (optional, string) - Pass `page.nextCursor` from the previous response to get the next page. - country (optional, string) - Two-letter country code of the results' region, e.g. `GB` or `DE`. Default: `US`. - language (optional, string) - Two-letter language code for a country with several, e.g. `fr` with `CH`. Default: the region's first language. Pagination: send query `cursor` from prior `data.page.nextCursor`; stop when `data.page.hasMore` is false. Outcome field: `data.lookupStatus` in `found`, `not_found` curl "https://api.socialfetch.dev/v1/duckduckgo/images?query=eiffel%20tower" \ -H "x-api-key: YOUR_API_KEY" ## GET /v1/duckduckgo/instant-answer Get a DuckDuckGo instant answer Credit cost: 1 credit. Failed requests are free. Auth: API key or x402 payment (no key needed for payment) Docs: https://www.socialfetch.dev/docs/api/v1/duckduckgo/instant-answer/get.mdx SDK: client.duckduckgo.getInstantAnswer({ query: "Albert Einstein" }) Parameters: - query (required, string) - A topic, name or question, e.g. `Albert Einstein`. Outcome field: `data.lookupStatus` in `found`, `not_found` curl "https://api.socialfetch.dev/v1/duckduckgo/instant-answer?query=Albert%20Einstein" \ -H "x-api-key: YOUR_API_KEY" ## GET /v1/duckduckgo/search/suggest List DuckDuckGo search suggestions Credit cost: 1 credit. Failed requests are free. Auth: API key or x402 payment (no key needed for payment) Docs: https://www.socialfetch.dev/docs/api/v1/duckduckgo/search/suggest/get.mdx SDK: client.duckduckgo.suggestSearches({ query: "marat" }) Parameters: - query (required, string) - The start of a search to complete, e.g. `marat`. - country (optional, string) - Two-letter country code of the results' region, e.g. `GB` or `DE`. Default: `US`. - language (optional, string) - Two-letter language code for a country with several, e.g. `fr` with `CH`. Default: the region's first language. Outcome field: `data.lookupStatus` in `found`, `not_found` curl "https://api.socialfetch.dev/v1/duckduckgo/search/suggest?query=marat" \ -H "x-api-key: YOUR_API_KEY"