# Serp

> A Google web search results page: organic results, ads, the AI overview, People also ask, related searches and the knowledge panel.

Canonical page: https://okdata.online/docs/objects/serp/

The same shape on every platform. A field a platform does not have is null, and meta.unavailable says why. Use fields= to keep only what you need.

| Field | Type | Description |
|---|---|---|
| `query` | string | The search as asked. |
| `page` | integer | Which page this is, from 1. |
| `total_results` | integer \| null | Google's own estimate of how many results there are. |
| `organic` | SerpResult[] | Organic results, in page order (usually up to 10). |
| `ads` | SerpAd[] | Paid results on the page; empty when Google shows none. |
| `ai_overview` | string \| null | The AI overview's text, where Google shows one with the page; null when it has none or loads it separately. |
| `related_questions` | string[] | "People also ask" questions. |
| `related_searches` | string[] | "Related searches" at the foot of the page. |
| `knowledge_panel` | KnowledgePanel \| null | The knowledge panel, when the query names an entity Google knows; null otherwise. |
| `ext` | object | Platform-specific extras. Only returned with view=full. |

### SerpResult

| Field | Type | Description |
|---|---|---|
| `rank` | integer | Place in the list, from 1. |
| `title` | string | Title. |
| `url` | string | The page. |
| `displayed_url` | string \| null | The address as Google prints it under the title. |
| `source` | string \| null | The site's name, as Google shows it. |
| `snippet` | string \| null | The text Google shows under the title. |
| `date` | string \| null | The date Google prints before the snippet, as it shows it ("3 days ago"); null when there is none. |

### SerpAd

| Field | Type | Description |
|---|---|---|
| `rank` | integer | Place in the list, from 1. |
| `position` | string | Above the organic results, or below them. |
| `title` | string | Ad headline. |
| `url` | string | The ad's landing page. |
| `displayed_url` | string \| null | The address the ad shows. |
| `snippet` | string \| null | Ad text. |

### KnowledgePanel

| Field | Type | Description |
|---|---|---|
| `title` | string | The entity. |
| `type` | string \| null | What it is, in Google's words. |
| `description` | string \| null | The panel's description. |
| `website` | string \| null | The entity's own website, where Google gives it. |
| `image_url` | string \| null | The panel's image. |

## Endpoints that return a Serp

- [Google web search](https://okdata.online/apis/google/search/) (`google.search`): $0.01 per call
- [Google Videos search](https://okdata.online/apis/google/videos/search/) (`google.videos.search`): $0.008 per call
- [Google Scholar search](https://okdata.online/apis/google/scholar/search/) (`google.scholar.search`): $0.008 per call
- [Google Patents search](https://okdata.online/apis/google/patents/search/) (`google.patents.search`): $0.008 per call

## Fields by view

Each view includes the fields of the views above it. `view=compact` is the smallest; `full` adds platform extras under `ext`.

- compact: `query`, `page`, `total_results`, `organic`, `ads`, `related_questions`, `related_searches`, `knowledge_panel`
- standard: `ai_overview`
- full: `ext`
