YepAPI
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/v1/seo/ai/gemini
$0.05/call

Usage

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

ParameterTypeRequiredDescriptionDefault
keywordstringYesThe question or query to ask Gemini—
locationstringNoTwo-letter country code, e.g. "us", "gb" (or "uk"), "de". An unknown code falls back to "us"."us"
languagestringNoAnswer language, e.g. "de". Left at "en", the country's main language is used."en"
freshbooleanNoSkip 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

FieldTypeDescription
okbooleanWhether the request succeeded
data.keywordstringThe query that was sent to Gemini
data.modelstringAlways "gemini"
data.responsestringGemini's full answer, in Markdown (headings, lists and links)
data.referencesarrayPages the answer cites. Can be empty.
data.references[].titlestringTitle of the cited page
data.references[].urlstringURL of the cited page
data.references[].domainstringDomain of the cited page
data.references[].snippetstringText 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

StatusCodeWhen
503UPSTREAM_ERRORGemini gave no answer or could not be reached. Retry.

Failed calls are not charged.

Under the Hood

Scrapes Google Gemini for AI visibility monitoring.

On this page