AI Optimization
Gemini Scraper
See what Google Gemini says about any topic — scrape AI responses with source references.
Pricing, live playground and use cases: Gemini LLM Scraper API on YepAPI
POST
$0.05/call/v1/seo/ai/geminiUsage
const res = await fetch('https://api.yepapi.com/v1/seo/ai/gemini', {
method: 'POST',
headers: {
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({ keyword: 'best seo tools for startups', location: 'us' }),
});
const { data } = await res.json();
console.log(data.response);curl -X POST https://api.yepapi.com/v1/seo/ai/gemini \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"keyword": "best seo tools for startups", "location": "us"}'Request Body
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
keyword | string | Yes | The question or query to ask Gemini | — |
location | string | No | Two-letter country code, e.g. "us", "gb" (or "uk"), "de". An unknown code falls back to "us". | "us" |
language | string | No | Answer language, e.g. "de". Left at "en", the country's main language is used. | "en" |
fresh | boolean | No | Skip the cached answer and ask Gemini again (see Caching) | false |
Response
{
"ok": true,
"data": {
"keyword": "best seo tools for startups",
"model": "gemini",
"response": "For startups, the right SEO tool depends on budget and team size:\n\n* **Example SEO** — ...",
"references": [
{
"title": "SEO Tools for Startups",
"url": "https://www.example.com/seo-tools-for-startups",
"domain": "www.example.com",
"snippet": "A comparison of SEO tools for small teams..."
}
]
}
}Response Fields
| Field | Type | Description |
|---|---|---|
ok | boolean | Whether the request succeeded |
data.keyword | string | The query that was sent to Gemini |
data.model | string | Always "gemini" |
data.response | string | Gemini's full answer, in Markdown (headings, lists and links) |
data.references | array | Pages the answer cites. Can be empty. |
data.references[].title | string | Title of the cited page |
data.references[].url | string | URL of the cited page |
data.references[].domain | string | Domain of the cited page |
data.references[].snippet | string | Text quoted from the page; often empty |
Caching
Responses are cached for 1 hour per keyword, location and language: the same request within the hour returns the same answer, instantly. Send "fresh": true to ask again; the new answer replaces the cached one.
Errors
| Status | Code | When |
|---|---|---|
503 | UPSTREAM_ERROR | Gemini gave no answer or could not be reached. Retry. |
Failed calls are not charged.
Under the Hood
Scrapes Google Gemini for AI visibility monitoring.