# Search the web

> Execute a web search and get ranked pages with titles, URLs, snippets, and relevance scores. Optionally search images and return page content.

Source: https://docs.generalinput.com/api/platform/search-internet



<Endpoint method="POST" path="/v1/platform/search-internet" />

<Access scope="platform:use" />

Real-time web search. Supports topic filtering (general, news, finance), time ranges, regional boosting, and image search.

The defaults below are the search provider's own: the platform forwards only the fields you set, so omitting one leaves the choice to the provider.

## Body [#body]

| Field                      | Type            | Required | Notes                                                                                   |
| -------------------------- | --------------- | -------- | --------------------------------------------------------------------------------------- |
| `query`                    | string          | yes      | The search query.                                                                       |
| `searchDepth`              | string          | no       | `basic` (default, 1 credit) or `advanced` (highest relevance, 2 credits).               |
| `chunksPerSource`          | integer         | no       | Relevant chunks per source, 1 to 3. Only with `advanced`. Default 3.                    |
| `maxResults`               | integer         | no       | 0 to 20. Default 5.                                                                     |
| `topic`                    | string          | no       | `general` (default), `news`, or `finance`.                                              |
| `timeRange`                | string          | no       | `day`, `week`, `month`, or `year`.                                                      |
| `startDate`, `endDate`     | string          | no       | `YYYY-MM-DD` bounds on publication date.                                                |
| `includeRawContent`        | boolean, string | no       | `true` or `markdown` for markdown page content, `text` for plain text. Default `false`. |
| `includeImages`            | boolean         | no       | Also run an image search. Default `false`.                                              |
| `includeImageDescriptions` | boolean         | no       | Add a description per image. Needs `includeImages`.                                     |
| `country`                  | string          | no       | Boost results from a country (`united states`, `germany`). Only with `topic: general`.  |

## Response [#response]

```json
{
  "query": "latest AI news",
  "results": [
    {
      "title": "Page Title",
      "url": "https://example.com/article",
      "content": "Content snippet from the page.",
      "score": 0.95,
      "rawContent": "Full parsed page content (if requested)"
    }
  ],
  "images": [{ "url": "https://example.com/photo.jpg", "description": "…" }],
  "responseTime": 1.2
}
```

`images` is empty unless `includeImages` was set. `description` on an image is present only with `includeImageDescriptions`.

## Example [#example]

```sh
curl -s -X POST https://cloud.generalinput.com/v1/platform/search-internet \
  -H "Authorization: Bearer $GI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"latest AI news","searchDepth":"basic","maxResults":5,"topic":"news"}'
```
