> ## Documentation Index
> Fetch the complete documentation index at: https://docs.encrata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# DuckDuckGo Lookup

> Fetch DuckDuckGo's keyless Instant Answer for any query a privacy-friendly summary, definition, and related topics. Free costs no credits.

## Authentication

Requires an API key in the `Authorization` header.

```bash theme={"dark"}
Authorization: Bearer YOUR_API_KEY
```

## Request

<ParamField body="query" type="string" required>
  The topic, entity, or term to look up.
</ParamField>

## Response

Returns DuckDuckGo's Instant Answer for the query. This is a dedicated endpoint (not a Google search) and costs **0 credits**. `answer` is `null` when DuckDuckGo has no instant answer for the query.

<ResponseField name="query" type="string">The query you sent.</ResponseField>

<ResponseField name="answer" type="object">
  The DuckDuckGo Instant Answer, or `null` when none is available.

  <Expandable title="answer">
    <ResponseField name="heading" type="string">Entity / topic heading.</ResponseField>
    <ResponseField name="abstract" type="string">Summary abstract.</ResponseField>
    <ResponseField name="abstract_url" type="string">Source URL for the abstract.</ResponseField>
    <ResponseField name="answer" type="string">Direct instant answer, when applicable.</ResponseField>
    <ResponseField name="definition" type="string">Dictionary-style definition, when applicable.</ResponseField>
    <ResponseField name="related_topics" type="string[]">Related topics and terms.</ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="credits" type="number">Always `0` this endpoint is free.</ResponseField>

<ResponseExample>
  ```json theme={"dark"}
  {
    "query": "OpenAI",
    "answer": {
      "heading": "OpenAI",
      "abstract": "OpenAI is an American artificial intelligence research organization...",
      "abstract_url": "https://en.wikipedia.org/wiki/OpenAI",
      "related_topics": ["ChatGPT", "GPT-4", "Sam Altman"]
    },
    "credits": 0
  }
  ```
</ResponseExample>

## Credits

Free this endpoint never deducts credits.
