SerpScraper Multi-Language SDK: Real-Time Google SERP API, Google AI Overview & Trends (PHP, Python, Node.js, Go)
Official multi-language client libraries for SerpScraper.Dev β The high-speed SERP API designed for developers, SEO platforms, and AI agents.
Scrape real-time Google & Bing search rankings, parse Google AI Overviews, track Google Trends, and extract web intelligence as clean, structured JSON.
SerpScraper.Dev is built from the ground up for modern developers, LLM engineers, and SEO specialists who require reliable search data at scale:
- β‘ Sub-Second Response Times: Engineered with distributed high-performance edge nodes for ultra-fast query execution.
- π‘οΈ Zero Block Guarantee: Built-in rotating residential and datacenter proxies completely bypass Cloudflare, Akamai, Google reCAPTCHA, and bot detection systems.
- π€ Native Google AI Overview Extraction: Directly extract synthesized AI answers, citation cards, and source links via the Google AI Overview API β perfect for RAG and AI search workflows.
- π Real-Time Google Trends: Monitor breaking news, trending searches, and historical search volume timelines with the Google Trends API.
- π Global Geolocation Targeting: Precise local search emulation across 190+ countries (
gl), languages (hl), and regional domains (google.co.uk,google.co.jp, etc.). - π¦ Zero External Dependencies: All SDKs in this monorepo rely strictly on standard libraries (cURL, urllib, native fetch, net/http) for maximum security and zero dependency conflicts.
This repository provides official client libraries across four major programming languages:
serpscraper/
βββ php/ # π PHP SDK (Composer: tienphat/serpscraper-php) -> php/README.md
βββ python/ # π Python SDK (PyPI: serpscraper-dev) -> python/README.md
βββ nodejs/ # π© Node.js / TypeScript SDK (npm: serpscraper) -> nodejs/README.md
βββ go/ # πΉ Go SDK (Go Modules: .../go) -> go/README.md
βββ composer.json # Root Composer support for backward-compatible installs
βββ README.md
| Language | Package Manager | Installation | Detailed Guide |
|---|---|---|---|
| PHP | Packagist / Composer | composer require tienphat/serpscraper-php |
php/README.md |
| Python | PyPI / pip | pip install serpscraper-dev |
python/README.md |
| Node.js / TS | npm / yarn / pnpm | npm install serpscraper |
nodejs/README.md |
| Go | Go Modules | go get github.com/tienphat/serpscraper.dev/go |
go/README.md |
Grab your free API key at serpscraper.dev.
composer require tienphat/serpscraper-phpuse SerpScraper\SerpScraperClient;
$client = new SerpScraperClient('YOUR_API_KEY');
// 1. Google Web Search & AI Overview
$results = $client->googleSearch('best generative ai tools', ['gl' => 'US', 'hl' => 'en']);
foreach ($results as $item) {
echo "#{$item['position']} {$item['title']} β {$item['link']}\n";
}
if ($summary = $results->summary()) {
echo "\n[Google AI Overview]:\n{$summary}\n";
}
// 2. Google Trends Real-Time
$trends = $client->trendsNow(['gl' => 'US']);
echo "Top Trend: " . $trends->first()['keyword'] . "\n";π Read the complete PHP SDK Documentation.
pip install serpscraper-devfrom serpscraper import SerpScraperClient
client = SerpScraperClient("YOUR_API_KEY")
# 1. Google Web Search & AI Overview
results = client.google_search("best generative ai tools", gl="US", hl="en")
for item in results:
print(f"#{item['position']} {item['title']} β {item['link']}")
if results.summary:
print(f"\n[Google AI Overview]:\n{results.summary}")
# 2. Google Trends Real-Time
trends = client.trends_now(gl="US")
print(f"Top Trend: {trends.first['keyword']}")π Read the complete Python SDK Documentation.
npm install serpscraperconst { SerpScraperClient } = require('serpscraper');
const client = new SerpScraperClient('YOUR_API_KEY');
async function main() {
// 1. Google Web Search & AI Overview
const res = await client.googleSearch('best generative ai tools', { gl: 'US', hl: 'en' });
for (const item of res) {
console.log(`#${item.position} ${item.title} β ${item.link}`);
}
if (res.summary) {
console.log('\n[Google AI Overview]:\n', res.summary);
}
// 2. Google Trends Real-Time
const trends = await client.trendsNow({ gl: 'US' });
console.log('Top Trend:', trends.first?.keyword);
}
main();π Read the complete Node.js SDK Documentation.
go get github.com/tienphat/serpscraper.dev/gopackage main
import (
"context"
"fmt"
"time"
serpscraper "github.com/tienphat/serpscraper.dev/go"
)
func main() {
client, _ := serpscraper.NewClient("YOUR_API_KEY")
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()
// 1. Google Web Search & AI Overview
resp, _ := client.GoogleSearch(ctx, "best generative ai tools",
serpscraper.WithGL("US"),
serpscraper.WithHL("en"),
)
for _, item := range resp.Data {
fmt.Printf("#%d %s β %s\n", item.Position, item.Title, item.Link)
}
if summary := resp.Summary(); summary != "" {
fmt.Printf("\n[Google AI Overview]:\n%s\n", summary)
}
// 2. Google Trends Real-Time
trends, _ := client.TrendsNow(ctx, serpscraper.WithGL("US"))
if len(trends.Data) > 0 {
fmt.Printf("Top Trend: %s\n", trends.Data[0].Keyword)
}
}π Read the complete Go SDK Documentation.
All SDKs map directly to the high-performance endpoints hosted at serpscraper.dev:
| API Feature | PHP / Node / Go Method | Python Method | Landing Page & Documentation |
|---|---|---|---|
| Google Search API | googleSearch() / GoogleSearch |
google_search() |
Google Search API |
| Web Search API | webSearch() / WebSearch |
web_search() |
Web Search API (Bing / Multi-Engine) |
| Google AI Overview API | aioSearch() / AioSearch |
aio_search() |
Google AI Overview API |
| Google Trends Real-Time | trendsNow() / TrendsNow |
trends_now() |
Google Trends API |
| Google Trends Interest | trendsInterest() / TrendsInterest |
trends_interest() |
Google Trends Interest Over Time |
| Image Search API | imageSearch() / ImageSearch |
image_search() |
Image Search API |
| Video Search API | videoSearch() / VideoSearch |
video_search() |
Video Search API |
| News Search API | newsSearch() / NewsSearch |
news_search() |
News Search API |
| Shopping Search API | shoppingSearch() / ShoppingSearch |
shopping_search() |
Shopping Search API |
| Google Scholar API | scholarSearch() / ScholarSearch |
scholar_search() |
Google Scholar API |
| Google Maps API | mapsSearch() / MapsSearch |
maps_search() |
Google Maps & Places API |
| Reviews Search API | reviewsSearch() / ReviewsSearch |
reviews_search() |
Customer Reviews Search API |
| SERP Autocomplete | autocomplete() / Autocomplete |
autocomplete() |
SERP Autocomplete API |
| Webpage Extractor | extractWebpage() / ExtractWebpage |
extract_webpage() |
Webpage Content Extractor API |
| IP Geolocation API | ipLookup() / IPLookup |
ip_lookup() |
IP Geolocation & Threat API |
| Exchange Rate API | exchangeRate() / ExchangeRate |
exchange_rate() |
Fiat Exchange Rate API |
| Crypto Price API | cryptoPrice() / CryptoPrice |
crypto_price() |
Cryptocurrency Price API |
| Domain Intelligence | domainInfo() / DomainInfo |
domain_info() |
Domain Intelligence & WHOIS API |
| SEO Domain Overview | seoDomainOverview() / SEODomainOverview |
seo_domain_overview() |
SEO API docs |
| SEO Backlinks | seoBacklinks() / SEOBacklinks |
seo_backlinks() |
SEO API docs |
| Keyword Metrics | seoKeywordMetrics() / SEOKeywordMetrics |
seo_keyword_metrics() |
SEO API docs |
| Keyword Suggestions | seoKeywordSuggestions() / SEOKeywordSuggestions |
seo_keyword_suggestions() |
SEO API docs |
| Proxy API | proxySession(), proxyRotate(), proxyLocations() / Proxy* |
proxy_session(), proxy_rotate(), proxy_locations() |
Rotating Proxy API |
Equip LLMs (OpenAI GPT-4o, Claude 3.5, Llama 3, Gemini 1.5) with real-time web knowledge. Extract both organic sources and synthesized Google AI Overviews with zero hallucination risk.
Monitor organic rankings, SERP features (Featured Snippets, People Also Ask, Local Packs), and track ranking fluctuations across 190+ countries with exact local IP emulation via the SERP API.
Discover viral topics before competitors with real-time trending queries from the Google Trends API. Analyze multi-year historical search interest to validate product demand.
Track product prices, availability, and merchant ratings across Google Shopping with the Shopping Search API and Reviews Search API.
1. How does SerpScraper bypass Google CAPTCHA and bot detection?
SerpScraper manages an enterprise-scale pool of rotating residential proxies and AI-driven anti-fingerprinting browsers. All CAPTCHA solving, IP rotation, and header spoofing are handled automatically on the server side, ensuring consistent 99.9% uptime and unblockable scraping.2. Can I parse Google AI Overviews with this SDK?
Yes! SerpScraper provides native parsing for Google AI Overviews (SGE). Every response object includes direct helper methods like$results->summary(), results.summary, or resp.Summary() to immediately extract AI-synthesized markdown text and cited references. Learn more at serpscraper.dev/google-ai-overview-api.
3. Are there any external runtime dependencies in these SDKs?
None. All SDKs are implemented with pure standard libraries: PHP cURL, Pythonurllib, Node.js native fetch, and Go net/http. This ensures zero dependency conflicts, lightweight footprints, and optimal security.
4. How do I obtain a free API key?
You can sign up and get your free API key instantly with generous monthly credits at serpscraper.dev.Unit and integration test suites are available in each respective language directory:
# 1. PHP (PHPUnit 11 β 67 tests, 114 assertions)
cd php && vendor/bin/phpunit
# 2. Python (unittest β 5 tests)
cd python && python -m unittest discover -s tests
# 3. Node.js (native test runner β 2 tests)
cd nodejs && npm test
# 4. Go (testing package)
cd go && go test -v ./...- π Official Website: https://serpscraper.dev
- π API Documentation: https://serpscraper.dev/docs
- π Get Free API Key: https://serpscraper.dev
- π SERP API Landing Page: https://serpscraper.dev/serp-api
- π€ Google AI Overview API: https://serpscraper.dev/google-ai-overview-api
- π Google Trends API: https://serpscraper.dev/google-trends-api
- π¬ Telegram Support: @peterpanpro
- π Issue Tracker: GitHub Issues
The SerpScraper SDK Monorepo is open-sourced software licensed under the MIT License.
