# SerpKite documentation

> Real-time Google search results for AI agents and apps, as JSON, compact JSON or Markdown. Start here for the quickstart, endpoint reference, guides and MCP setup.

SerpKite is a Google search API built for AI agents: clean JSON or Markdown, official TypeScript/Python/Go SDKs, native LangChain, CrewAI and MCP, credits that never expire.

You send a query, and you get back the live Google results page as structured JSON, as token-lean compact JSON, or as Markdown that you can hand straight to an LLM. Every response has the same envelope: `request` (what ran), `results` (the main list for every endpoint), endpoint extras such as `knowledge_graph` and `people_also_ask`, and `meta` (cost, cache, request ID). Every link is the resolved destination URL.

There is also a Google Custom Search JSON API–compatible endpoint for teams moving off CSE before it shuts down on January 1, 2027.

## Make your first request

cURL:

```bash
curl https://api.serpkite.com/v1/search \
  -H "Authorization: Bearer $SERPKITE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"q":"best espresso machine 2026","country":"us","language":"en"}'
```

TypeScript:

```ts
import { SerpKite } from "serpkite";

const sk = new SerpKite(); // reads SERPKITE_API_KEY
const res = await sk.search({ q: "best espresso machine 2026", country: "us", language: "en" });
console.log(res.results[0].title, res.meta.credits_used);
```

Python:

```python
from serpkite import SerpKite

sk = SerpKite()  # reads SERPKITE_API_KEY
res = sk.search("best espresso machine 2026", country="us", language="en")
print(res.results[0].title, res.meta.credits_used)
```

Go:

```go
package main

import (
	"context"
	"fmt"
	"log"

	serpkite "github.com/serpkite/serpkite-go"
)

func main() {
	ctx := context.Background()
	c := serpkite.NewClient() // reads SERPKITE_API_KEY
	res, err := c.Search(ctx, serpkite.SearchParams{Q: "best espresso machine 2026", Country: "us", Language: "en"})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(res.Results[0].Title, res.Meta.CreditsUsed)
}
```

Install an SDK with `npm install serpkite`, `pip install serpkite` or `go get github.com/serpkite/serpkite-go`, or call the HTTP API directly. See [SDKs](https://serpkite.com/docs/sdks).

New accounts get 1,000 free credits, plus 1,500 more when you link GitHub or Google, and 1,000 every month after that. No card required. [Get a key](https://app.serpkite.com/login?signup=1), then follow the [quickstart](https://serpkite.com/docs/quickstart).

## Start here

- [Quickstart](https://serpkite.com/docs/quickstart): Get a key and run your first search in under five minutes.
- [Authentication](https://serpkite.com/docs/authentication): Bearer tokens, query-string keys and keeping keys safe.
- [Output formats](https://serpkite.com/docs/output-formats): JSON, compact and Markdown, plus fields projection.
- [Credits and billing](https://serpkite.com/docs/credits-and-billing): What each call costs and what is never billed.

## Endpoints

Every endpoint lives under `https://api.serpkite.com/v1` and takes a `POST` with a JSON object (or a `GET` with the same query parameters). The exception is the CSE-compatible `GET /customsearch/v1`. Credits are per results page of 10 unless noted. Unknown parameters are rejected with a `400` that names the right one, so typos never fall back to defaults silently (see [Strict validation](https://serpkite.com/docs/parameters#strict-validation)).

| Endpoint | Method and path | Credits | Returns |
| --- | --- | --- | --- |
| [Google Search](https://serpkite.com/docs/endpoints/search) | `POST /v1/search` | 1 | `request`, `results`, `answer_box`, `knowledge_graph`, `people_also_ask`, `related_searches`, `top_stories`, `places`, `ads`, `meta` |
| [Google News](https://serpkite.com/docs/endpoints/news) | `POST /v1/news` | 1 | `request`, `results`, `meta` |
| [Google Images](https://serpkite.com/docs/endpoints/images) | `POST /v1/images` | 1 | `request`, `results`, `meta` |
| [Google Videos](https://serpkite.com/docs/endpoints/videos) | `POST /v1/videos` | 1 | `request`, `results`, `meta` |
| [Google Maps](https://serpkite.com/docs/endpoints/maps) | `POST /v1/maps` | 1 | `request`, `results`, `meta` |
| [Google Places](https://serpkite.com/docs/endpoints/places) | `POST /v1/places` | 1 | `request`, `results`, `meta` |
| [Google Reviews](https://serpkite.com/docs/endpoints/reviews) | `POST /v1/reviews` | 1 | `request`, `results`, `next_page_token`, `meta` |
| [Google Shopping](https://serpkite.com/docs/endpoints/shopping) | `POST /v1/shopping` | 1 | `request`, `results`, `meta` |
| [Google Scholar](https://serpkite.com/docs/endpoints/scholar) | `POST /v1/scholar` | 1 | `request`, `results`, `meta` |
| [Google Patents](https://serpkite.com/docs/endpoints/patents) | `POST /v1/patents` | 1 | `request`, `results`, `meta` |
| [Google Autocomplete](https://serpkite.com/docs/endpoints/autocomplete) | `POST /v1/autocomplete` | 0.5 | `request`, `results`, `meta` |
| [Google Lens](https://serpkite.com/docs/endpoints/lens) | `POST /v1/lens` | 2 | `request`, `results`, `meta` |
| [Webpage to Markdown](https://serpkite.com/docs/endpoints/webpage) | `POST /v1/webpage` | 1 | `request`, `url`, `status_code`, `markdown`, `text`, `metadata`, `meta` |
| [Custom Search (CSE-compatible)](https://serpkite.com/docs/endpoints/customsearch) | `GET /customsearch/v1` | 1 | `kind`, `searchInformation`, `items`, `queries` |

To run many queries at half price, queue them with [`POST /v1/batches`](https://serpkite.com/docs/batch). Two free endpoints help with bookkeeping: [`GET /v1/account`](https://serpkite.com/docs/endpoints/account) returns your balance and this month's usage, and [`GET /v1/batches/{id}`](https://serpkite.com/docs/endpoints/batches) returns the status and result of a batch job.

## Build with it

- [MCP server](https://serpkite.com/docs/mcp): Remote MCP at api.serpkite.com/v1/mcp for Claude, Cursor, VS Code and ChatGPT.
- [Official SDKs](https://serpkite.com/docs/sdks): TypeScript, Python and Go clients, plus LangChain and CrewAI tools.
- [Tool calling](https://serpkite.com/docs/guides/agents-tool-calling): Ready-made tool definitions for OpenAI and Anthropic models.
- [RAG pipeline](https://serpkite.com/docs/guides/rag-pipeline): Search, fetch the top pages as Markdown, and ground an answer.
- [Rank tracking](https://serpkite.com/docs/guides/rank-tracking): Top-100 depth, the batch lane and webhooks for SEO tools.

## Moving off Google Custom Search

Point `https://www.googleapis.com/customsearch/v1` at `https://api.serpkite.com/customsearch/v1` and keep your existing CSE client. See [Migrate from Google CSE](https://serpkite.com/docs/guides/migrate-from-google-cse).

## Machine-readable docs

Every page here has a Markdown twin: add `.md` to the URL (for example [/docs/quickstart.md](https://serpkite.com/docs/quickstart.md)), or use the **Copy page** button above. The whole documentation is also available as [llms.txt](https://serpkite.com/llms.txt) and [llms-full.txt](https://serpkite.com/llms-full.txt), and the API contract as an [OpenAPI 3.1 spec](https://serpkite.com/openapi/serp-api.yaml).