SerpBase

SerpApi-compatible endpoint

Code written for SerpApi works here by changing only the base URL: the same engine names, parameters and response fields, at SerpBase prices.

Switching over

Replace https://serpapi.com/search.json with the URL below and use your SerpBase key as api_key. Requests are GET, as on SerpApi. The key can also go in the X-API-Key header, which keeps it out of URLs and logs.

BASH
curl "https://api.serpbase.dev/google/serpapi/search.json?engine=google&q=coffee&gl=us&hl=en" \
  -H "X-API-Key: YOUR_API_KEY"

curl "https://api.serpbase.dev/google/serpapi/search.json?engine=amazon&k=headphones&amazon_domain=amazon.com" \
  -H "X-API-Key: YOUR_API_KEY"
PYTHON
import requests

res = requests.get(
    "https://api.serpbase.dev/google/serpapi/search.json",
    headers={"X-API-Key": "YOUR_API_KEY"},
    params={"engine": "google_news", "q": "semiconductors", "gl": "us"},
)
print(res.json()["news_results"][0]["title"])

Engines

Each engine runs on the SerpBase endpoint in the second column and costs what that endpoint costs. An engine not in this list is refused with 400.

engineRuns onCredits per request
googleGoogle Web Search1
google_imagesGoogle Images Search1
google_newsGoogle News Search1
google_videosGoogle Videos Search1
google_autocompleteGoogle Search Autocomplete1
google_shoppingGoogle Shopping Search2
google_jobsGoogle Jobs Search2
google_scholarGoogle Scholar Search2
google_patents_detailsGoogle Patent Details2
google_playGoogle Play Search1
google_play_productGoogle Play App Details1
google_trendsGoogle Trends2
google_trends_autocompleteGoogle Trends Autocomplete2
google_trends_trending_nowGoogle Trends Trending Now2
google_mapsGoogle Maps Search2
google_maps_reviewsGoogle Maps Reviews2
duckduckgoDuckDuckGo Search1
youtubeYouTube Search1
youtube_video_transcriptYouTube Video Transcripts2
amazonAmazon Product Search2
amazon_productAmazon Product Details2
amazon_autocompleteAmazon Search Autocomplete1
walmartWalmart Product Search2
walmart_productWalmart Product Details2
ebayeBay Product Search1
ebay_producteBay Product Details2
apple_productApple Product Details1

What differs from SerpApi

  • Fields are those SerpBase extracts, under SerpApi's names. A field SerpBase does not produce is left out rather than filled with a guess, so check for a key before reading it.
  • Not served: output=html (except engine=google), google_maps place lookups (use /google/maps/detail), google_trends data types other than TIMESERIES, Play stores other than apps, and SerpApi's account, archive and async APIs. no_cache, async and json_restrictor are accepted and have no effect.
  • Errors follow SerpApi: a refused request gets 400, 401 or 429 with {"error": …}; a search that ran and failed gets 200 with search_metadata.status "Error". Failed searches are not charged.