# Endpoints & Authentication

One base URL, six endpoints, one token - that is the whole surface area.

## Base URL

```bash
https://api.webz.io
```

All endpoints are `GET` only.

## Search endpoints

Return matching posts as JSON.

| Product | Endpoint |
| --- | --- |
| News | `/api/news` |
| Blogs | `/api/blogs` |
| Forums | `/api/forums` |

## Segmentation endpoints

Return aggregate counts instead of posts - see [Segmentation API](news-blogs-forums-segmentation).

| Product | Endpoint |
| --- | --- |
| News | `/seg_api/news` |
| Blogs | `/seg_api/blogs` |
| Forums | `/seg_api/forums` |

## Authentication

Authenticate with your API token, either as a query parameter:

```bash
https://api.webz.io/api/news?token=YOUR_TOKEN&q=bitcoin
```

or as a Bearer header:

```bash
Authorization: Bearer YOUR_TOKEN
```

A missing or unknown token returns `401 Unauthorized`.

> [!NOTE]
> Each product needs its own permission on your account. Calling an endpoint you are not subscribed to returns `401` with a permission error - contact support@webz.io to add products.
