API · DuckDuckGo
GET /duckduckgo/instant-answer
DuckDuckGo’s Instant Answer for a topic: abstract, infobox, related topics.
| Request | GET /v1/duckduckgo/instant-answer |
| Operation id | duckduckgo.instant_answer.get |
| Cost | 1 credit, refunded if the call fails |
| Auth | API key: Authorization: Bearer <key> or x-api-key. |
DuckDuckGo’s Instant Answer for a topic: abstract, infobox, related topics.
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
query | string | yes | Example: Albert Einstein. |
Responses
| Status | Meaning | Schema |
|---|---|---|
200 | The Instant Answer. | DuckDuckGoInstantAnswer |
400 | Invalid input. Nothing was charged. | Error |
401 | Missing or invalid API key. | Error |
402 | Not enough credits, a spend cap was reached, or payment is required. | Error |
403 | The target is private, or the account is suspended. | Error |
404 | DuckDuckGo has nothing for that search. | Error |
429 | Too many requests. Wait for Retry-After seconds. | Error |
503 | DuckDuckGo is temporarily unavailable. Retryable; nothing was charged. | Error |
DuckDuckGoInstantAnswer fields
| Field | Type | Description |
|---|---|---|
Heading | string | |
Abstract | string | |
AbstractText | string | |
AbstractSource | string | |
AbstractURL | string | |
Image | string | |
Type | string | |
Answer | object | |
Definition | string | |
Entity | string | |
Infobox | object | |
RelatedTopics | object[] | |
Results | object[] |
Errors use one shape everywhere; see Errors for every code and what to do.