Skip to content

API Documentation

Base URL

All endpoints are relative to your backend base URL.

Common Headers

Header NameRequiredDescription
x-access-keyYesYour API key for authentication
Accept-EncodingYesMust contain gzip or br
X-Request-IdNoOptional request ID; one will be generated automatically if not provided

Endpoints

Proxies a Google web search request. Enjoy a 20% discount for requesting 10 pages of data in a single batch. The minimum price is $0.064 per 1,000 requests.

Endpoint: GET /request/google/web

Query Parameters:

ParameterTypeRequiredDefaultDescription
urlstringYes-Google search URL (must contain google.com, path /search, and q parameter)
pageCountintNo10Number of pages to retrieve
isMobilebooleanYes-true for mobile search results, false for desktop

Example Request:

http
GET /request/google/web?url=https%3A%2F%2Fwww.google.com%2Fsearch%3Fq%3Djustsearch&pageCount=10&isMobile=false
x-access-key: your-api-key
Accept-Encoding: gzip

Success Response:

  • Status: 200 OK
  • Content-Type: text/plain;charset=UTF-8
  • Body: Raw HTML content from Google search

Google Any Request

Proxies any Google URL request, also supports AJAX URL format.

Endpoint: GET /request/google/any

Query Parameters:

ParameterTypeRequiredDefaultDescription
urlstringYes-Any Google URL (domain must be google.com)
isMobilebooleanYes-true for mobile user agent, false for desktop

Example Request:

http
GET /request/google/any?url=https%3A%2F%2Fwww.google.com&isMobile=false
x-access-key: your-api-key
Accept-Encoding: gzip

Success Response:

  • Status: 200 OK
  • Content-Type: text/plain;charset=UTF-8
  • Body: Raw HTML content from the requested URL

Error Responses

All error responses have the following structure:

json
{
  "code": 400,
  "message": "Error message",
  "requestId": "unique-request-id"
}

Common Error Codes

HTTP StatusCodeMessageDescription
400400URL domain must contain 'google'The provided URL's domain does not include 'google'
400400URL path must be '/search'The URL path is not '/search' (for /google/web endpoint)
400400URL must contain 'q' parameterThe URL is missing the search query parameter 'q'
400400Invalid URL formatThe URL is malformed
400400request header must contain Accept-Encoding: gzip or brMissing or invalid Accept-Encoding header
403403Invalid API KeyThe provided x-access-key is invalid
403403Insufficient balanceYour account balance is insufficient to process this request
429429Too Many RequestsYou have exceeded the rate limit
503503Service UnavailableThe service is temporarily unavailable

Request Flow

  1. Request ID Interceptor (Order 1): Generates a unique X-Request-Id and attaches it to the response.
  2. Access Limit Interceptor (Order 2): Enforces rate limiting based on x-access-key.
  3. Force Gzip Header Interceptor (Order 3): Validates that Accept-Encoding includes gzip or br.
  4. Controller Logic: Validates API key, checks/deducts balance, proxies the request.