Skip to content

Claude LLM Responses 4 Endpoints

Query Anthropic's Claude model through DataForSEO's AI Optimization API. Use these endpoints to test how Claude responds to queries about your brand, service, or market — and whether your client appears in the response.

Endpoints

Call NameMethodEndpoint
Set Claude TasksPOST/v3/ai_optimization/claude/tasks_post
Get Completed TasksGET/v3/ai_optimization/claude/tasks_ready
Get Re-parsed TasksGET/v3/ai_optimization/claude/tasks_fixed
Task GETGET/v3/ai_optimization/claude/task_get/{id}

Method

Claude LLM Responses use the Standard method (async) — no Live endpoint is available.

  1. POST your prompt to tasks_post
  2. Poll tasks_ready for completed task IDs
  3. Retrieve results with task_get/{id}

Execution time: Up to 72 hours. In practice, most tasks complete within 5–30 minutes.

Use Cases

  • Test whether Claude mentions a brand when asked about a service category
  • Benchmark Claude visibility against ChatGPT and Gemini responses for the same query
  • Identify which competitors Claude recommends for a given local service query
  • Track how Claude's recommendations change month over month

Request Example

python
import os
import requests
from requests.auth import HTTPBasicAuth

auth = HTTPBasicAuth(os.environ["DATAFORSEO_LOGIN"], os.environ["DATAFORSEO_PASSWORD"])
BASE = "https://api.dataforseo.com"

# Step 1: Post task
payload = [{
    "keyword": "best roofing contractor in Dallas TX",
    "location_code": 2840,
    "language_code": "en",
    "postback_url": "https://your-server.com/webhook/claude"  # optional
}]

r = requests.post(
    f"{BASE}/v3/ai_optimization/claude/tasks_post",
    auth=auth,
    headers={"Content-Type": "application/json"},
    json=payload
)
task_id = r.json()["tasks"][0]["id"]

# Step 2: Poll for completion
import time

while True:
    ready = requests.get(f"{BASE}/v3/ai_optimization/claude/tasks_ready", auth=auth).json()
    ready_ids = [t["id"] for t in ready.get("tasks", [])]
    if task_id in ready_ids:
        break
    time.sleep(60)

# Step 3: Retrieve result
result = requests.get(
    f"{BASE}/v3/ai_optimization/claude/task_get/{task_id}",
    auth=auth
).json()

response_text = result["tasks"][0]["result"][0]["items"][0]["response_text"]
print(response_text)

Response Fields

FieldTypeDescription
keywordstringThe query sent to Claude
response_textstringClaude's full response
brands_mentionedarrayBrands detected in the response
urls_mentionedarrayURLs included in the response
sentimentstringOverall sentiment of the response
se_typestringAlways "claude"

Pricing

Standard method tasks are priced per task. Claude tasks typically cost ~$0.01 per query. Check your account dashboard for current rates.

Notes

  • Use postback_url for production pipelines — avoids polling overhead
  • Run the same query across ChatGPT, Claude, Gemini, and Perplexity to get a cross-platform visibility picture
  • Compare responses for brand mentions using string matching or the brands_mentioned field

Internal SOP reference — not affiliated with DataForSEO.