← Back to SearchAPI
THE DEVELOPER’S STARTING POINT

A search query.
A world of useful data.

Understand the request, explore the response and see where SearchAPI fits into your application. One HTTP call is the starting point.

INTEGRATION GUIDE · PREVIEW
A note before you build. These examples describe the intended integration surface, not a live API sandbox. API access is provisioned by request. We’ll confirm your endpoint, authentication method, supported parameters, limits and response schema with your access details. Request API access ↗

Search data, without the browser farm.

SearchAPI retrieves real-time Google search engine results pages (SERPs) and returns structured JSON. Instead of parsing HTML or maintaining browser infrastructure, your application works with fields such as result titles, URLs, snippets and positions.

Use it as a search data layer for SEO monitoring, market research and applications that need current web context. SearchAPI returns search results; it is not a full-page web crawler or a generated-answer service.

01 / Your first request

After receiving access, store your API key in a server-side environment variable. This example sends a Google search query with a bearer credential. Use the endpoint and authentication instructions from your access email if they differ.

cURL · REQUEST EXAMPLE
curl --get 'https://api.searchapi.bid/v1/search' \
 -H "Authorization: Bearer $SEARCHAPI_KEY" \
 --data-urlencode 'engine=google' \
 --data-urlencode 'q=best coffee near me'

Set SEARCHAPI_KEY locally. Never put a real key in a public repository or client-side bundle.

Use it from Python

Install requests in your project, then handle unsuccessful HTTP responses before parsing the result.

PYTHON · SERVER-SIDE EXAMPLE
import os
import requests

response = requests.get(
 "https://api.searchapi.bid/v1/search",
 headers={"Authorization": f"Bearer {os.environ['SEARCHAPI_KEY']}"},
 params={"engine": "google", "q": "best coffee near me"},
 timeout=30,
)
response.raise_for_status()
data = response.json()

for result in data.get("organic_results", []):
 print(result.get("title"), result.get("link"))

Use it from JavaScript

This example uses server-side JavaScript with a modern runtime that supports fetch. Your API key belongs on your server, not in a browser.

JAVASCRIPT · SERVER-SIDE EXAMPLE
const params = new URLSearchParams({
 engine: "google",
 q: "best coffee near me",
});

const response = await fetch(
 `https://api.searchapi.bid/v1/search?${params}`,
 { headers: { Authorization: `Bearer ${process.env.SEARCHAPI_KEY}` } }
);
if (!response.ok) throw new Error(`Search request failed: ${response.status}`);
const data = await response.json();

for (const result of data.organic_results ?? []) {
 console.log(result.title, result.link);
}

02 / Keep your key on your server.

API keys identify your access and usage. Treat them as secrets. Read the key from an environment variable or secret manager, use HTTPS and call the API from your backend.

If you believe a key has been exposed, contact support@searchapi.bid for replacement guidance. Do not include the key in your support email.

03 / Shape the search.

The basic request is a search engine and a query. Geography and language let you make the search relevant to a particular audience. Exact supported parameter names, values and locations are confirmed with API access.

ParameterPurposeExample
engineSearch engine used for the request.google
qThe search query. URL-encode it when constructing a request.best coffee near me
Geo targetingSearch country or supported location.your target market
LanguageThe search language or locale.English

This is an integration overview, not an exhaustive parameter specification. Do not assume a country/language parameter name until it is confirmed for your endpoint.

04 / Work with the JSON.

Responses separate the search context from the result types. The field table below is an illustrative schema overview; exact fields are confirmed with access.

FieldWhat it represents
search_parametersContext about the search request.
organic_resultsOrganic listings, with fields such as position, title, link and snippet.
adsPaid search listings when present in the SERP.
people_also_askRelated question blocks when present.
Rich snippetsAdditional information attached to results when available. Exact fields depend on the result type and confirmed schema.

Not every query returns ads, related questions or rich snippets. Handle missing fields and empty arrays defensively. Do not treat a result’s position as a guarantee that search rankings stay the same.

05 / Build a good citizen.

Start with bounded concurrency.

Use the usage and throughput limits supplied with your plan. Queue work rather than launching unbounded requests, and set request timeouts appropriate to your workflow.

Retry selectively.

Handle failures explicitly. Use limited retries with backoff for temporary problems and respect any retry guidance returned by your confirmed endpoint. Do not retry invalid credentials or malformed requests endlessly.

Keep search input purposeful.

Avoid sending personal or sensitive data unnecessarily in queries. Validate user input, keep credentials out of logs and decide how long your own application needs to retain results.

Expect the web to change.

Search results vary over time and by location, language and query. Preserve the search context when comparing results, and validate response fields before using them downstream.

06 / When something looks off.

Check the endpoint and request format against your access details first. Make sure your key is loaded, the query is encoded and your usage is within the confirmed limits.

If a response is missing an expected result type, that feature may not be present in the SERP. If you need help, send the query, approximate request time, HTTP status and a redacted request or response to support@searchapi.bid. Do not send API keys or sensitive query data.

The definitive error schema and rate-limit behavior will be documented with the provisioned API. We do not publish unverified status codes or service-level claims here.

Let’s get your integration moving.

Tell us what you’re building, where you need to search and how much volume you expect. We’ll help confirm the right access and plan.

Request API access ↗ · Explore pricing · Contact support