scraper
Back to API docs

Overview

  • Overview

SERP

  • POSTSERP

Core

  • POSTGeocode
  • POSTTranslate
  • POSTSearch
  • POSTVision
  • POSTPlaces Search
  • POSTPlace Details
  • POSTPlaces Nearby
  • POSTAutocomplete

Maps

  • POSTSearch
  • POSTPlace Details
  • POSTReviews

Hotels

  • POSTSearch
  • POSTDetail
  • POSTReviews
  • POSTPhotos

Flights

  • POSTSearch
  • POSTCalendar
  • POSTExplore

Finance

  • POSTQuote
  • POSTFundamentals
  • POSTChart
  • POSTNews
  • POSTSearch
  • POSTEstimates
  • POSTEarnings

Search

0.5 credits

Get structured Google search results via a simple API. Supports web and image search with pagination.

POST/api/v1/tools/google/search

Parameters

qstringrequired

Search query

maxResultsnumber

Total results to return (auto-paginates). Overrides num/start. Google caps at ~100.

numnumber

Results per page, 1-10 (default 10). Use maxResults for auto-pagination.

startnumber

Pagination offset, 1-91 (starts at 1). Use with num for manual paging.

glstring

Country code for results (e.g. "us", "gb")

hlstring

Language code for interface (e.g. "en", "fr")

sortstring

Sort expression (e.g. "date" for recency)

searchTypestring

"web" (default) or "image". Set to "image" to search Google Images.

knowledgeGraphLimitnumber

Number of Knowledge Graph entities to include, 0-20 (default 5). Set to 0 to disable.

fieldsstring[]

Fields per result. Defaults: position, type, title, url, displayUrl, siteName, description. Use ["*"] for all. Options: position, type, title, url, description, htmlDescription, displayUrl, siteName, thumbnail, cacheId, mime, fileFormat, imageWidth, imageHeight, imageByteSize, pagemap, labels.

Response Schema

dataobject

Search results

pageNumbernumber

Current page number

searchTermstring

The search query

totalResultsstring

Total number of results

searchTimenumber

Search time in seconds

resultCountnumber

Number of results on this page

resultsobject[]

Array of search results (fields depend on fields parameter)

spellCheckobject | null

Spelling suggestion (if any)

knowledgeGraphobject[]

Knowledge Graph entities related to the query

nextPagenumber | null

Next page number

nextStartnumber | null

Start index for next page

metaobject

Request metadata

toolstring

Tool name (google-search)

creditsUsednumber

Credits consumed (0.5)

requestIdstring

Unique request ID

Request

curl -X POST https://scraper.run/api/v1/tools/google/search \
-H "Authorization: Bearer sc_live_..." \
-H "Content-Type: application/json" \
-d '{"q": "best coffee shops in tokyo", "num": 5}'

Response Example

{
"data": {
"pageNumber": 1,
"searchTerm": "best coffee shops in tokyo",
"totalResults": "12400000",
"searchTime": 0.42,
"resultCount": 5,
"results": [
{
"position": 1,
"type": "web",
"title": "Best Coffee Shops in Tokyo - TimeOut",
"url": "https://www.timeout.com/tokyo/restaurants/best-coffee-shops-in-tokyo",
"displayUrl": "www.timeout.com/tokyo/restaurants/best-coffee-shops-in-tokyo",
"siteName": "www.timeout.com",
"description": "Discover the best coffee shops in Tokyo, from specialty roasters to cozy kissaten..."
}
],
"spellCheck": null,
"knowledgeGraph": [
{
"name": "Tokyo",
"description": "Capital of Japan",
"type": [
"Thing",
"City"
],
"detailedDescription": {
"articleBody": "Tokyo is the capital of Japan and one of the most populous cities in the world...",
"url": "https://en.wikipedia.org/wiki/Tokyo"
}
}
],
"nextPage": 2,
"nextStart": 6
},
"meta": {
"tool": "google-search",
"creditsUsed": 0.5,
"requestId": "req_abc123"
}
}