# LLM Answers Multi-Engine API Documentation

Sends one prompt to several engines and returns one result per engine, each with the answer text and its sources. Pick the engines with engines (default chatgpt,gemini). Available engines: chatgpt, gemini, google_ai_mode, google_ai_overview. Each engine that returns an answer costs 1 credit. An engine that fails is not billed and does not fail the call: its entry holds an error instead. The call fails with status 503 and no charge only when no engine answers. Engines run one after the other inside a 70 second budget, so set client timeouts to 90 seconds. An engine that cannot start inside the budget is reported as failed and not billed. Prompts for google_ai_overview may hold up to 2048 characters. Microsoft Copilot and Perplexity are not available as engines.

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

## 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. |
| `engines` | string | No | Comma separated list of engines: chatgpt, gemini, google_ai_mode, google_ai_overview. Defaults to chatgpt,gemini. |
| `locale` | string | No | Language hint such as en-US or de-DE for chatgpt and gemini. |
| `timezone` | string | No | IANA timezone such as Europe/Berlin. Used by chatgpt. Defaults to UTC. |
| `hl` | string | No | Two letter interface language for the Google engines, such as en or de. |
| `gl` | string | No | Two letter country code for the Google engines, such as us or de. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/llm-answers/multi?prompt=What+is+the+capital+of+France%3F&engines=chatgpt%2Cgemini"
```

## Example response

```json
{
    "success": true,
    "data": {
        "results": [
            {
                "engine": "chatgpt",
                "success": true,
                "data": {
                    "engine": "chatgpt",
                    "answer": {
                        "text": "The capital of France is Paris.",
                        "length": 31
                    },
                    "sources": []
                }
            },
            {
                "engine": "gemini",
                "success": true,
                "data": {
                    "engine": "gemini",
                    "answer": {
                        "text": "The capital of France is **Paris**.",
                        "length": 35
                    },
                    "sources": [
                        {
                            "title": "Paris",
                            "url": "https://en.wikipedia.org/wiki/Paris",
                            "domain": "en.wikipedia.org",
                            "favicon": null,
                            "snippet": "Paris is the capital of France.",
                            "cited": true
                        }
                    ]
                }
            }
        ]
    },
    "meta": {
        "duration_ms": 14200,
        "engines_requested": 2,
        "billed_engines": 2,
        "credits_charged": 2
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | Returned when the prompt is missing or longer than 4000 characters, or when engine, engines, model, history, timezone, locale, topic, limit or offset are invalid. engine=gemini rejects history and model. |
| 503 | No Answer Available | Returned as a non-billable failure when the answer engine refuses the request, returns no answer text, ends the answer early or returns an unexpected response. error.type names the cause. No credits are used. |
| 503 | Service Unavailable | The upstream service is temporarily unavailable. Please retry shortly. |

## 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)
