> For the complete documentation index, see [llms.txt](https://protectedseas.gitbook.io/navigator-api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://protectedseas.gitbook.io/navigator-api-docs/api-reference/search/text-and-filter-queries.md).

# Text and filter queries

GET examples for the [Search](/navigator-api-docs/api-reference/search.md) endpoint. See the [request parameters](/navigator-api-docs/api-reference/search.md#request-parameters) for the full list of options.

## All regions

```http
GET /api/search/?type=regions&export_bounds=false
```

Returns a JSON array of all active regions and their attributes.

## All sites within a region

```http
GET /api/search/?type=sites&region_id=95&v=1&lang=en_EN
```

Returns a JSON array of all active sites within the specified region and their attributes.

## Filter sites by category

```http
GET /api/search/?type=sites&category_id=6,7
```

Returns a JSON array of active sites in the listed categories — here Vessel Restricted Areas (`6`) and Vessel Reporting Areas (`7`). Pass a single ID (e.g. `category_id=6`) or a comma-separated list. When `category_id` is supplied, only sites are returned. See Site Categories for the full list.

## Filter sites by category within a region

```http
GET /api/search/?type=sites&category_id=6,7&region_id=95&v=1
```

Returns a JSON array of active sites in the listed categories, scoped to the specified region. Region scoping requires `v` alongside `region_id`.

## Single site by ID (`ps_id`)

```http
GET /api/search/?type=sites&ps_id=AIMEX101&lang=en_EN&export_bounds=true
```

Returns a JSON object containing the attributes of a single site identified by its `ps_id`.

## Sites filtered by activity

```http
GET /api/search/?type=sites&anchoring=1&entry=1
```

Returns a JSON array of sites where both anchoring and entry are prohibited (`1`). Activity fields use the coding `0` Allowed, `1` Prohibited, `2` Restricted, `3` N/A; multiple fields combine with AND. See Activity filters.

## Sites filtered by LFP and tribal exemptions

```http
GET /api/search/?type=sites&lfp=4,5&tribal_exemptions=1
```

Returns a JSON array of highly protected sites (LFP 4 or 5) with no tribal exemptions.

## Sites filtered by fishing restriction

```http
GET /api/search/?type=sites&commercial_fishing=1,2
```

Returns a JSON array of sites where commercial fishing is prohibited (`1`) or restricted (`2`). A comma-separated list matches any of the listed codes.

## Text query — regions and sites

```http
GET /api/search/?q=United States&v=1&lang=en_EN
```

Returns a JSON array of regions and sites matching the text query.

## Text query with sorting

```http
GET /api/search/?q=Canada&sort=AREA_ASC
```

Returns a JSON array of regions and sites matching the text query, sorted by the specified order.

## Text query with pagination

```http
GET /api/search/?q=California&limit=10&page=2
```

Returns a paginated JSON array of regions and sites matching the text query.

## All sites with updates since a date

```http
GET /api/search/?type=sites_updated&changed_since=2025-01-01&lang=en_EN
```

Returns all sites across every region whose `last_update` is on or after the provided date. This is the recommended endpoint for keeping a local dataset current — see [data synchronization](/navigator-api-docs/conventions/data-synchronization.md) for the full workflow, parameters, and error responses.
