---
title: "How do I get Google search results via an API?"
description: "Getting Google results from code in 2026: the end of the Custom Search JSON API, Google’s suggested replacements, and SERP APIs with prices."
canonical_url: https://groundsocial.dev/answers/how-to-get-google-search-results-via-api
---
# How do I get Google search results via an API?

> Getting Google results from code in 2026: the end of the Custom Search JSON API, Google’s suggested replacements, and SERP APIs with prices.

_Updated 2026-11-27._

> **Short answer** Use a SERP API. Google’s own Custom Search JSON API is closed to new customers and shuts down on 1 January 2027 (it gave 100 free queries a day, then $5 per 1,000 up to 10,000 a day). Google points site search to Vertex AI Search (up to 50 domains) and asks full-web users to contact it.

- **Custom Search JSON API**: closed to new customers; existing ones have until 1 January 2027.
- **Vertex AI Search**: Google’s suggestion for searching up to 50 domains. Not a full-web search.
- **Full web**: Google asks you to contact it about its full-web solution.
- **SERP APIs** (Serper, SerpApi, Bright Data, DataForSEO and others): pay per search; prices per 1,000 compared in [our SERP price post](https://groundsocial.dev/blog/google-serp-api-price-per-1000).

## How to do it with Groundsocial

`google.search.web` returns organic results, ads and the rest of the page for 1 credit; images, videos, news, Maps and Shopping have their own endpoints. A credit costs $1.00 to $0.40 per 1,000 depending on the pack, failed calls are refunded, and there are 100 free credits on signup, no card.

cURL:

```bash
curl "https://api.groundsocial.dev/v1/google/search?q=coffee&gl=us&hl=en" \
  -H "Authorization: Bearer $GROUNDSOCIAL_API_KEY"
```

TypeScript:

```ts
const res = await fetch('https://api.groundsocial.dev/v1/google/search?q=coffee&gl=us&hl=en', {
  headers: { Authorization: `Bearer ${process.env.GROUNDSOCIAL_API_KEY}` },
})
if (!res.ok) throw new Error((await res.json()).error.hint)
const data = await res.json()
```

Python:

```python
import os, requests

res = requests.get(
    "https://api.groundsocial.dev/v1/google/search?q=coffee&gl=us&hl=en",
    headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()
```

| Endpoint | Route | Credits |
| --- | --- | --- |
| [Google search API](https://groundsocial.dev/endpoints/google-search-api) | `/v1/google/search` | 1 |
| [Google search news API](https://groundsocial.dev/endpoints/google-search-news-api) | `/v1/google/search/news` | 1 |
| [Google Shopping API](https://groundsocial.dev/endpoints/google-shopping-api) | `/v1/google/search/shopping` | 2 |
| [Google Maps business search API](https://groundsocial.dev/endpoints/google-maps-business-search-api) | `/v1/google/business/search` | 2 |

## More questions

### Is the Custom Search API being discontinued?

Yes, on 1 January 2027. It is already closed to new customers.

## Related

- [Google SERP API price per 1,000](https://groundsocial.dev/blog/google-serp-api-price-per-1000)
- [Groundsocial vs Serper](https://groundsocial.dev/compare/serper)
- [Groundsocial vs SerpApi](https://groundsocial.dev/compare/serpapi)
- [SerpApi alternatives](https://groundsocial.dev/alternatives/serpapi)

## Sources

- [Google: Custom Search JSON API overview](https://developers.google.com/custom-search/v1/overview)

Checked 27 Nov 2026. Follow the links for the latest.

Google is a trademark of Google LLC. We are not affiliated with or endorsed by Google.

_Canonical HTML: https://groundsocial.dev/answers/how-to-get-google-search-results-via-api_

## Site Navigation

### Global Hub
- [Home](https://groundsocial.dev/index.md)
- [Pricing](https://groundsocial.dev/pricing.md)
- [Endpoints](https://groundsocial.dev/endpoints.md)
- [For agents](https://groundsocial.dev/agents.md)
- [Docs](https://groundsocial.dev/docs.md)
- [Compare](https://groundsocial.dev/compare.md)
- [Blog](https://groundsocial.dev/blog.md)
- [Tutorials](https://groundsocial.dev/tutorials.md)
- [Changelog](https://groundsocial.dev/changelog.md)
- [llms.txt](https://groundsocial.dev/llms.txt)
- [Agent skill](https://groundsocial.dev/SKILL.md)

### On This Topic
- [Groundsocial: Social data in one API call](https://groundsocial.dev/index.md)
- [Pricing](https://groundsocial.dev/pricing.md)
- [Playground](https://groundsocial.dev/playground.md)
- [Use cases](https://groundsocial.dev/use-cases.md)
- [Brand monitoring API](https://groundsocial.dev/use-cases/brand-monitoring-api.md)
- [Social listening API](https://groundsocial.dev/use-cases/social-listening-api.md)
- [Comment scraping API](https://groundsocial.dev/use-cases/comment-scraping-api.md)
- [Influencer discovery API](https://groundsocial.dev/use-cases/influencer-discovery-api.md)
- [Video transcript API](https://groundsocial.dev/use-cases/video-transcript-api.md)
- [Ad library API](https://groundsocial.dev/use-cases/ad-library-api.md)
- [Review monitoring API](https://groundsocial.dev/use-cases/review-monitoring-api.md)
- [Trend detection API](https://groundsocial.dev/use-cases/trend-detection-api.md)
- [Social lead generation API](https://groundsocial.dev/use-cases/lead-generation-api.md)
- [Market research API](https://groundsocial.dev/use-cases/market-research-api.md)

## Structured data

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://groundsocial.dev/"},{"@type":"ListItem","position":2,"name":"Answers","item":"https://groundsocial.dev/answers"},{"@type":"ListItem","position":3,"name":"How do I get Google search results via an API?","item":"https://groundsocial.dev/answers/how-to-get-google-search-results-via-api"}]}
```
