# 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 | A busca, como solicitada. |
| `page` | integer | Qual página é esta, a partir de 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 | Extras específicos da plataforma. Retornados apenas com view=full. |

### SerpResult

| Field | Type | Description |
|---|---|---|
| `rank` | integer | Posição na lista, a partir de 1. |
| `title` | string | Título. |
| `url` | string | A página. |
| `displayed_url` | string \| null | The address as Google prints it under the title. |
| `source` | string \| null | O nome do site, como o Google o exibe. |
| `snippet` | string \| null | O texto que o Google mostra abaixo do título. |
| `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 | Posição na lista, a partir de 1. |
| `position` | string | Acima dos resultados orgânicos ou abaixo deles. |
| `title` | string | Título do anúncio. |
| `url` | string | A página de destino do anúncio. |
| `displayed_url` | string \| null | O endereço exibido no anúncio. |
| `snippet` | string \| null | Texto do anúncio. |

### KnowledgePanel

| Field | Type | Description |
|---|---|---|
| `title` | string | A entidade. |
| `type` | string \| null | O que é, nos termos do Google. |
| `description` | string \| null | A descrição do painel. |
| `website` | string \| null | O site da própria entidade, quando o Google o informa. |
| `image_url` | string \| null | A imagem do painel. |

## Endpoints that return a Serp

- [Busca na web do Google](https://okdata.online/apis/google/search/) (`google.search`): $0.01 per call
- [Busca no Google Vídeos](https://okdata.online/apis/google/videos/search/) (`google.videos.search`): $0.008 per call
- [Busca no Google Acadêmico](https://okdata.online/apis/google/scholar/search/) (`google.scholar.search`): $0.008 per call
- [Busca no Google Patentes](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`
