# Endpoints & Authentication

One base URL, one search endpoint, one segmentation endpoint, plus two helpers for cached pages and images.

## Base URL

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

## Search endpoint

Returns matching posts as JSON.

`GET`

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

## Segmentation endpoint

Returns aggregate counts instead of posts - see [Segmentation API](cyber-api-segmentation).

`GET`

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

## Helper endpoints

Serve cached page snapshots and collected images - see [Dark Cache & Images](cyber-api-cache-images).

| Endpoint | Purpose |
| --- | --- |
| `/dark-cache` | Cached snapshot of a crawled page |
| `/cyber-image` | An image collected with a post |

## Authentication

Authenticate with your API token as a query parameter:

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

A missing or unknown token returns `401 Unauthorized` with `Unknown API token`.

> [!WARNING]
> The Cyber API needs its own permission on your account. Without it, every endpoint returns `401` with a permission error - contact sales@webz.io.
