Skip to main content
POST
/
v1
/
monitor
/
google
Monitor Google Search Results
curl --request POST \
  --url https://api.cloro.dev/v1/monitor/google \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "query": "best laptops for programming",
  "country": "US",
  "city": "New York",
  "device": "desktop",
  "pages": 3,
  "include": {
    "html": false
  }
}
'
{
  "success": true,
  "result": {
    "organicResults": [
      {
        "position": 1,
        "title": "Best Laptops for Programming in 2024",
        "link": "https://example.com/best-programming-laptops",
        "displayedLink": "https://example.com",
        "snippet": "Looking for the best programming laptops? We've tested and reviewed the top options...",
        "date": "2 days ago",
        "sitelinks": {
          "inline": [
            {
              "title": "Specifications",
              "link": "https://example.com/specs"
            }
          ]
        }
      }
    ],
    "peopleAlsoAsk": [
      {
        "question": "What specs should I look for in a programming laptop?",
        "type": "AIOVERVIEW",
        "snippet": "Key specifications include RAM, processor, storage, and display quality...",
        "title": "Essential laptop specs for developers",
        "link": "https://example.com/laptop-specs"
      }
    ],
    "relatedSearches": [
      {
        "query": "best budget laptop for coding",
        "link": "https://google.com/search?q=best+budget+laptop+for+coding"
      }
    ],
    "aioverview": {
      "sources": [
        {
          "position": 1,
          "title": "Best Programming Laptops 2024",
          "link": "https://example.com/programming-laptops",
          "snippet": "Comprehensive guide to choosing the perfect laptop for software development"
        }
      ],
      "text": "Based on current information, the best laptops for programming typically include models from Apple MacBook Pro, Dell XPS, and Lenovo ThinkPad series...",
      "markdown": "Based on current information, the best laptops for programming typically include models from Apple MacBook Pro, Dell XPS, and Lenovo ThinkPad series..."
    },
    "html": [
      "https://storage.cloro.dev/results/b83e8dfd-c3a1-4b98-83b9-af91adc21e26/page-1.html"
    ]
  }
}

Overview

The Google Search endpoint extracts structured data from Google Search results, including organic results, People Also Ask questions, related searches, and optional AI Overview data. This endpoint replaces the dedicated AI Overview endpoint.
AI Overview location availability might be different than regular Google Search availability. Use the countries endpoint with model=aioverview to check supported countries, as the available locations differ significantly from Google Search (model=google) availability.

Request parameters

Required parameters:
  • query (string): The search query to execute on Google (1-10,000 characters)
Optional parameters:
  • country (string): ISO 3166-1 alpha-2 country code for localized results. Defaults to US
  • city (string): Canonical city name for hyperlocal search results. Use canonical city names from the Google Ads geotargets.
  • device (string): Device type for search results. Options: desktop (default), mobile.
  • pages (integer): Number of search results pages to scrape (1-20). Defaults to 1
  • include.html (boolean): Include raw HTML response. Defaults to false
  • include.aioverview (object): Include Google AI Overview. Set markdown: true for markdown formatting. Defaults to false (not included)

Error handling

AI Overview behaviorWhen include.aioverview is requested and Google doesn’t return an AI Overview (after several retries), the API returns aioverview: null in a 200 response.The response will include all other Google search data (organic results, People Also Ask, etc.) with aioverview set to null:
{
  "success": true,
  "result": {
    "organicResults": [...],
    "peopleAlsoAsk": [...],
    "relatedSearches": [...],
    "aioverview": null
  }
}

AI Overview request structure

To request AI Overview data, nest the aioverview object under the include parameter:
{
  "query": "best laptops for programming",
  "include": {
    "aioverview": {
      "markdown": true
    }
  }
}
AI Overview options:
  • markdown (boolean): Include AI Overview formatted as Markdown. Defaults to false
  • When aioverview is not included in the request, no AI Overview data will be returned

Response schema

Includes common response fields plus:

Google Search results

FieldTypeDescription
result.organicResultsarrayOrganic search results from Google
result.peopleAlsoAskarray”People Also Ask” questions with answers
result.relatedSearchesarrayRelated search suggestions
result.htmlstringRaw HTML response (if requested)

Organic results

FieldTypeDescription
positionnumberPosition in search results (1-indexed)
titlestringTitle of the search result
linkstringURL of the search result
displayedLinkstringFormatted URL as displayed in search results
snippetstringSearch result snippet
pagenumberPage number where result was found (for multi-page)

People Also Ask

FieldTypeDescription
questionstringThe question being asked
typestringType of result (AIOVERVIEW or LINK)
snippetstringAnswer snippet for LINK type questions
titlestringTitle for LINK type questions
linkstringURL for LINK type questions
FieldTypeDescription
querystringRelated search query
linkstringGoogle search URL for the related query

AI Overview results

FieldTypeDescription
result.aioverviewobjectGoogle AI Overview data (if requested)
result.aioverview.textstringAI Overview text content
result.aioverview.sourcesarraySources referenced in AI Overview
result.aioverview.sources.positionnumberPosition of source in AI Overview
result.aioverview.sources.labelstringTitle of the source
result.aioverview.sources.urlstringURL of the source
result.aioverview.sources.descriptionstringDescription of the source
result.aioverview.markdownstringAI Overview in markdown format (if requested)

Usage examples

Hyperlocal search with city parameter

{
  "query": "restaurants near me",
  "city": "New York"
}
{
  "query": "best coffee shops",
  "city": "Paris,Île-de-France"
}
{
  "query": "hotels near me",
  "city": "Tokyo,Tokyo,Japan"
}
Use the city parameter to get hyperlocal search results for specific locations. The backend automatically converts canonical city names to Google’s location parameter. City name formats supported:
  • City only: “New York”, “Paris”, “Tokyo”
  • City with region: “Paris,Île-de-France”, “New York,New York”
  • City with region and country: “Tokyo,Tokyo,Japan”, “London,England,United Kingdom”
Use canonical city names from the Google Ads geotargets.

Scrape multiple pages

{
  "query": "best laptops for programming",
  "pages": 3,
  "country": "US"
}
This will scrape the first 3 pages of Google search results, combining all organic results, People Also Ask questions, and related searches into a single response. The peopleAlsoAsk results include a page field indicating which page each question appeared on.

Retrieve AI Overview

To get AI Overview data with markdown formatting:
{
  "query": "best laptops for programming",
  "include": {
    "aioverview": {
      "markdown": true
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request parameters for monitoring Google search results

query
string
required

The search query to execute on Google

Required string length: 1 - 10000
Example:

"best laptops for programming"

country
string

ISO 3166-1 alpha-2 country code for localized search results

Example:

"US"

city
string

Canonical city name for hyperlocal search results. Use canonical city names from the Google Ads geotargets

Example:

"New York"

device
enum<string>
default:desktop

Device type for search results

Available options:
desktop,
mobile
Example:

"desktop"

pages
integer
default:1

Number of search results pages to scrape (1-20)

Required range: 1 <= x <= 20
Example:

3

include
object

Optional flags for including additional response data

Response

successful Google monitoring response

success
boolean
required
Example:

true

result
object
required

Google search results data