---
title: "Google Custom Search JSON API–compatible endpoint (for apps moving off CSE)"
method: GET
path: "/customsearch/v1"
---

# Google Custom Search JSON API–compatible endpoint (for apps moving off CSE)

`GET /customsearch/v1`

## Request

- Base URL: `https://api.serpkite.com`
- URL: `https://api.serpkite.com/customsearch/v1`
- Auth: HTTP bearer

## Query parameters

- `key` string
- `cx` string
- `q` string, required
- `start` integer
- `num` integer
- `gl` string
- `hl` string
- `lr` string
- `safe` 'active' | 'off'
- `dateRestrict` string
- `siteSearch` string
- `searchType` 'image'

## Response `200`

CSE-shaped response

- CSEResponse
  - `kind` 'customsearch#search', required
  - `url` object
  - `queries` object
  - `context` object
  - `searchInformation` object, required
    - `searchTime` number
    - `formattedSearchTime` string
    - `totalResults` string
    - `formattedTotalResults` string
  - `items` object[], required
    - `kind` 'customsearch#result'
    - `title` string
    - `htmlTitle` string
    - `link` string
    - `displayLink` string
    - `snippet` string
    - `htmlSnippet` string
    - `formattedUrl` string
    - `htmlFormattedUrl` string
    - `pagemap` object
    - `image` object

## Other responses

- `400`: Error
- `401`: Error
- `402`: Error
- `429`: Error
- `503`: Temporarily unavailable, not billed, safe to retry after `Retry-After`. Codes: `upstream_error` (the upstream page couldn't be fetched or parsed), `upstream_blocked` (the upstream is rate limiting us), `upstream_timeout` (the search took too long), `unavailable` (endpoint or dependency down). The API never sends 502 or 504.

---

[API](https://skmtc.dev/serpkite/apis/serpkite-serp-api.md) · [All operations](https://skmtc.dev/serpkite/apis/serpkite-serp-api/llms.txt) · [OpenAPI document](https://skmtc.dev/serpkite/apis/serpkite-serp-api/revisions/f2c6dd05cfc5?raw)
