# 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 | リクエストどおりの検索条件。 |
| `page` | integer | 現在のページ番号（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 | プラットフォーム固有の追加情報。view=full の場合のみ返されます。 |

### SerpResult

| Field | Type | Description |
|---|---|---|
| `rank` | integer | リスト内の順位（1 から）。 |
| `title` | string | タイトル。 |
| `url` | string | ページ。 |
| `displayed_url` | string \| null | The address as Google prints it under the title. |
| `source` | string \| null | サイト名（Google の表示どおり）。 |
| `snippet` | string \| null | Google がタイトルの下に表示するテキスト。 |
| `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 | リスト内の順位（1 から）。 |
| `position` | string | 自然検索結果の上または下。 |
| `title` | string | 広告の見出し。 |
| `url` | string | 広告のランディングページ。 |
| `displayed_url` | string \| null | 広告に表示されるアドレス。 |
| `snippet` | string \| null | 広告テキスト。 |

### KnowledgePanel

| Field | Type | Description |
|---|---|---|
| `title` | string | エンティティ。 |
| `type` | string \| null | 概要（Google の表記どおり）。 |
| `description` | string \| null | パネルの説明。 |
| `website` | string \| null | エンティティ自身のウェブサイト（Google が示す場合）。 |
| `image_url` | string \| null | パネルの画像。 |

## Endpoints that return a Serp

- [Google ウェブ検索](https://okdata.online/apis/google/search/) (`google.search`): $0.01 per call
- [Google 動画検索](https://okdata.online/apis/google/videos/search/) (`google.videos.search`): $0.008 per call
- [Google Scholar 検索](https://okdata.online/apis/google/scholar/search/) (`google.scholar.search`): $0.008 per call
- [Google Patents 検索](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`
