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

# Meta AI API Overview

> Ask the real Meta AI assistant (meta.ai) a question and get its answer as structured JSON. Anonymous: no Meta account needed.

## Overview

The ScrapeBadger **Meta AI API** sends a prompt to the real **Meta AI** assistant at `meta.ai` (the Muse Spark model family) and returns its answer as structured JSON. This is the consumer assistant people use on meta.ai, not Meta's developer model API.

Requests are **anonymous**: you need no Meta account, Meta app, or cookies. You authenticate only with your ScrapeBadger API key. ScrapeBadger runs the live meta.ai session, the residential exit, and the answer capture.

> [!NOTE]
>
> All endpoints live under `https://scrapebadger.com/v1/meta-ai/*` and authenticate with the `X-API-Key` header. `/ask` accepts `GET` with query parameters or `POST` with the same fields in a JSON body. Successful responses report the credits charged on the `X-Credits-Used` response header.

> [!WARNING]
>
> Each answer is produced live, so most take **10–40 seconds**. Set your HTTP client timeout to **120 seconds**. At volume, run asks [asynchronously](https://docs.scrapebadger.com/long-running-requests.md).

## Features

* **Real Meta AI answers** come from the meta.ai assistant itself, not a generic model imitating it.
* **Web-grounded answers with citations**: for current questions, Meta AI searches the web, and the answer cites its sources as inline Markdown links, such as `[1](https://…)`.
* **Country targeting**: `country` picks the country the question is asked from, so local questions get local answers. US, GB, and CA are served. Meta AI does not serve its assistant on every country's exits; see the caveat below.
* **Traceable responses**: `conversation_id` identifies each exchange. `used_dom_fallback` shows how the answer was recovered.
* **No Meta account**: access is anonymous on the upstream side.

## Honesty caveat

> [!WARNING]
>
> Each request is a **single, fresh, anonymous question**. There is no conversation memory and no follow-up. `conversation_id` identifies the exchange for tracing. You cannot continue a conversation with it.
>
> `answer` is Markdown-style text. Meta AI decides when to search the web, and source links appear inline in the text. The API does not return a separate structured citation list.
>
> Meta AI is not served everywhere. In our testing, German (`DE`) and French (`FR`) exits did not show the assistant, and those asks fail with an unbilled `502`.
>
> Meta AI is non-deterministic. The same prompt asked twice can produce different wording.

## Credit Costs

| Endpoint | Path | Cost |
| - | - | - |
| Ask | `GET`/`POST` `/v1/meta-ai/ask` | 20 credits |
| List models | `GET /v1/meta-ai/models` | 1 credit |
| Health | `GET`/`HEAD` `/v1/meta-ai/health` | Free |

At PAYG, 20 credits is **$0.003 per answer**, or **$3.00 per 1,000 answers**. Subscription tiers reduce that rate. Blocked, empty, and failed answers return non-2xx responses and are not billed.

## Quickstart

```bash cURL theme={null}
curl "https://scrapebadger.com/v1/meta-ai/ask?prompt=What%20is%20the%20tallest%20mountain%20in%20Africa%3F" \
  -H "X-API-Key: YOUR_API_KEY" \
  --max-time 120
```

```javascript Node.js theme={null}
const res = await fetch("https://scrapebadger.com/v1/meta-ai/ask", {
  method: "POST",
  headers: {
    "X-API-Key": process.env.SCRAPEBADGER_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    prompt: "What is the tallest mountain in Africa?",
    country: "US",
  }),
  signal: AbortSignal.timeout(120_000),
});
const data = await res.json();
console.log(data.answer);
```

```python Python theme={null}
import requests

res = requests.post(
    "https://scrapebadger.com/v1/meta-ai/ask",
    headers={"X-API-Key": "YOUR_API_KEY"},
    json={"prompt": "What is the tallest mountain in Africa?", "country": "US"},
    timeout=120,
)
data = res.json()
print(data["answer"])
```

## What you can build

> [card] AI visibility tracking
>
> Ask the questions your customers ask and track whether Meta AI mentions your brand, product, or website.

> [card] Answer-engine comparison
>
> Put Meta AI next to [ChatGPT](https://docs.scrapebadger.com/chatgpt/overview.md), [Gemini](https://docs.scrapebadger.com/gemini/overview.md), [Perplexity](https://docs.scrapebadger.com/api-reference/endpoint/perplexity/ask.md), [Copilot](https://docs.scrapebadger.com/copilot/overview.md), and [Grok](https://docs.scrapebadger.com/grok/overview.md) on the same prompt set.

> [card] Local answer monitoring
>
> Use `country` to see how Meta AI answers the same question in different markets.

> [card] Research datasets
>
> Collect real assistant answers for evaluation, content research, or trend analysis.

## Endpoints

> [card] [Ask Meta AI](https://docs.scrapebadger.com/api-reference/endpoint/meta-ai/ask.md)
>
> Send a prompt and get Meta AI's answer.

> [card] [List models](https://docs.scrapebadger.com/api-reference/endpoint/meta-ai/list-models.md)
>
> The assistant modes Meta AI serves anonymously.

## Run this asynchronously

Calls on this API can run in the background, so you don't hold a connection open while they work. Add one of these to the call:

| Add | What you get |
| - | - |
| `async=true` | The normal response if the call finishes within 25 s. Otherwise `202` with a `request_id`, which you poll at `GET /v1/requests/{request_id}` for free. |
| `callback_url=https://…` | `202` at once. When the call completes, the result is POSTed to your URL, signed with your webhook secret. |
| `Idempotency-Key: <your id>` header | A resent submit returns the first call instead of running it again. |

```bash theme={null}
curl -s "https://scrapebadger.com/v1/...?your=params&async=true" \
  -H "X-API-Key: $SCRAPEBADGER_API_KEY"
# 202 {"request_id": "…", "status": "running", …}, then:
curl -s "https://scrapebadger.com/v1/requests/REQUEST_ID" \
  -H "X-API-Key: $SCRAPEBADGER_API_KEY"
```

An async call is billed once, when it completes. See [Async requests and webhooks](https://docs.scrapebadger.com/long-running-requests.md) for webhooks, signatures and the SDK helpers.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.