Gemini API
The Gemini API provides real-time access to Google Gemini's AI-generated answers, returning structured text blocks, generated markdown, cited grounding reference links, follow-up related_questions, inline images, inline videos, and typed cards (weather, finance, …) rendered alongside the answer.
API Parameters
Search Query
-
- Name
-
q - Required
- Required
- Description
-
This parameter is used for the terms you want to ask Gemini. The answer is returned in the same language as your query - for example, queries in German will receive answers in German, queries in Spanish will receive answers in Spanish.
Engine
-
- Name
-
engine - Required
- Required
- Description
-
Parameter defines an engine that will be used to retrieve real-time data. It must be set to
gemini.
API key
-
- Name
-
api_key - Required
- Required
- Description
-
The
api_keyauthenticates your requests. Use it as a query parameter (https://www.searchapi.io/api/v1/search?api_key=YOUR_API_KEY) or in the Authorization header (Bearer YOUR_API_KEY).
Zero Data Retention
-
- Name
-
zero_retention - Enterprise Only
- Enterprise Only
- Required
- Optional
- Description
-
Set this parameter to
trueto disable all logging and persistent storage. No request parameters, HTML, or JSON responses are stored or logged. Suitable for high-compliance use cases. Debugging and support may be limited while enabled.
API Examples
Text Blocks
https://www.searchapi.io/api/v1/search?engine=gemini&q=best+web+scraping+companies
- Python
- Node
- Ruby
- Java
- Go
- PHP
- Bash
- R
- Kotlin
- Swift
- C#
- C
- C++
- requests
import requests
url = "https://www.searchapi.io/api/v1/search"
params = {
"engine": "gemini",
"q": "best web scraping companies"
}
response = requests.get(url, params=params)
print(response.text)
{
"search_metadata": {
"id": "search_7kQxV4nRb2WmZpL9dJ3sYtF6",
"status": "Success",
"created_at": "2026-08-05T10:15:00Z",
"request_time_taken": 9.11,
"parsing_time_taken": 0.01,
"total_time_taken": 9.13,
"request_url": "https://gemini.google.com/app",
"html_url": "https://www.searchapi.io/api/v1/searches/search_7kQxV4nRb2WmZpL9dJ3sYtF6.html",
"json_url": "https://www.searchapi.io/api/v1/searches/search_7kQxV4nRb2WmZpL9dJ3sYtF6"
},
"search_parameters": {
"engine": "gemini",
"q": "best web scraping companies"
},
"text_blocks": [
{
"type": "paragraph",
"answer": "When looking for the best web scraping companies or service providers, the right choice depends heavily on your technical capability, scale, and whether you want raw data infrastructure (APIs and proxies) or fully managed data delivery (done-for-you datasets).",
"reference_indexes": [
0,
...
]
},
...
],
"markdown": "When looking for the best web scraping companies or service providers, the right choice depends heavily on your technical capability, scale, and whether you want **raw data infrastructure** (APIs and proxies) or **fully managed data delivery** (done-for-you datasets). \n\nThe industry leaders are categorized below by their primary strengths:\n\n---\n\n### 1. Enterprise Infrastructure & High-Scale APIs\n*Best for engineering teams, large-scale data projects, and bypassing aggressive anti-bot protections (Cloudflare, Akamai, etc.).*\n\n* **Bright Data**\n * **Best For:** Massive enterprise scale and highest success rates.\n * **Overview:** Widely considered the industry standard. It features one of the largest proxy networks globally (residential, datacenter, and mobile IPs across 195+ countries), advanced Web Scraper APIs, a cloud scraping infrastructure, and ready-to-use datasets. \n* **Oxylabs**\n * **Best For:** Premium proxy-backed scraping and robust performance.\n * **Overview:** Known for its high-performance Web Scraper API, AI-powered unblockers, and exceptional stability. Excellent for targeted e-commerce, search engine results pages (SERP), and heavy data extraction needs.\n* **Zyte (formerly Scrapinghub)**\n * **Best For:** AI-powered structured data extraction and speed.\n * **Overview:** Creators of the popular open-source framework *Scrapy*. Zyte provides a powerful cloud-based scraping API that handles JavaScript-heavy sites and complex anti-scraping mechanisms automatically.\n\n---\n\n### 2. Developer-Friendly & AI/LLM-Ready Tools\n*Best for software developers, AI applications, and RAG pipelines looking for clean data output.*\n\n* **Firecrawl**\n * **Best For:** Feeding web data directly into LLMs and AI agents.\n * **Overview:** An API-first tool that takes a URL and converts the page into clean, LLM-ready Markdown or structured JSON, bypassing the headache of parsing raw HTML.\n* **Apify**\n * **Best For:** Cloud automation and community-built scraper \"Actors\".\n * **Overview:** A versatile web scraping and automation platform. It functions like an app store where you can deploy pre-built scrapers for major websites (like Google Maps, Amazon, or social media) or write custom JavaScript scrapers.\n\n---\n\n### 3. No-Code & Mid-Market Platforms\n*Best for analysts, marketers, and teams without dedicated engineering resources.*\n\n* **Decodo (formerly Smartproxy)**\n * **Best For:** Cost-effective, high-value scraping and proxy APIs.\n * **Overview:** A great mid-market alternative that balances performance with budget-friendly pricing tiers for social media, e-commerce, and general web scraping.\n* **Octoparse / ParseHub**\n * **Best For:** Desktop-based visual scrapers.\n * **Overview:** Point-and-click software that lets you visually select data fields on a webpage to build automated scrapers without writing code.\n\n---\n\n### 4. Fully Managed \"Done-For-You\" Data Providers\n*Best for businesses that want finished datasets delivered on a schedule without managing any infrastructure.*\n\n* **ScrapeHero / ScrapeInsight / Grepsr**\n * **Best For:** Zero-maintenance, custom data delivery.\n * **Overview:** Instead of selling you software or APIs, these companies act as data partners. You tell them what data you need, how often you need it, and in what format (CSV, JSON, database sync), and their teams build, maintain, and monitor the pipelines for you.\n\n---\n\n### Summary Checklist: Which one should you pick?\n* Choose **Bright Data** or **Oxylabs** if you need enterprise-grade infrastructure to handle tough anti-bot walls at scale.\n* Choose **Firecrawl** or **Apify** if you are a developer building modern applications or AI workflows.\n* Choose **Octoparse** or **Decodo** if you want an affordable, self-service route.\n* Choose **ScrapeHero** or **ScrapeInsight** if you simply want the data delivered cleanly to your inbox or cloud storage without dealing with code or blocked IPs.",
"reference_links": [
{
"index": 0,
"title": "Best Data Extraction Solutions in 2026: Top Picks Compared",
"link": "https://smart-webtech.com/blog/data-extraction-solutions/",
"source": "Smart WebTech",
"snippet": "ScrapeInsight is a full-service managed web scraping and data integration provider that delivers finished datasets rather than tools. Unlike developer APIs like...",
"favicon": "https://encrypted-tbn2.gstatic.com/favicon-tbn?q=tbn%3AANd9GcRjIWpb8TYJ3iY00U--bVPAX7bRUy2qwTi6-s1sS...",
"rank": 9
},
...
],
"response_metadata": {
"model": "3.5 Flash-Lite",
"language": "en",
"conversation_token": "eyJjX2lkIjoiY19hYmYxNzM3ZWNkYjk5NjJmIiwicl9pZCI6InJfYmFkMGJiM2RkMTU3ZWMyYyIsInJjX2lkIjoicmNfNjU1OTU5OTU5OWZlNDExOSJ9"
}
}
Cards
https://www.searchapi.io/api/v1/search?engine=gemini&q=aapl+stock+price
- Python
- Node
- Ruby
- Java
- Go
- PHP
- Bash
- R
- Kotlin
- Swift
- C#
- C
- C++
- requests
import requests
url = "https://www.searchapi.io/api/v1/search"
params = {
"engine": "gemini",
"q": "aapl stock price"
}
response = requests.get(url, params=params)
print(response.text)
{
"search_metadata": {
"id": "search_3mHtY8pKw5NxQbR2vL7gCsD4",
"status": "Success",
"created_at": "2026-08-05T10:15:00Z",
"request_time_taken": 4.9,
"parsing_time_taken": 0.01,
"total_time_taken": 4.91,
"request_url": "https://gemini.google.com/app",
"html_url": "https://www.searchapi.io/api/v1/searches/search_3mHtY8pKw5NxQbR2vL7gCsD4.html",
"json_url": "https://www.searchapi.io/api/v1/searches/search_3mHtY8pKw5NxQbR2vL7gCsD4"
},
"search_parameters": {
"engine": "gemini",
"q": "aapl stock price"
},
"text_blocks": [
{
"type": "paragraph",
"answer": "Apple Inc. (NASDAQ: AAPL) is trading around $310.50 to $310.98.",
"reference_indexes": [
0,
...
]
},
...
],
"markdown": "Apple Inc. (**NASDAQ: AAPL**) is trading around **$310.50 to $310.98**. \n\n### **Key Stock Metrics**\n* **Previous Close:** $309.38\n* **Day's Range:** $305.67 – $311.37\n* **52-Week Range:** $202.16 – $344.57\n* **Market Capitalization:** ~$4.54 Trillion\n* **P/E Ratio:** ~35.7\n* **Dividend Yield:** ~0.35%",
"reference_links": [
{
"index": 0,
"title": "Buy or Sell Apple Stock - AAPL Stock Price Quote & News - Robinhood",
"link": "https://robinhood.com/us/en/stocks/AAPL/",
"source": "Robinhood",
"snippet": "Apple(AAPL) stock is priced at $310.57, giving the company a market capitalization of 4.59T. It carries a P/E multiple of 34.78 and pays a dividend yield of 0.3...",
"favicon": "https://encrypted-tbn1.gstatic.com/favicon-tbn?q=tbn%3AANd9GcQHI0d6SGYXgL5YDOIl_94FoPtk5JloeyMwoZyY8...",
"rank": 9
},
...
],
"cards": [
{
"type": "finance",
"symbol": "AAPL",
"name": "Apple Inc",
"price": 310.985,
"currency": "USD",
"exchange": "NASDAQ",
"previous_close": 309.38,
"volume": 12761447,
"dividend_yield": 0.346665,
"eps": 8.72328,
"quote_time": "2026-08-05T15:10:00Z",
"change": 1.61,
"change_percent": 0.52,
"price_open": 309.36,
"price_high": 311.37,
"price_low": 305.67,
"pe_ratio": 35.713631,
"market_cap": 4538498256736,
"price_52w_high": 344.5699,
"price_52w_low": 205.59
},
...
],
"response_metadata": {
"model": "3.5 Flash-Lite",
"language": "en",
"conversation_token": "eyJjX2lkIjoiY185MGNiZWI5OTc1NGJkMDBmIiwicl9pZCI6InJfMjY0ZWVmNjI3OGRjZmFmYyIsInJjX2lkIjoicmNfZTQ3YWQ4NjdmMDZjYWVjZCJ9"
}
}
Inline Images
https://www.searchapi.io/api/v1/search?engine=gemini&q=describe+the+northern+lights+and+show+pictures
- Python
- Node
- Ruby
- Java
- Go
- PHP
- Bash
- R
- Kotlin
- Swift
- C#
- C
- C++
- requests
import requests
url = "https://www.searchapi.io/api/v1/search"
params = {
"engine": "gemini",
"q": "describe the northern lights and show pictures"
}
response = requests.get(url, params=params)
print(response.text)
{
"inline_images": [
{
"title": "northern lights aurora borealis",
"link": "https://www.icelandtours.is/blog/northern-lights-aurora-borealis-iceland/",
"original": "https://res.cloudinary.com/icelandtours/image/upload/v1667309946/northern_lights_above_glacier_lagoo...",
"thumbnail": "https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcRW-pz-4AK3qoz1Xr08K-YuoIsp3ur2UekXSrVfXjOYXRuz...",
"width": 1920,
"height": 1080
},
...
]
}
Inline Videos
https://www.searchapi.io/api/v1/search?engine=gemini&q=video+tutorial+changing+a+bike+tire
- Python
- Node
- Ruby
- Java
- Go
- PHP
- Bash
- R
- Kotlin
- Swift
- C#
- C
- C++
- requests
import requests
url = "https://www.searchapi.io/api/v1/search"
params = {
"engine": "gemini",
"q": "video tutorial changing a bike tire"
}
response = requests.get(url, params=params)
print(response.text)
{
"inline_videos": [
{
"position": 1,
"title": "How to: Change a Bike Tire & Tube",
"link": "https://www.youtube.com/watch?v=XMXEPtkqZ7s",
"video_id": "XMXEPtkqZ7s",
"channel": "Save Money TV",
"description": "Changing your bike tire and tube is easy with just a few simple tools. We cover the entire process in this video, and for additional help with removing the rear tire, we suggest this video:",
"views": 1096,
"duration": "8:04",
"date": "2024-09-21",
"thumbnail": "https://i.ytimg.com/vi/XMXEPtkqZ7s/maxresdefault.jpg"
},
...
]
}