> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pipellm.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# News Search

> Search recent news articles with retrieval support through PipeLLM WebSearch

Use this route when you want recent news articles instead of general web
results.

## Endpoint

| Method | Endpoint                                          |
| ------ | ------------------------------------------------- |
| `GET`  | `https://api.pipellm.ai/v1/websearch/search-news` |

## Authentication

```text theme={null}
Authorization: Bearer $PIPELLM_API_KEY
```

## Query Parameters

| Parameter | Type   | Required | Description |
| --------- | ------ | -------- | ----------- |
| `q`       | string | Yes      | News query  |

## Example Request

```bash theme={null}
curl -X GET "https://api.pipellm.ai/v1/websearch/search-news?q=OpenAI" \
  -H "Authorization: Bearer $PIPELLM_API_KEY"
```

## Response Shape

```json theme={null}
{
  "code": 200,
  "message": "ok",
  "took_ms": 4200,
  "data": {
    "organic": [
      {
        "title": "Latest OpenAI news",
        "link": "https://example.com/news",
        "snippet": "Recent product and research updates...",
        "contexts": [
          {
            "idx": 0,
            "text": "..."
          }
        ]
      }
    ]
  }
}
```

## Notes

* This route proxies to the internal `/api/search-news` handler.
* It uses the news-specific search source, then applies the same retrieval flow as deep search.
* If no results are found, this route returns `404` with `code: 404` and `message: "no search results"`.

## Related Docs

<Columns cols={3}>
  <Card title="Deep Search" icon="magnifying-glass" href="/websearch/search-api">
    Search the general web with retrieval support
  </Card>

  <Card title="Simple Search" icon="bolt" href="/websearch/simple-search">
    Fast snippets when you do not need news-specific retrieval
  </Card>

  <Card title="WebSearch Overview" icon="globe" href="/websearch/overview">
    Product overview and route matrix
  </Card>
</Columns>
