Appearance
Gemini LLM Responses 10 Endpoints
Query Google Gemini through DataForSEO's AI Optimization API. Gemini is covered by two sub-APIs: LLM Responses (structured output) and LLM Scraper (raw scraped results from Google's AI-powered search).
Endpoints
Gemini LLM Responses (4 endpoints)
| Call Name | Method | Endpoint |
|---|---|---|
| Set Gemini Tasks | POST | /v3/ai_optimization/gemini/tasks_post |
| Get Completed Tasks | GET | /v3/ai_optimization/gemini/tasks_ready |
| Get Re-parsed Tasks | GET | /v3/ai_optimization/gemini/tasks_fixed |
| Task GET | GET | /v3/ai_optimization/gemini/task_get/{id} |
Gemini LLM Scraper (6 endpoints)
The Gemini scraper retrieves actual results from Google's AI-powered search interface (formerly Bard, now Gemini in Search).
| Call Name | Method | Endpoint |
|---|---|---|
| Set Gemini Scraper Tasks | POST | /v3/ai_optimization/gemini/llm_scraper/task_post |
| Get Completed Scraper Tasks | GET | /v3/ai_optimization/gemini/llm_scraper/tasks_ready |
| Get Re-parsed Scraper Tasks | GET | /v3/ai_optimization/gemini/llm_scraper/tasks_fixed |
| Task GET Scraper | GET | /v3/ai_optimization/gemini/llm_scraper/task_get/{id} |
| Live Scraper | POST | /v3/ai_optimization/gemini/llm_scraper/live |
| Locations | GET | /v3/ai_optimization/gemini/llm_scraper/locations |
Method
Gemini LLM Responses: Standard (async) — POST to set task, GET to retrieve.
Gemini LLM Scraper: Supports both Standard and Live. Use Live for instant results (single query). Use Standard for bulk/batch work.
Use Cases
- Determine whether a brand is cited in Gemini's AI-generated answers
- Compare Gemini recommendations to ChatGPT and Claude for the same query
- Track which competitor domains Gemini links to in its responses
- Monitor Gemini's shopping and local recommendations for a product category
LLM Responses 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"
# Post task
r = requests.post(
f"{BASE}/v3/ai_optimization/gemini/tasks_post",
auth=auth,
headers={"Content-Type": "application/json"},
json=[{
"keyword": "who are the best local roofers in Dallas?",
"location_code": 2840,
"language_code": "en"
}]
)
task_id = r.json()["tasks"][0]["id"]
print(f"Task: {task_id}")LLM Scraper Example (Live)
python
r = requests.post(
f"{BASE}/v3/ai_optimization/gemini/llm_scraper/live",
auth=auth,
headers={"Content-Type": "application/json"},
json=[{
"keyword": "roofing contractor Dallas TX",
"location_code": 2840,
"language_code": "en"
}]
)
result = r.json()["tasks"][0]["result"][0]
print(result.get("response_text", "No response"))Response Fields
| Field | Type | Description |
|---|---|---|
keyword | string | Query submitted |
response_text | string | Gemini's full text response |
brands_mentioned | array | Brands detected in response |
urls_mentioned | array | URLs cited |
se_type | string | "gemini" |
Pricing
~$0.01 per LLM Responses task. LLM Scraper pricing varies — Live method costs more than Standard. Check account dashboard.
Notes
- Gemini is the only LLM provider with both a Responses API and a Scraper API — the scraper returns what users actually see in Google's AI-powered search UI
- The scraper is more representative of real AI Overview results than the structured Responses API
- Run
llm_scraper/livefor instant competitive checks; usetask_postfor bulk scheduled pulls