Build SEO tools on live Google results
Most SEO tool features start from the results page: who ranks for a keyword, with which title and snippet, and which competitors appear across a keyword set. BestSERP returns those results as JSON for any country, at one credit per page of 10, so a weekly analysis of 500 keywords costs $1 a month.
Last updated:
Key takeaways
- 500 keywords, weekly: 2,000 credits, about $1.00 a month.
- 5,000 keywords, weekly: 20,000 credits, about $10.00 a month.
- Built on the Google Search API and the Google Images API and the Google Videos API.
- A complete Python example is below: set BESTSERP_API_KEY and run it.
The problem
Keyword research, content briefs and competitor analysis all need to know what Google shows today. Third-party keyword databases are refreshed on their schedule, not yours, and rarely cover every country.
With live results you can compute what you need: which domains dominate a topic, how long the ranking titles are, which pages a competitor ranks with, and how that changes week to week.
Suggested architecture
- 1
Collect
Search each keyword of a project with /search, in the country and language of the market.
- 2
Normalize
Keep position, domain, link, title and snippet. The domain field is already the host name without www.
- 3
Analyze
Count domains across keywords (share of voice), compare title lengths, list the pages each competitor ranks with.
- 4
Present
Show tables and trends. Store raw results so you can add new metrics later without searching again.
Complete example
BESTSERP_API_KEY and run it with Python 3.9+ and requests.import os
import time
import requests
API = "https://api.bestserp.com"
HEADERS = {"X-API-KEY": os.environ["BESTSERP_API_KEY"]}
def search(endpoint: str, **body) -> dict:
"""POST one search and return the JSON. Polls while the API answers 202 (still running)."""
r = requests.post(f"{API}/{endpoint}", headers=HEADERS, json={"timeout": 120, **body}, timeout=130)
while r.status_code == 202:
time.sleep(2)
r = requests.get(f"{API}/requests/{r.json()['requestId']}", headers=HEADERS, timeout=30)
r.raise_for_status()
return r.json()
from collections import Counter, defaultdict
KEYWORDS = ["serp api", "google search api", "rank tracker api", "keyword rank checker"]
COUNTRY = "us"
appearances = Counter() # domain -> number of keywords it ranks for (top 10)
best_page = defaultdict(dict) # domain -> keyword -> (position, link)
for keyword in KEYWORDS:
for item in search("search", q=keyword, gl=COUNTRY, hl="en").get("organic", [])[:10]:
domain = item.get("domain")
if not domain:
continue
appearances[domain] += 1
best_page[domain].setdefault(keyword, (item["position"], item["link"]))
time.sleep(1)
print(f"Share of voice for {len(KEYWORDS)} keywords ({COUNTRY}):")
for domain, count in appearances.most_common(10):
print(f"{count:>2}/{len(KEYWORDS)} {domain}")
for keyword, (position, link) in best_page[domain].items():
print(f" #{position:<3} {keyword} {link}")What it costs
| Scenario | Credits per month | Cost per month |
|---|---|---|
| 500 keywords, weekly | 2,000 | $1.00 |
| 5,000 keywords, weekly | 20,000 | $10.00 |
| 5,000 keywords, daily | 150,000 | $75.00 |
Frequently asked questions
Can I resell features built on the API?
Do you return search volume or keyword difficulty?
How do I analyze title lengths like Google displays them?
Can I check many countries?
APIs used
- Google Search APIOrganic results with titles, links and snippets, plus the video carousel and Top stories.
- Google Images APIImage results with full-size image URLs, dimensions and the page that hosts each image.
- Google Videos APIVideo results with duration, channel and platform.
- PricingCredits, refunds and a cost calculator.
Start with 3,000 free searches
No credit card. Sign in with Google, create a key, send your first request.