# LLM Answers API Documentation

Submit a prompt to the public, logged-out ChatGPT experience. The response holds the clean answer text, every cited source with title, link, snippet and publish date, citation positions inside the text, the web searches the model ran, the model that answered. Ask a follow-up by sending the earlier turns in the history parameter. Follow-up suggestion text is not available: follow_up.available is always false. A request that returns no answer is not billed. Answers take 4 to 60 seconds.

- **Documentation:** [https://scrappa.co/docs/llm-answers-api/llm_answers_answer](https://scrappa.co/docs/llm-answers-api/llm_answers_answer)
- **API group:** LLM Answers API
- **Endpoint:** `GET https://scrappa.co/api/llm-answers/answer`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `prompt` | string | Yes | The question or instruction, 1 to 4000 characters. Alias: q. |
| `model` | string | No | Model id from the models endpoint. Defaults to auto. |
| `history` | array | No | Earlier turns of the conversation, up to 20 messages, sent as history[0][role]=user&history[0][text]=... with role user or assistant, oldest first. The service keeps no conversation between requests, so send the earlier turns to ask a follow-up. |
| `timezone` | string | No | IANA timezone such as Europe/Berlin. Defaults to UTC. Used for questions about the current time. |
| `locale` | string | No | Language hint such as en-US or de-DE. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/llm-answers/answer?prompt=What+is+the+tallest+mountain+in+Europe%3F+Give+two+sources."
```

## Example response

```json
{
    "success": true,
    "data": {
        "answer": {
            "text": "The tallest mountain in Europe is Mount Elbrus, at 5,642 metres.",
            "length": 66
        },
        "sources": [
            {
                "ref_id": "turn0search0",
                "title": "El'brus",
                "url": "https://education.nationalgeographic.org/resource/elbrus/",
                "snippet": "Elbrus is the highest peak in Europe.",
                "attribution": "education.nationalgeographic.org",
                "pub_date": null,
                "type": "search_result",
                "cited": true
            }
        ],
        "citations": [
            {
                "type": "grouped_webpages",
                "marker": "cite:turn0search0",
                "matched_text": "",
                "start_idx": 66,
                "end_idx": 66,
                "refs": [
                    "turn0search0"
                ],
                "alt": "([National Geographic](https://education.nationalgeographic.org/resource/elbrus/))",
                "urls": [
                    "https://education.nationalgeographic.org/resource/elbrus/"
                ]
            }
        ],
        "safe_urls": [
            "https://education.nationalgeographic.org/resource/elbrus/"
        ],
        "search_queries": [
            "tallest mountain in Europe"
        ],
        "reasoning_titles": [
            "Searching tallest mountain in Europe"
        ],
        "finish_details": {
            "type": "stop"
        },
        "model": {
            "requested": "auto",
            "resolved": "gpt-6"
        },
        "follow_up": {
            "available": false,
            "reason": "Follow-up suggestion text is not available."
        }
    },
    "meta": {
        "duration_ms": 7800
    }
}
```

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
