Skip to content

Engine API

Meta AI API

Meta's official developer API sells access to its models, not the answers of the Meta AI assistant. PromptGale returns the meta.ai answer for a prompt as JSON: a real browser asks meta.ai from the country you pick and returns the text and, with a brand, where each brand ranks. Each answer costs 2 credits.

Updated

What does the Meta AI API return?

One completed task is one answer. A real browser opens meta.ai from the country you chose, asks your prompt and returns what the page showed, as data.result inside the task.

Fields of a Meta AI result
FieldWhat it holds
textThe answer as plain text, as meta.ai showed it.
markdownThe same answer with its formatting (lists, bold, links) kept. On by default.
sourcesEach source: position, url, domain, title?, snippet?, cited (false when it was only in the source list) and citationNumber?.
meta.localizationWhether the answer is about the requested country: status ok, mismatch or unknown, and answerCountry.
analysis.brandsWith brand (and optional competitors) in the payload: for each brand, mentioned, mentions, firstPosition, rank, cited, citedUrls and shareOfVoice. Free; no extra credits.
locationWhere the task ran: country, locale, timezone, plus state, city, lat, lng or approximate when they apply.
Response of POST /v1/sync/task (META_AI)
{
  "success": true,
  "data": {
    "id": "tsk_3Xb8Kq0Lm2Np4Rs6Tu8Vw0Yz",
    "taskType": "META_AI",
    "status": "COMPLETED",
    "country": "US",
    "credits": 2,
    "creditsCharged": 2,
    "result": {
      "engine": "META_AI",
      "text": "For home espresso, these are the subscriptions people recommend most often: 1. Bluebird Beans ships every two weeks and is easy to pause. 2. Acme Coffee roasts to order and lets you pick the grind for your machine. 3. Northwind Roasters has a wide range of single-origin espresso roasts.",
      "sources": [],
      "analysis": {
        "status": "ok",
        "brands": [
          {
            "name": "Acme Coffee",
            "role": "target",
            "mentioned": true,
            "mentions": 1,
            "firstPosition": 141,
            "rank": 2,
            "cited": false,
            "citedUrls": [],
            "shareOfVoice": 33.3
          },
          {
            "name": "Northwind Roasters",
            "role": "competitor",
            "mentioned": true,
            "mentions": 1,
            "firstPosition": 218,
            "rank": 3,
            "cited": false,
            "citedUrls": [],
            "shareOfVoice": 33.3
          },
          {
            "name": "Bluebird Beans",
            "role": "competitor",
            "mentioned": true,
            "mentions": 1,
            "firstPosition": 79,
            "rank": 1,
            "cited": false,
            "citedUrls": [],
            "shareOfVoice": 33.3
          }
        ]
      },
      "location": {
        "country": "US",
        "locale": "en-US",
        "timezone": "America/New_York"
      }
    }
  }
}

Sample output: the brands, domains and answer are made up (Acme Coffee and its competitors do not exist). The field names and shapes are the real API.

How do I get a Meta AI answer with curl, Python or Node.js?

Create an API key in the dashboard and export it as PROMPTGALE_API_KEY. POST /v1/sync/task runs the task and holds the request open until the answer is ready, up to 290 seconds; past that it answers 202 with the task id to poll. Leave out brand and competitors if you only want the answer.

curl
curl -X POST https://promptgale.com/v1/sync/task \
  -H "Authorization: Bearer $PROMPTGALE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "taskType": "META_AI",
    "payload": {
      "prompt": "best coffee subscription for home espresso",
      "country": "US",
      "brand": "Acme Coffee",
      "competitors": [
        "Northwind Roasters",
        "Bluebird Beans"
      ]
    }
  }'
Python
import os
import requests

res = requests.post(
    "https://promptgale.com/v1/sync/task",
    headers={"Authorization": f"Bearer {os.environ['PROMPTGALE_API_KEY']}"},
    json={"taskType": "META_AI", "payload": {"prompt": "best coffee subscription for home espresso", "country": "US", "brand": "Acme Coffee", "competitors": ["Northwind Roasters", "Bluebird Beans"]}},
    timeout=300,
)
task = res.json()["data"]
print(task["status"], task["result"]["text"][:300])
Node.js
const res = await fetch('https://promptgale.com/v1/sync/task', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.PROMPTGALE_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ taskType: 'META_AI', payload: {prompt: "best coffee subscription for home espresso", country: "US", brand: "Acme Coffee", competitors: ["Northwind Roasters","Bluebird Beans"]} }),
});
const { data: task } = await res.json();
console.log(task.status, task.result.text.slice(0, 300));

For queued work use POST /v1/tasks with a webhookUrl and receive the finished task at your URL. Every field is in Request fields and Results.

Can I ask Meta AI from a specific country or US state?

Every task takes payload.country (ISO 3166-1 alpha-2, default US), and the browser's locale and timezone follow it. Right now Meta AI is served from 43 countries: Argentina, Austria, Australia, Belgium, Bulgaria, Brazil, Canada, Switzerland, Chile, Colombia, Cyprus, Czechia, Germany, Denmark, Estonia, Spain, Finland, France, United Kingdom, Greece, Croatia, Hungary, Indonesia, Ireland, Italy, Mexico, Malaysia, Nigeria, Netherlands, Norway, New Zealand, Peru, Philippines, Poland, Portugal, Romania, Sweden, Singapore, Slovenia, Slovakia, Thailand, United States, South Africa. On top of the country you can send one finer location per task: state (a US state code, +1 credit), city (a city name), and location (a { lat, lng } point, +1 credit).

Payload asked from Texas
{
  "taskType": "META_AI",
  "payload": {
    "prompt": "best coffee subscription for home espresso",
    "country": "US",
    "state": "TX"
  }
}

result.location reports where the task actually ran. More in Countries and locations.

What does Meta offer officially?

Meta's developer site, dev.meta.ai, offers its models by API with pay-as-you-go token prices, and an optional web_search tool at $2.50 per 1,000 search queries (as of November 2026, pricing). None of the Meta pages we checked offers an API that returns the Meta AI assistant's own answers, the ones people get in meta.ai and Meta's apps.

So: build on Meta's models with Meta's API. Read what the Meta AI assistant says about your market with PromptGale.

What should I know before I query Meta AI?

  • Meta AI is offered only in some countries. A country Meta does not offer it in answers 422 REGION_UNSUPPORTED with details.cause engine_not_offered. GET /v1/countries?taskType=META_AI lists the accepted ones.
  • Meta AI answers often come without sources, so sources can be an empty list. The sample above shows that case.
  • meta.localization tells you whether the answer is framed around the country you asked from.
  • Meta AI needs a paid plan; the free plan answers 402 PLAN_REQUIRED.

How much does a Meta AI answer cost?

Meta AI costs 2 credits per completed answer. Credits are held when you submit, charged when the task completes and refunded in full if it fails.

Cost per 1,000 completed answers, by plan (computed)
EngineCredits per answerStarter ($19.00/mo)Growth ($79.00/mo)Pro ($299.00/mo)Scale ($999.00/mo)
Meta AI2$19.00$15.80$11.96$9.99

Computed: credits per answer times 1,000 times the plan's price per credit (plan price divided by its monthly credits). A US state or map point adds 1 credit per task. Failed tasks are refunded, so they cost nothing. Taxes not included. Current plans are on Pricing.

How do I run hundreds of prompts at once?

Send a batch: up to 10,000 items in one POST /v1/batches, each one a task. Items are checked first, then queued as room frees up. The webhook gets each finished task and one batch.completed at the end.

POST /v1/batches
curl -X POST https://promptgale.com/v1/batches \
  -H "Authorization: Bearer $PROMPTGALE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "items": [
      { "customId": "p1-meta_ai", "taskType": "META_AI", "payload": {"prompt": "best coffee subscription for home espresso", "country": "US", "brand": "Acme Coffee", "competitors": ["Northwind Roasters", "Bluebird Beans"]} },
      { "customId": "p2-meta_ai", "taskType": "META_AI", "payload": {"prompt": "coffee subscription for a moka pot", "country": "US", "brand": "Acme Coffee", "competitors": ["Northwind Roasters", "Bluebird Beans"]} }
    ],
    "webhookUrl": "https://example.com/hooks/promptgale",
    "idempotencyKey": "weekly-2026-11-27"
  }'

Details in Batches and Webhooks.

Questions, answered

Is there an official Meta AI API?

Meta offers an API for its models at dev.meta.ai, with token pricing and an optional web search tool. The Meta pages we checked in November 2026 offer no API for the Meta AI assistant's own answers; PromptGale returns those.

Does a Meta AI answer include sources?

Often not. When the page shows none, sources is an empty list. The answer text and the brand analysis are still returned.

What does a Meta AI answer cost?

2 credits per completed answer, on any paid plan. Failed tasks are refunded.

Sources

Statements about other companies come from their own pages, read on . Prices and products change; check the source before you decide.

Run your first prompt in a minute.