Skip to content

DuckDuckGo Knowledge Graph API: entity data without running a browser fleet

DuckDuckGo knowledge graph panels are built for people reading a search page, not for pipelines collecting entities at scale.

OUTPUT FORMATSHTMLJSONMarkdown

They render with JavaScript and sit behind bot detection, so a plain HTTP request often gets blocked or returns an incomplete card. This API moves that work server-side: you send a URL, and the service renders the page, rotates proxies and returns HTML or parsed JSON you can load directly into a dataset.

Why use an API for DuckDuckGo entity cards

A knowledge graph card typically answers a single entity question: who or what this is, a short summary, and a handful of attributes. That makes it valuable for entity-resolution pipelines, retrieval-augmented generation datasets and knowledge-base seeding, where consistent fields matter more than prose. The same cards also embed image URLs that can be collected for visual competitor benchmarking and market analysis. The practical problem is access. Because the panels depend on JavaScript and active bot detection, building a reliable collector means managing headless browsers, proxy rotation and fingerprinting yourself. This API keeps your side to one thin HTTP call while that infrastructure runs on the service side.

How the workflow runs, step by step

Start by creating an account to receive an API key. Install the SDK for your stack, or use cURL if you prefer a raw request. Send your API key together with a DuckDuckGo Knowledge Graph URL. Behind the scenes the service rotates proxies, spoofs fingerprints and renders JavaScript, then returns a clean response ready to parse. When a page needs more than the default fetch, add advanced parameters: render_js for JavaScript execution, stealth_proxy for CAPTCHA-heavy pages, country_code for geo-targeting, and ai_extract_rules for natural-language extraction. A quick pre-flight checklist helps you pick the right options before you spend credits: confirm the URL is a public SERP or entity page, decide whether the card needs JavaScript to appear, choose CSS selectors or an AI spec for extraction, and set a country code only when location-specific results matter.

What you can pull from a card

Each card can yield the entity name, entity type, a summary, key attributes and external reference links in a single call. For facts, pull fields such as founding date, location, parent organization and key people for every entity matched by your query set. For datasets, collect structured records for people, places and organizations to seed a knowledge base or feed entity resolution. For visual analysis, gather the embedded image URLs separately. Two extraction routes cover most needs. Use extract_rules when you know the CSS selectors and want deterministic field mapping. Use ai_extract_rules when you would rather describe the fields in natural language and receive structured JSON back. Screenshots, Markdown output, JavaScript scenarios and no-code automation through n8n are also available when a workflow needs a visual record, an LLM-ready format, interaction before extraction, or monitoring without writing scraper code.

Setup, scale and reliability

Setup is designed to take minutes rather than days. Code samples are provided for Python, Node.js, Ruby, PHP, Go and cURL, and a dashboard request builder lets you test a URL without writing code first. Code samples also cover Java and JavaScript in the wider documentation. On the infrastructure side, proxy rotation and headless-browser rendering are meant to reduce IP-based blocking by mimicking real browsing behaviour, and the platform is built to scale across thousands of concurrent browsers during traffic spikes. Typical results are described as arriving within a few seconds even on JavaScript-heavy pages. The service also states it does not collect or store personal data from scraped sites unless a user explicitly requests it, which matters when you are building datasets from public entity pages.

Pricing and credit costs

Before choosing a plan, confirm the current pricing, included usage, trial conditions, billing schedule and cancellation terms.

Frequently asked questions

Do I need an account to scrape DuckDuckGo Knowledge Graph?

No separate DuckDuckGo account is needed. You use the API key for this service, send a target URL, and the service handles the browser and proxy work behind the request.

Is scraping DuckDuckGo Knowledge Graph legal?

Public-facing pages are generally the kind of content that can be scraped, but you should still check the target site's terms of service before deploying a workflow and avoid content that requires signing in.

What data can I extract from DuckDuckGo Knowledge Graph?

You can pull anything visible on the public page. For entity work, the most useful fields are name, type, summary, key facts such as founding date, location and parent organization, plus external reference links and embedded image URLs.

How do I get structured JSON from DuckDuckGo Knowledge Graph?

Map CSS selectors to field names with extract_rules, or describe the fields you want in natural language with ai_extract_rules. Either route returns parsed JSON rather than raw HTML you have to clean up yourself.

Which programming languages can I use to scrape DuckDuckGo Knowledge Graph?

Python, Node.js, Go, PHP, Ruby and Java are supported, and plain cURL also works. Choose the stack your project already uses instead of adding a new language for this task.

How much does it cost to scrape DuckDuckGo Knowledge Graph?

Before choosing a plan, confirm the current pricing, included usage, trial conditions, billing schedule and cancellation terms.