# Google Search API

> Search Google and get organic results (title, URL, snippet, domain) for any query, with language and country control. For query suggestions use google-autocomplete.post; for a lighter general web search use web-search.post.

Category: [Search APIs](https://upapi.io/apis/search) · Last updated 2026-10-31

## How to call it

- Endpoint: `POST https://api.upapi.io/google-search.post`, key in the `X-Api-Key` header, JSON body.
- Cost: 6 weighted units per call.
- Timeout: 60 seconds.
- Cache: identical requests are served from cache for 300 seconds, unbilled.
- Try it without writing code: https://app.upapi.io/try/google-search.post

```bash
curl -X POST https://api.upapi.io/google-search.post \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY' \
  -d '{ "query": "typescript", "country": "us", "language": "en", "maxResults": 10 }'
```

## Request parameters

- `query` (string, required) — Search query
- `country` (string) — gl param (e.g. us, ca, gb)
- `language` (string) — hl param (e.g. en, fr, es)
- `proxyUrl` (string) — Optional proxy URL (http://user:pass@host:port). If set, uses only this exit IP for the BotGuard mint + scrape.
- `maxResults` (integer) — Max results to return

## Response fields

- `query` (string, required)
- `source` (string)
- `message` (string, required)
- `results` (array, required)
- `results[].url` (string, required)
- `results[].title` (string, required)
- `results[].domain` (string, required)
- `results[].snippet` (string, required)
- `results[].position` (integer, required)
- `success` (boolean, required)
- `elapsedMs` (integer, required)
- `fetchedAt` (string, required)
- `totalResults` (integer, required)

## Example request and response

The example response is generated from the published output schema: it shows the shape and field names, not values from a recorded call.

```json
{
  "query": "typescript",
  "country": "us",
  "language": "en",
  "maxResults": 10
}
```

```json
{
  "query": "typescript",
  "source": "google",
  "message": "example",
  "results": [
    {
      "url": "https://github.com",
      "title": "Alan Turing",
      "domain": "example",
      "snippet": "example",
      "position": 1
    }
  ],
  "success": false,
  "elapsedMs": 1,
  "fetchedAt": "example",
  "totalResults": 1
}
```

## Frequently asked questions

### How much does the Google Search API cost per call?

Each call spends 6 weighted units of your plan's monthly quota. Full pricing is at https://upapi.io/pricing.

### How do I authenticate to the Google Search API?

Send your key in the X-Api-Key header. A free guest key is available without creating an account.

### Are Google Search API responses cached?

Yes — identical requests are served from cache for 300 seconds, and a cache hit is not billed.

## More Search APIs

- [Google Autocomplete](https://upapi.io/apis/search/google-autocomplete)
- [Web Search](https://upapi.io/apis/search/web-search)
- [LinkedIn Profile Search](https://upapi.io/apis/search/linkedin-profile-search)
