Skip to content

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SerpScraper Multi-Language SDK: Real-Time Google SERP API, Google AI Overview & Trends (PHP, Python, Node.js, Go)

SerpScraper.Dev Logo

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.

PHP 8.1+ Python 3.8+ Node.js 18+ Go 1.21+ Zero Dependencies MIT License Free API Key


🌟 Why Choose SerpScraper?

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.

πŸ“ Monorepo Structure

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

πŸš€ Quickstarts

Grab your free API key at serpscraper.dev.

🐘 1. PHP SDK

composer require tienphat/serpscraper-php
use 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.


🐍 2. Python SDK

pip install serpscraper-dev
from 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.


🟩 3. Node.js & TypeScript SDK

npm install serpscraper
const { 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.


🐹 4. Go SDK

go get github.com/tienphat/serpscraper.dev/go
package 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.


🌐 Supported APIs & Live Endpoints

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

🎯 Key Use Cases

1. πŸ€– AI Agents & Retrieval-Augmented Generation (RAG)

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.

2. πŸ“Š SEO Rank Tracking & Competitor Intelligence

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.

3. πŸ”₯ Trend Detection & Market Research

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.

4. πŸ›’ E-Commerce Price Monitoring & Review Aggregation

Track product prices, availability, and merchant ratings across Google Shopping with the Shopping Search API and Reviews Search API.


❓ Frequently Asked Questions (FAQ)

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, Python urllib, 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.

πŸ§ͺ Testing

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 ./...

πŸ“š Documentation & Resources


πŸ“„ License

The SerpScraper SDK Monorepo is open-sourced software licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages