Docs
Log in

API usage

Add &scraper=google-serp to a Crawling API request. URL-encode the target URL in the url parameter.

curl 'https://api.crawlbase.com/?token=YOUR_TOKEN' \
  --data-urlencode 'url=https://www.google.com/search?q=samsung+social+accounts' \
  --data-urlencode 'scraper=google-serp' -G
from crawlbase import CrawlingAPI

api = CrawlingAPI({'token': 'YOUR_TOKEN'})
res = api.get(
    'https://www.google.com/search?q=samsung+social+accounts',
    {'scraper': 'google-serp'}
)

import json
data = json.loads(res['body'])
const { CrawlingAPI } = require('crawlbase');
const api = new CrawlingAPI({ token: 'YOUR_TOKEN' });

const res = await api.get(
  'https://www.google.com/search?q=samsung+social+accounts',
  { scraper: 'google-serp' }
);
const data = JSON.parse(res.body);
require 'crawlbase'
api = Crawlbase::API.new(token: 'YOUR_TOKEN')

res = api.get('https://www.google.com/search?q=samsung+social+accounts', scraper: 'google-serp')
data = JSON.parse(res.body)

Example input URL

The URL passed in the url parameter (URL-decoded for readability):

https://www.google.com/search?q=samsung+social+accounts

Response shape

JSON response body. Field types may be null when the source page omits the value.

query
string
Search query.
results
array
Organic search results.
results[].title
string
Result title.
results[].url
string
Result destination URL.
results[].snippet
string
Description text shown under the title.
results[].sitelinks
array
Optional sitelinks under the main result.
ads
array
Sponsored ads with the same shape as results[].
related_searches
array<string>
"Searches related to" suggestions.
people_also_ask
array
PAA section with question/answer pairs.
knowledge_panel
object | null
Knowledge panel block when present.

Sample response

{
  "query": "samsung social accounts",
  "results": [
    {
      "title": "Samsung Mobile (@SamsungMobile) / X",
      "url": "https://x.com/SamsungMobile",
      "snippet": "The official Samsung Mobile X account…"
    }
  ],
  "related_searches": ["samsung instagram", "samsung official tiktok"],
  "people_also_ask": [
    {
      "question": "Does Samsung have a TikTok?",
      "answer": "Yes, Samsung is on TikTok at @samsung."
    }
  ]
}