Appearance
AI Optimization API Fresh
DataForSEO AI Optimization API provides the infrastructure for AI search optimization (AIO) — the practice of improving how brands, products, and content appear in LLM-generated responses. It covers keyword discovery, conversational search analytics, LLM benchmarking, and brand mention tracking across AI platforms.
What It Covers
The AI Optimization API consists of four purpose-driven sub-APIs covering 33 total endpoints:
| Sub-API | Platforms | Endpoints | What it does |
|---|---|---|---|
| LLM Responses API | ChatGPT, Claude, Gemini, Perplexity | 13 | Generate and retrieve structured responses from LLMs based on your input parameters |
| LLM Scraper API | ChatGPT Search, Gemini Search | 12 | Retrieve actual scraped AI search results — what users see in the AI search interface |
| AI Keyword Data API | All platforms | 2 | Search volume estimates and user intent insights based on keyword usage across AI tools |
| LLM Mentions API | All platforms | 6 | Track how often a brand, domain, or keyword is mentioned in LLM responses |
Use Cases
- Brand visibility monitoring — Measure how often your brand appears when users ask AI tools about your category
- Competitor benchmarking — Compare your AI mention count against competitors across platforms
- Content optimization for AI — Identify what topics and phrases drive LLM citations for your domain
- AI keyword research — Discover which terms your target audience uses in AI-powered searches
- Conversational query testing — Test how different LLMs respond to queries about your products or services
All Endpoints (33 total)
LLM Mentions (6 endpoints)
| Endpoint | Method | Description |
|---|---|---|
/v3/ai_optimization/llm_mentions/search/live | POST | Search for brand/keyword mentions across all LLM platforms |
/v3/ai_optimization/llm_mentions/live | POST | Get mention overview and stats |
/v3/ai_optimization/llm_mentions/tasks_post | POST | Queue async mention tasks |
/v3/ai_optimization/llm_mentions/tasks_ready | GET | Get completed mention tasks |
/v3/ai_optimization/llm_mentions/tasks_fixed | GET | Get re-parsed mention tasks |
/v3/ai_optimization/llm_mentions/task_get/{id} | GET | Retrieve mention task results |
ChatGPT LLM Responses (4 endpoints)
| Endpoint | Method |
|---|---|
/v3/ai_optimization/chatgpt/tasks_post | POST |
/v3/ai_optimization/chatgpt/tasks_ready | GET |
/v3/ai_optimization/chatgpt/tasks_fixed | GET |
/v3/ai_optimization/chatgpt/task_get/{id} | GET |
ChatGPT LLM Scraper (6 endpoints)
| Endpoint | Method |
|---|---|
/v3/ai_optimization/chatgpt/llm_scraper/task_post | POST |
/v3/ai_optimization/chatgpt/llm_scraper/tasks_ready | GET |
/v3/ai_optimization/chatgpt/llm_scraper/tasks_fixed | GET |
/v3/ai_optimization/chatgpt/llm_scraper/task_get/{id} | GET |
/v3/ai_optimization/chatgpt/llm_scraper/live | POST |
/v3/ai_optimization/chatgpt/llm_scraper/locations | GET |
Claude LLM Responses (4 endpoints)
See Claude Responses — Standard method only.
| Endpoint | Method |
|---|---|
/v3/ai_optimization/claude/tasks_post | POST |
/v3/ai_optimization/claude/tasks_ready | GET |
/v3/ai_optimization/claude/tasks_fixed | GET |
/v3/ai_optimization/claude/task_get/{id} | GET |
Gemini LLM Responses (4 endpoints) + LLM Scraper (6 endpoints)
See Gemini Responses
Perplexity LLM Responses (1 endpoint)
| Endpoint | Method |
|---|---|
/v3/ai_optimization/perplexity/live | POST |
AI Keyword Data (2 endpoints)
See AI Keyword Data
| Endpoint | Method |
|---|---|
/v3/ai_optimization/ai_keyword_data/live | POST |
/v3/ai_optimization/ai_keyword_data/locations | GET |
Supported Platforms
| Platform | LLM Responses | LLM Scraper | LLM Mentions |
|---|---|---|---|
| ChatGPT (OpenAI) | Yes (Standard) | Yes (Live + Standard) | Yes |
| Claude (Anthropic) | Yes (Standard) | No | Yes |
| Gemini (Google) | Yes (Standard) | Yes (Live + Standard) | Yes |
| Perplexity | Yes (Live only) | No | Yes |
Methods
The AI Optimization API supports two retrieval methods depending on the sub-API:
Live method — Instant results in a single POST request. No separate GET request needed. Used by LLM Mentions API and AI Keyword Data API. Also available for LLM Responses on supported platforms.
Standard method — Asynchronous: POST to set task, GET to retrieve results. More affordable than Live. Supports pingback_url and postback_url for webhook-style delivery. Used by LLM Responses and LLM Scraper APIs on platforms where Live is not available.
| Sub-API | Live | Standard |
|---|---|---|
| LLM Responses | Yes (platform-dependent) | Yes |
| LLM Scraper | No | Yes |
| AI Keyword Data | Yes | No |
| LLM Mentions | Yes | No |
Execution Times
- Live method: Up to 120 seconds per request (LLM response generation takes time)
- Standard method: May take up to 72 hours to complete
Rate Limits
- Up to 2,000 API calls per minute
- Maximum 30 simultaneous Live requests per account per platform
Quick Authentication Example
bash
curl --request POST \
--url https://api.dataforseo.com/v3/ai_optimization/llm_mentions/search/live \
--header 'Authorization: Basic BASE64(login:password)' \
--header 'Content-Type: application/json' \
--data '[{"keyword": "your brand name", "location_code": 2840, "language_code": "en"}]'Python Setup
python
import requests
from requests.auth import HTTPBasicAuth
import json
LOGIN = "your_login"
PASSWORD = "your_password"
def ai_optimization_request(path, payload):
url = f"https://api.dataforseo.com/v3/ai_optimization/{path}"
response = requests.post(
url,
auth=HTTPBasicAuth(LOGIN, PASSWORD),
headers={"Content-Type": "application/json"},
data=json.dumps(payload)
)
return response.json()Sandbox Testing
DataForSEO Sandbox is available for free testing. Sandbox requests return mock data in the same schema as production and do not consume credits.
Pricing
Cost varies by sub-API and method. Live method requests are priced higher than Standard. Check your account dashboard for current per-request pricing and spending summaries.