---
title: "Content API"
description: "The Prismic Content API is an extremely fast, flexible, and powerful engine for your content. This page provides definitions for all of the API parameters."
meta_title: "Content API Reference"
category: "api-references"
audience: developers
lastUpdated: "2025-11-06T01:07:50.000Z"
---

# Overview

Note: This page is a technical reference for the Content API. If you're starting a project with Prismic, we recommend you use a user-friendly guide for the technology of your choice:

* [Next.js](https://prismic.io/docs/nextjs.md)
* [Nuxt](https://prismic.io/docs/nuxt.md)
* [SvelteKit](https://prismic.io/docs/sveltekit.md)

You can also read a beginner-friendly introduction to the Prismic API:

* [The Prismic API](https://prismic.io/docs/api.md): \[object Object]

The Prismic Content API is an extremely fast, flexible, and powerful engine for your content.

Your repository has a Repository API Endpoint. This endpoint has information about your repository, including your repository's refs, which are necessary to make a query to the Content API.

Your Repository API Endpoint is available here:

```
https://your-repo-name.cdn.prismic.io/api/v2
```

The Content API is available here:

```
https://your-repo-name.cdn.prismic.io/api/v2/documents/search
```

To access the Content API endpoint, you will need a ref. The ref specifies what version of your content to query. A basic query, including a ref, might look like this:

```
https://your-repo-name.cdn.prismic.io/api/v2/documents/search?ref=X71BaxIAACMA0NsN
```

Query URLs, like the one above, will expire as the ref goes out of date. The ref must be up-to-date.

## Encoding

All of the Content API options are encoded as URL search parameters. A URL search parameter is a key-value pair. The value must be encoded as a URL component. You can encode the value using JavaScript's [`encodeURIComponent()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent) function. Prior to encoding, the key-value pair might look like this:

```
fetchLinks=[author.name,author.avatar]
```

After encoding the value, it will look like this:

```
fetchLinks=%5Bauthor.name%2Cauthor.avatar%5D
```

One or more of these parameters can be joined with ampersands to form a [query string](https://en.wikipedia.org/wiki/Query_string):

```
page=2&pageSize=5
```

Append your query string to the API endpoint with a question mark:

```
https://your-repo-name.cdn.prismic.io/api/v2/documents/search?ref=X71BaxIAACMA0NsN&page=2&pageSize=5
```

JavaScript has a built-in [`URL()` constructor](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) to manage search parameters:

```tsx
const url = new URL(
  "https://your-repo-name.cdn.prismic.io/api/v2/search/documents",
);
url.searchParams.append("ref", "X71BaxIAACMA0NsN");
url.searchParams.append("page", 2);
url.searchParams.append("pageSize", 5);

return url.href;
// https://your-repo-name.cdn.prismic.io/api/v2/search/documents?ref=X71BaxIAACMA0NsN&page=2&pageSize=5
```

However, there is no need to create and manipulate URLs manually. [`@prismicio/client`](https://prismic.io/docs/technical-reference/prismicio-client.md) will handle the technical parts of performing API requests (including fetching your ref):

```tsx
import * as prismic from "@prismicio/client"

const client = prismic.createClient("your-repo-name")

const posts = await client.getAllByType("post", { page: 2, pageSize, 5 })
```

You can use the below parameters to construct your query string.

## Limits

The maximum URL length for requests to the Content API is 2048 characters.

The rate limit for the Content API is 200 requests per second. Queries that use the CDN are automatically cached. Cached queries have no rate limit. Since Prismic's development kits use the CDN by default, most users will never hit this limit. However, there are a few ways you might hit the limit:

* If you create your own API client that doesn't use the CDN
* If you manually invalidate the cache on requests in very rapid succession
* If you make hundreds of different API requests immediately after publishing a document

The development kit `@prismicio/client` (version 5 and up) automatically uses the CDN and also automatically handles errors if the rate limit is hit. In that case, the kit will automatically retry the query after one second.

# ref (required)

A ref identifies a specific version of your content (for instance: draft, published, or scheduled). Refs are available at the Repository API:

```
https://your-repo-name.cdn.prismic.io/api/v2
```

To query your content, you will need to perform one query to get your current ref (which is a short token) and then a second query — using that ref — to get your content. This ensures that the content returned is the correct version and up-to-date.

* **Unencoded:**

  ```
  ref=YHhVOBAAACcACRyo
  ```

* **Encoded:**

  ```
  ref=YHhVOBAAACcACRyo
  ```

* **JavaScript:**

  ```
  { ref: 'YHhVOBAAACcACRyo' }
  ```

> **Important**
>
> <CalloutHeading>SDKs automatically fetch your ref</CalloutHeading>
>
> Our API development kits, such as [@prismicio/client](https://prismic.io/docs/technical-reference/prismicio-client.md), provide query helper functions that perform the first query for you, so you don't need to worry about it.

# access\_token

A long, secret string required to query content in private repositories. Available in your Prismic repository settings. Required for private repositories.

* **Unencoded:**

  ```tsx
  access_token=MTYwNjMyMjI1NzU5MS5YNzU2UVJJQUFDQUExaV8z.HO-_ve-_ve-_vTpKbSfvv73vv73vv73vv70e77-9CW04B--_ve-_vWJ_b00U77-9Je-_vRoh77-977-9
  ```

* **Encoded:**

  ```tsx
  access_token=MTYwNjMyMjI1NzU5MS5YNzU2UVJJQUFDQUExaV8z.HO-_ve-_ve-_vTpKbSfvv73vv73vv73vv70e77-9CW04B--_ve-_vWJ_b00U77-9Je-_vRoh77-977-9
  ```

* **JavaScript:**

  ```tsx
  {
    access_token: "MTYwNjMyMjI1NzU5MS5YNzU2UVJJQUFDQUExaV8z.HO-_ve-_ve-_vTpKbSfvv73vv73vv73vv70e77-9CW04B--_ve-_vWJ_b00U77-9Je-_vRoh77-977-9";
  }
  ```

# q

The query parameter (`q`) accepts a set of filters (encoded as a URI component) as its value. Each filter is enclosed in square brackets, and the set is enclosed in square brackets.

> <CalloutHeading>What is a filter?</CalloutHeading>
>
> A filter is a search argument. It tells the API what content to search for. Prismic has dozens of built-in filters, which can accept countless variables — making for infinitely flexible querying. For example, the filter "at" seeks an exact match between a field of your document and a value you provide. `at(document.type, "post")` looks for all documents that have a "type" matching "post." Similarly, there are filters for "not," "any," "date," and much more.

The API will return documents that match every filter if the set includes **multiple filters** or the query string contains **various query parameters**.

Most filters accept a path to denote the field being examined and then one or more values to compare in the search. The paths can take two formats, based on the filter: `document.[meta-value]` or `my.[custom-type].[field]`. See the following reference:

<Table>
  <tbody>
    <tr>
      <TableCell>`my.[custom-type].[field]`</TableCell>

      <TableCell>
        This path allows you to query a specific field in a custom type. `[custom-type]` should be the API ID of a custom type, such as "blog\_post". `[field]` should be the API ID of a field in that custom type, such as "author".
      </TableCell>
    </tr>

    <tr>
      <TableCell>`my.[custom-type].[group-field].[field]`</TableCell>

      <TableCell>
        This path allows you to query a field within a group.
      </TableCell>
    </tr>

    <tr>
      <TableCell>`document.type`</TableCell> <TableCell>The API ID of a document's custom type.</TableCell>
    </tr>

    <tr>
      <TableCell>`document.id`</TableCell>

      <TableCell>
        The automatically-assigned document ID, which looks like this: `WGvVEDIAAAcuB3lJ`
      </TableCell>
    </tr>

    <tr>
      <TableCell>`document.tags`</TableCell>

      <TableCell>
        The tags assigned to a document. Tags must always be listed in an array.
      </TableCell>
    </tr>

    <tr>
      <TableCell>`document.first_publication_date`</TableCell>

      <TableCell>
        The date and time that the document was first published. This value never changes.
      </TableCell>
    </tr>

    <tr>
      <TableCell>`document.last_publication_date`</TableCell>

      <TableCell>
        The date and time that the document was last published. This value is updated every time new edits are published.
      </TableCell>
    </tr>

    <tr>
      <TableCell>`document`</TableCell>

      <TableCell>
        This path is only used with the `fulltext` filter. It allows you to search all rich text, title, key text, select, and UID fields in a document.
      </TableCell>
    </tr>
  </tbody>
</Table>

Each path can be used with specific document fields. This pivot table shows what field types can be used with what paths:

<FiltersTable>
  <FiltersTableRow title="Full document text" example="document" compatible={"fulltext"} />

  <FiltersTableRow title="Tags" example="document.tags" compatible={["at", "not", "any"]} />

  <FiltersTableRow title="ID" example="document.id" compatible={["at", "not", "any", "in", "similar"]} />

  <FiltersTableRow title="Custom Type" example="document.type" compatible={["at", "not", "any"]} />

  <FiltersTableRow title="First publication date" example="document.first_publication_date" compatible={["Dates"]} />

  <FiltersTableRow title="Last publication date" example="document.last_publication_date" compatible={["Dates"]} />

  <FiltersTableRow title="UID" example="my.[custom-type].uid" compatible={["at", "not", "any", "in", "fulltext", "has", "missing"]} />

  <FiltersTableRow title="Key Text" example="my.[custom-type].[key-text-field]" compatible={["at", "not", "any", "fulltext", "has", "missing"]} />

  <FiltersTableRow title="Select" example="my.[custom-type].[select-field]" compatible={["at", "not", "any", "fulltext", "has", "missing"]} />

  <FiltersTableRow title="Number" example="my.[custom-type].[number-field]" compatible={["at", "not", "any", "has", "missing", "lt", "gt", "inRange"]} />

  <FiltersTableRow title="Date" example="my.[custom-type].[date-field]" compatible={["at", "not", "any", "has", "missing", "Dates"]} />

  <FiltersTableRow title="Content Relationship" example="my.[custom-type].[relationship-field]" compatible={["at", "not", "any", "has", "missing"]} />

  <FiltersTableRow title="Boolean" example="my.[custom-type].[boolean-field]" compatible={["at", "not", "has", "missing"]} />

  <FiltersTableRow title="Rich Text" example="my.[custom-type].[rich-text-field]" compatible={["fulltext", "has", "missing"]} />

  <FiltersTableRow title="Title" example="my.[custom-type].[title-field]" compatible={["fulltext", "has", "missing"]} />

  <FiltersTableRow title="Geopoint" example="my.[custom-type].[geopoint-field]" compatible={["has", "missing", "near"]} />

  <FiltersTableRow title="Timestamp" example="my.[custom-type].[timestamp-field]" compatible={["has", "missing", "Dates"]} />

  <FiltersTableRow title="Color" example="my.[custom-type].[color-field]" compatible={["has", "missing"]} />

  <FiltersTableRow title="Link" example="my.[custom-type].[link-field]" compatible={["has", "missing"]} />

  <FiltersTableRow title="Image" example="my.[custom-type].[image-field]" compatible={[]} />

  <FiltersTableRow title="Embed" example="my.[custom-type].[embed-field]" compatible={[]} />

  <FiltersTableRow title="Group" example="my.[custom-type].[group-field]" compatible={[]} />

  <FiltersTableRow title="Integration" example="my.[custom-type].[integration-field]" compatible={[]} />
</FiltersTable>

An essential query parameter to search for a document of the type "article" will look like this:

* **Unencoded:**

  ```
  [[at(document.type,"article")]]
  ```

* **Encoded:**

  ```
  %5B%5Bat(document.type%2C%22article%22)%5D%5D
  ```

A query parameter to search for a document of type "article," last published in 2020, will look like this:

* **Unencoded:**

  ```
  [[at(document.type,"article")][date.year(document.last_publication_date,2020)]]
  ```

* **Encoded:**

  ```
  %5B%5Bat(document.type%2C%22article%22)%5D%5Bdate.year(document.last_publication_date%2C2020)%5D%5D
  ```

You can test your queries using the API Explorer, available at: `https://your-repo-name.prismic.io/builder/explorer`.

There's no need to manually construct query URLs — we provide a client SDK that includes methods for querying the API. To learn more about it, check out the [@prismicio/client technical reference](https://prismic.io/docs/technical-reference/prismicio-client.md).

Here's an example of what a filter query would look like with `@prismicio/client`, as unencoded query value, and as a full URL:

* **JavaScript:**

  ```tsx
  import * as prismic from "@prismicio/client";

  const endpoint = prismic.getEndpoint("your-repo-name");
  const client = prismic.createClient(endpoint);

  const init = async () => {
    client.get({
      filters: [
        prismic.filter.dateYear("document.last_publication_date", 2020),
        prismic.filter.at("document.type", "blog-post"),
      ],
    });
  };

  init();
  ```

* **Unencoded:**

  ```
  [date.year(document.last_publication_date,2020)]
  [at(document.type,"blog-post")]
  ```

* **URL:**

  ```
  https://your-repo-name.cdn.prismic.io/api/v2/documents/search?ref=WmdIBCcAAHhUDe_K&q=%5B%5Bdate.year(document.last_publication_date%2C2020)%5D%5Bat(document.type%2C%22blog-post%22)%5D%5D
  ```

Here is the full list of filters:

## at

Checks that the path matches the described value exactly. It takes a single value for a field at the top level of the document (not in slices) or an array (only for tags).

To query by a content relationship, supply the document ID as the value.

* **JavaScript:**

  ```tsx
  prismic.filter.at(path, value);
  ```

* **Unencoded:**

  ```
  [at( path, value )]
  ```

* **URL:**

  ```
  https://your-repo-name.cdn.prismic.io/api/v2/documents/search?ref=your_ref&q=%5B%5Bat(path%2Cvalue)%5D%5D
  ```

Available values:

| Parameter | Type      | Description                                                                                                                                                                                                                                                                                                         | Default |
| --------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| path      | undefined | * `document.type`
* `document.tags`
* `document.id`
* `my.[custom-type].uid`
* `my.[custom-type].[key-text-field]`
* `my.[custom-type].[select-field]`
* `my.[custom-type].[number-field]`
* `my.[custom-type].[date-field]`
* `my.[custom-type].[boolean-field]`
* `my.[custom-type].[content-relationship-field]` | None    |
| value     | undefined | - single value (for all but `document.tags`)
- array of values (only for `document.tags`)                                                                                                                                                                                                                           | None    |

Examples:

* **JavaScript:**

  ```tsx
  // All documents of type "product"
  prismic.filter.at("document.type", "product");

  // All documents with the tags "Macaron" and "Cupcake"
  prismic.filter.at("document.tags", ["Macaron", "Cupcake"]);

  // All documents of type "product" with a "price" of 50
  prismic.filter.at("my.product.price", 50);
  ```

* **Unencoded:**

  ```
  // All documents of type "product"
  [at(document.type, "product")]

  // All documents with the tags "Macaron" and "Cupcake"
  [at(document.tags, ["Macaron", "Cupcake"])]

  // All documents of type "product" with a "price" of 50
  [at(my.product.price, 50)]
  ```

* **URL:**

  ```
  // All documents of type "product"
  https://your-repo-name.cdn.prismic.io/api/v2/documents/search?ref=WmdIBCcAAHhUDe_K&q=%5B%5Bat(document.type%2C%22product%22)%5D%5D

  // All documents with the tags "Macaron" and "Cupcake"
  https://your-repo-name.cdn.prismic.io/api/v2/documents/search?ref=WmdIBCcAAHhUDe_K&q=%5B%5Bat(document.tags%2C%5B%22Macaron%22%2C%22Cupcake%22%5D)%5D%5D

  // All documents of type "product" with a "price" of 50
  https://your-repo-name.cdn.prismic.io/api/v2/documents/search?ref=WmdIBCcAAHhUDe_K&q=%5B%5Bat(my.product.price%2C50)%5D%5D
  ```

## not

Checks that the path doesn't match the provided value exactly. It takes a single value or an array. (Arrays are only accepted for tags.)

* **JavaScript:**

  ```tsx
  prismic.filter.not(path, value);
  ```

* **Unencoded:**

  ```
  [not( path, value )]
  ```

* **URL:**

  ```
  https://your-repo-name.cdn.prismic.io/api/v2/documents/search?ref=WmdIBCcAAHhUDe_K&q=%5B%5Bnot(path%2Cvalue)%5D%5D
  ```

Accepted values:

| Parameter | Type      | Description                                                                                                                                                                                                                                                                                                         | Default |
| --------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| path      | undefined | * `document.type`
* `document.tags`
* `document.id`
* `my.[custom-type].uid`
* `my.[custom-type].[key-text-field]`
* `my.[custom-type].[select-field]`
* `my.[custom-type].[number-field]`
* `my.[custom-type].[date-field]`
* `my.[custom-type].[boolean-field]`
* `my.[custom-type].[content-relationship-field]` | None    |
| value     | undefined | - single value (for all but `document.tags`)
- array of values (only for `document.tags`)                                                                                                                                                                                                                           | None    |

Example:

* **JavaScript:**

  ```tsx
  // All documents not of type "product"
  prismic.filter.not("document.type", "product");

  // All documents without the tags "Macaron" and "Cupcake"
  prismic.filter.not("document.tags", ["Macaron", "Cupcake"]);

  // All documents of type "product" without a "price" of 50
  prismic.filter.not("my.product.price", 50);
  ```

* **Unencoded:**

  ```
  // All documents not of type "product"
  [not(document.type, "product")]

  // All documents without the tags "Macaron" and "Cupcake"
  [not(document.tags, ["Macaron", "Cupcake"])]

  // All documents of type "product" without a "price" of 50
  [not(my.product.price, 50)]
  ```

* **URL:**

  ```
  // All documents not of type "product"
  https://your-repo-name.cdn.prismic.io/api/v2/documents/search?ref=WmdIBCcAAHhUDe_K&q=%5B%5Bnot(document.type%2C%22product%22)%5D%5D

  // All documents without the tags "Macaron" and "Cupcake"
  https://your-repo-name.cdn.prismic.io/api/v2/documents/search?ref=WmdIBCcAAHhUDe_K&q=%5B%5Bnot(document.tags%2C%5B%22Macaron%22%2C%22Cupcake%22%5D)%5D%5D

  // All documents of type "product" without a "price" of 50
  https://your-repo-name.cdn.prismic.io/api/v2/documents/search?ref=WmdIBCcAAHhUDe_K&q=%5B%5Bnot(my.product.price%2C50)%5D%5D
  ```

## any

Accepts an array of values and checks whether the fragment matches any of the values in the array. When used with the ID or UID field, it will not necessarily return the documents in the order given in the array.

* **JavaScript:**

  ```tsx
  prismic.filter.any(path, values);
  ```

* **Unencoded:**

  ```
  [any( path, values )]
  ```

* **URL:**

  ```
  https://your-repo-name.cdn.prismic.io/api/v2/documents/search?ref=WmdIBCcAAHhUDe_K&q=%5B%5Bany(path%2Cvalues)%5D%5D
  ```

Accepted values:

| Parameter | Type      | Description                                                                                                                                                                                                                                                                                                         | Default |
| --------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| path      | undefined | * `document.type`
* `document.tags`
* `document.id`
* `my.[custom-type].uid`
* `my.[custom-type].[key-text-field]`
* `my.[custom-type].[select-field]`
* `my.[custom-type].[number-field]`
* `my.[custom-type].[date-field]`
* `my.[custom-type].[boolean-field]`
* `my.[custom-type].[content-relationship-field]` | None    |
| value     | undefined | Array of values.                                                                                                                                                                                                                                                                                                    | None    |

Example:

* **JavaScript:**

  ```tsx
  prismic.filter.any("document.type", ["product", "blog-post"]);
  ```

* **Unencoded:**

  ```
  [any(document.type, ["product", "blog-post"])]
  ```

* **URL:**

  ```
  https://your-repo-name.cdn.prismic.io/api/v2/documents/search?ref=WmdIBCcAAHhUDe_K&q=%5B%5Bany(document.type%2C%5B%22product%22%2C%22blog-post%22%5D)%5D%5D
  ```

## in

Checks whether a document's ID or UID is in an array of IDs or UIDs. It works the same as the `any` filter but is much faster because it is only used for IDs and UIDs.

Also, unlike the `any` filter, it returns the documents in the same order as the given array.

* **JavaScript:**

  ```tsx
  prismic.filter.in(path, array);
  ```

* **Unencoded:**

  ```
  [in( path, array )]
  ```

* **URL:**

  ```
  https://your-repo-name.cdn.prismic.io/api/v2/documents/search?ref=WmdIBCcAAHhUDe_K&q=%5B%5Bin(path%2Carray)%5D%5D
  ```

Accepted values:

| Parameter | Type      | Description                              | Default |
| --------- | --------- | ---------------------------------------- | ------- |
| path      | undefined | * `document.id`
* `my.[custom-type].uid` | None    |
| value     | undefined | Array of IDs or UIDs.                    | None    |

Example with IDs:

* **JavaScript:**

  ```tsx
  prismic.filter.in("document.id", ["Wl4CCCcAAAfU5RMd", "WiU34h0AAI90y1m2"]);
  ```

* **Unencoded:**

  ```
  [in(document.id,["Wl4CCCcAAAfU5RMd","WiU34h0AAI90y1m2"])]
  ```

* **URL:**

  ```
  https://your-repo-name.cdn.prismic.io/api/v2/documents/search?ref=WmdIBCcAAHhUDe_K&q=%5B%5Bin(document.id%2C%5B%22Wl4CCCcAAAfU5RMd%22%2C%22WiU34h0AAI90y1m2%22%5D)%5D%5D
  ```

Example with UIDs:

* **JavaScript:**

  ```auto
  prismic.filter.in('my.page.uid', ['hello-world','about-me'])
  ```

* **Unencoded:**

  ```
  [in(my.page.uid,["hello-world","about-me"])]
  ```

* **URL:**

  ```
  https://your-repo-name.cdn.prismic.io/api/v2/documents/search?ref=WmdIBCcAAHhUDe_K&q=%5B%5Bin(my.page.uid%2C%5B%22hello-world%22%2C%22about-me%22%5D)%5D%5D
  ```

## fulltext

Checks if a string is found inside a whole document or within a specific field on a document.

`fulltext` will search for a single term, passed as a string, or for multiple terms, passed as a string of terms with spaces between them. With multiple terms, the API will return documents that contain all terms.

The search is not case-sensitive and it matches based on the root word, so a search for "Dogs" will include "dog."

The search considers rich text, title, key text, select, and UID fields. It ignores image alt text in rich text fields. It doesn't matter if the field is inside a group, a slice, or a slice repeatable section.

The search is ordered by relevance, with more priority given to rich text content, especially headings.

* **JavaScript:**

  ```tsx
  prismic.filter.fulltext(path, value);
  ```

* **Unencoded:**

  ```
  [fulltext( path, value )]
  ```

* **URL:**

  ```
  https://your-repo-name.cdn.prismic.io/api/v2/documents/search?ref=WmdIBCcAAHhUDe_K&q=%5B%5Bfulltext(path%2Cvalue)%5D%5D
  ```

Accepted values:

| Parameter | Type      | Description                                                                                                                               | Default |
| --------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| path      | undefined | * `my.[custom-type].uid`
* `my.[custom-type].[rich-text-field]`
* `my.[custom-type].[key-text-field]`
* `my.[custom-type].[select-field]` | None    |
| value     | string    |                                                                                                                                           | None    |

Example:

* **JavaScript:**

  ```tsx
  // all documents that contain the word "quickstart"
  prismic.filter.fulltext("document", "quickstart");

  // all page documents with a description that contains the words "configuration" and "codes"
  prismic.filter.fulltext("my.page.description", "configuration codes");
  ```

* **Unencoded:**

  ```
  // all documents that contain the word "quickstart"
  [fulltext(document,"quickstart")]

  // all page documents with a description that contains the words "configuration" and "codes"
  [fulltext(my.page.description,"configuration codes")]
  ```

* **URL:**

  ```
  // all documents that contain the word "quickstart"
  https://your-repo-name.cdn.prismic.io/api/v2/documents/search?ref=WmdIBCcAAHhUDe_K&q=%5B%5Bfulltext(document%2C%22quickstart%22)%5D%5D

  // all page documents with a description that contains the words "configuration" and "codes"
  https://your-repo-name.cdn.prismic.io/api/v2/documents/search?ref=WmdIBCcAAHhUDe_K&q=%5B%5Bfulltext(my.page.description%2C%22configuration%codes%22)%5D%5D
  ```

## has

The `has` filter checks whether a fragment has a value. It will return all the documents of the specified type that contain a value for the specified field.

Works for all content types except groups and slices.

* **JavaScript:**

  ```tsx
  prismic.filter.has(path);
  ```

* **Unencoded:**

  ```
  [has( path )]
  ```

* **URL:**

  ```
  https://your-repo-name.cdn.prismic.io/api/v2/documents/search?ref=WmdIBCcAAHhUDe_K&q=%5B%5Bhas(path)%5D%5D
  ```

Accepted values:

| Parameter | Type                       | Description | Default |
| --------- | -------------------------- | ----------- | ------- |
| path      | my.\[custom-type].\[field] |             | None    |

Example:

* **JavaScript:**

  ```tsx
  // all "page" documents that have a description
  prismic.filter.has("my.page.description");
  ```

* **Unencoded:**

  ```
  // all "page" documents that have a description
  [has(my.page.description)]
  ```

* **URL:**

  ```
  // all "page" documents that have a description
  https://your-repo-name.cdn.prismic.io/api/v2/documents/search?ref=WmdIBCcAAHhUDe_K&q=%5B%5Bhas(my.page.description)%5D%5D
  ```

## missing

The `missing` filter checks if a fragment doesn't have a value. It will return all the documents of the specified type that do not contain a value for the specified field.

Works for all content types except groups and slices.

Note that this filter will restrict the results to the custom type implied in the path.

* **JavaScript:**

  ```tsx
  prismic.filter.missing(path);
  ```

* **Unencoded:**

  ```
  [missing( path )]
  ```

* **URL:**

  ```
  https://your-repo-name.cdn.prismic.io/api/v2/documents/search?ref=WmdIBCcAAHhUDe_K&q=%5B%5Bmissing(path)%5D%5D
  ```

Accepted values:

| Parameter | Type                       | Description | Default |
| --------- | -------------------------- | ----------- | ------- |
| path      | my.\[custom-type].\[field] |             | None    |

Example:

* **JavaScript:**

  ```tsx
  prismic.filter.missing("my.page.description");
  ```

* **Unencoded:**

  ```
  [missing(my.page.description)]
  ```

* **URL:**

  ```
  https://your-repo-name.cdn.prismic.io/api/v2/documents/search?ref=WmdIBCcAAHhUDe_K&q=%5B%5Bmissing(my.page.description)%5D%5D
  ```

## similar

The `similar` filter takes the ID of a document, and returns a list of documents with similar content. This allows you to build an automated content discovery feature (for example, a "Related posts" section).

* **JavaScript:**

  ```tsx
  prismic.filter.similar(id, value);
  ```

* **Unencoded:**

  ```
  [similar( id, value )]
  ```

* **URL:**

  ```
  https://your-repo-name.cdn.prismic.io/api/v2/documents/search?ref=WmdIBCcAAHhUDe_K&q=%5B%5Bsimilar(id%2C%20value)%5D%5D
  ```

Accepted values:

| Parameter | Type   | Description                                                                               | Default |
| --------- | ------ | ----------------------------------------------------------------------------------------- | ------- |
| id        | string | A document ID.                                                                            | None    |
| value     | number | The maximum number of documents that a term may appear in to still be considered relevant | None    |

Example:

* **JavaScript:**

  ```tsx
  prismic.filter.similar("WiU34h0AAI90y1m2", 10);
  ```

* **Unencoded:**

  ```
  [similar("WiU34h0AAI90y1m2", 10)]
  ```

* **URL:**

  ```
  https://your-repo-name.cdn.prismic.io/api/v2/documents/search?ref=WmdIBCcAAHhUDe_K&q=%5B%5Bsimilar(%22WiU34h0AAI90y1m2%22%2C%2010)%5D%5D
  ```

## geopointNear

The `geopointNear` filter checks that the value in the path is within the radius of the given coordinates. Distance is measured in kilometers.

The near filter will order the results from nearest to farthest from the given coordinates.

* **JavaScript:**

  ```tsx
  prismic.filter.geopointNear(path, latitude, longitude, radius);
  ```

* **Unencoded:**

  ```
  [geopoint.near( path, latitude, longitude, radius )]
  ```

* **URL:**

  ```
  https://your-repo-name.cdn.prismic.io/api/v2/documents/search?ref=WmdIBCcAAHhUDe_K&q=%5B%5Bgeopoint.near(%20path%2C%20latitude%2C%20longitude%2C%20radius%20)%5D%5D
  ```

Accepted values:

| Parameter | Type                                | Description                                 | Default |
| --------- | ----------------------------------- | ------------------------------------------- | ------- |
| path      | my.\[custom-type].\[geopoint-field] |                                             | None    |
| latitude  | number                              | Latitude of the center of the search area.  | None    |
| longitude | number                              | Longitude of the center of the search area. | None    |
| radius    | number                              | Radius of search in kilometers.             | None    |

Example:

* **JavaScript:**

  ```tsx
  prismic.filter.geopointNear(
    "my.restaurant.location",
    9.656896299,
    -9.77508544,
    10,
  );
  ```

* **Unencoded:**

  ```
  [geopoint.near(my.restaurant.location, 9.656896299, -9.77508544, 10)]
  ```

* **URL:**

  ```
  https://your-repo-name.cdn.prismic.io/api/v2/documents/search?ref=WmdIBCcAAHhUDe_K&q=%5Bgeopoint.near(my.restaurant.location%2C%209.656896299%2C%20-9.77508544%2C%2010)%5D
  ```

## numberLessThan

The `numberLessThan` filter checks that the value in the number field is less than the value passed into the filter.

This is a strict less-than operator, it will not give values equal to the specified value.

* **JavaScript:**

  ```tsx
  prismic.filter.numberLessThan(path, value);
  ```

* **Unencoded:**

  ```
  [lt( path, value )]
  ```

* **URL:**

  ```
  https://your-repo-name.cdn.prismic.io/api/v2/documents/search?ref=WmdIBCcAAHhUDe_K&q=%5B%5Blt(%20path%2C%20value%20)%5D%5D%0A
  ```

Accepted values:

| Parameter | Type                              | Description | Default |
| --------- | --------------------------------- | ----------- | ------- |
| path      | my.\[custom-type].\[number-field] |             | None    |
| value     | number                            |             | None    |

Example:

* **JavaScript:**

  ```tsx
  prismic.filter.numberLessThan("my.product.price", 9.99);
  ```

* **Unencoded:**

  ```
  [lt(my.product.price, 9.99)]
  ```

* **URL:**

  ```
  https://your-repo-name.cdn.prismic.io/api/v2/documents/search?ref=WmdIBCcAAHhUDe_K&q=%5B%5Blt(%20my.product.price%2C%209.99%20)%5D%5D
  ```

## numberGreaterThan

The `numberGreaterThan` filter checks that the value in the number field is greater than the value passed into the filter.

This is a strict greater-than operator, it will not give values equal to the specified value.

* **JavaScript:**

  ```tsx
  prismic.filter.numberGreaterThan(path, value);
  ```

* **Unencoded:**

  ```
  [gt( path, value )]
  ```

* **URL:**

  ```
  https://your-repo-name.cdn.prismic.io/api/v2/documents/search?ref=WmdIBCcAAHhUDe_K&q=%5B%5Bgt(%20path%2C%20value%20)%5D%5D%0A
  ```

Accepted values:

| Parameter | Type                              | Description | Default |
| --------- | --------------------------------- | ----------- | ------- |
| path      | my.\[custom-type].\[number-field] |             | None    |
| value     | number                            |             | None    |

Example:

* **JavaScript:**

  ```tsx
  prismic.filter.numberGreaterThan("my.product.price", 9.99);
  ```

* **Unencoded:**

  ```
  [gt(my.product.price, 9.99)]
  ```

* **URL:**

  ```
  https://your-repo-name.cdn.prismic.io/api/v2/documents/search?ref=WmdIBCcAAHhUDe_K&q=%5B%5Bgt(%20my.product.price%2C%209.99%20)%5D%5D
  ```

## numberInRange

The `numberInRange` filter checks that the value in the path is within the two values passed into the filter.

This is an inclusive search, it will include values equal to the upper and lower limits.

* **JavaScript:**

  ```tsx
  prismic.filter.numberInRange(path, lowerLimit, upperLimit);
  ```

* **Unencoded:**

  ```
  [number.inRange( path, lowerLimit, upperLimit )]
  ```

* **URL:**

  ```
  https://your-repo-name.cdn.prismic.io/api/v2/documents/search?ref=WmdIBCcAAHhUDe_K&q=%5B%5Bnumber.inRange(%20path%2C%20lowerLimit%2C%20upperLimit%20)%5D%5D
  ```

Accepted values:

| Parameter  | Type                              | Description | Default |
| ---------- | --------------------------------- | ----------- | ------- |
| path       | my.\[custom-type].\[number-field] |             | None    |
| lowerLimit | number                            |             | None    |
| upperLimit | number                            |             | None    |

Example:

* **JavaScript:**

  ```tsx
  prismic.filter.numberInRange("my.product.price", 10, 100);
  ```

* **Unencoded:**

  ```
  [number.inRange(my.product.price, 10, 100)]
  ```

* **URL:**

  ```
  https://your-repo-name.cdn.prismic.io/api/v2/documents/search?ref=WmdIBCcAAHhUDe_K&q=%5B%5Bnumber.inRange(my.product.price%2C%2010%2C%20100)%5D%5D
  ```

## Date filters

Prismic has sixteen filters for dates and times. The "after" and "before" filters will not include a date or time equal to the given value. The "between" filters will include dates and times equal to the given values.

* **JavaScript:**

  ```tsx
  // Checks that the path's date is after a given date
  prismic.filter.dateAfter( path, date )

  // Checks that a the path's date in the path is before a given date
  prismic.filter.dateBefore( path, date )

  // Checks that the path's date is between two values
  prismic.filter.dateBetween( path, startDate, endDate )

  // Checks that the path's day of the month is equal to the given day of the month
  prismic.filter.dateDayOfMonth( path, day )

  // Checks that the path's day of the month is after the given day of the month
  prismic.filter.dateDayOfMonthAfter( path, day )

  // Checks that the path's day of the month is before the given day of the month
  prismic.filter.dateDayOfMonthBefore( path, day )

  // Checks that the path's weekday is equal to the given weekday
  prismic.filter.dateDayOfWeek( path, weekday )

  // Checks that the path's weekday is after the given weekday
  prismic.filter.dateDayOfWeekAfter( path, weekday )

  // Checks that the path's weekday is before the given weekday
  prismic.filter.dateDayOfWeekBefore( path, weekday )]

  // Checks that the path's month is equal to the given month
  prismic.filter.dateMonth( path, month )

  // Checks that the path's month is before the given month
  prismic.filter.dateMonthBefore( path, month )

  // Checks that the path's month is after the given month
  prismic.filter.dateMonthAfter( path, month )

  // Checks that the path's year is equal to the given year
  prismic.filter.dateYear( path, year )

  // Checks that the path's hour is equal to the given hour
  prismic.filter.dateHour( path, hour )

  // Checks that the path's hour is after the given hour
  prismic.filter.dateHourAfter( path, hour )

  // Checks that the path's hour is before the given hour
  prismic.filter.dateHourBefore( path, hour )
  ```

* **Unencoded:**

  ```auto
  // Checks that the path's date is after a given date
  [date.after( path, date )]

  // Checks that a the path's date in the path is before a given date
  [date.before( path, date )]

  // Checks that the path's date is between two values
  [date.between( path, startDate, endDate )]

  // Checks that the path's day of the month is equal to the given day of the month
  [date.day-of-month( path, day )]

  // Checks that the path's day of the month is after the given day of the month
  [date.day-of-month-after( path, day )]

  // Checks that the path's day of the month is before the given day of the month
  [date.day-of-month-before( path, day )]

  // Checks that the path's weekday is equal to the given weekday
  [date.day-of-week( path, weekday )]

  // Checks that the path's weekday is after the given weekday
  [date.day-of-week-after( path, weekday )]

  // Checks that the path's weekday is before the given weekday
  [date.day-of-week-before( path, weekday )]

  // Checks that the path's month is equal to the given month
  [date.month( path, month )]

  // Checks that the path's month is after the given month
  [date.month-after( path, month )]

  // Checks that the path's month is before the given month
  [date.month-before( path, month )]

  // Checks that the path's year is equal to the given year
  [date.year( path, year )]

  // Checks that the path's hour is equal to the given hour
  [date.hour( path, hour )]

  // Checks that the path's hour is after the given hour
  [date.hour-after( path, hour )]

  // Checks that the path's hour is before the given hour
  [date.hour-before( path, hour )]
  ```

Accepted values:

| Parameter | Type      | Description                                                                                                                                                                                                                                                                                                                                                                                                                                               | Default |
| --------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| path      | undefined | * `document.first_publication_date`
* `document.last_publication_date`
* `my.[custom-type].[date-field]`
* `my.[custom-type].[timestamp-field]`                                                                                                                                                                                                                                                                                                           | None    |
| date      | undefined | - ISO 8601 Standard date: `"2002-08-28"`
- ISO 8601 Standard timestamp: `"2002-08-28T15:30:00+0300"`
- 13-digit Epoch: `1030545000000`                                                                                                                                                                                                                                                                                                                    | None    |
| day       | undefined | Day of month                                                                                                                                                                                                                                                                                                                                                                                                                                              | None    |
| weekday   | undefined | Day of week, starting with Monday. Will also accept first-letter capitalized (`"Monday"`) and all-caps (`"MONDAY"`).- `"monday" \| "mon" \| 1`
- `"tuesday" \| "tue" \| 2`
- `"wednesday" \| "wed" \| 3`
- `"thursday" \| "thu" \| 4`
- `"friday" \| "fri" \| 5`
- `"saturday" \| "sat" \| 6`
- `"sunday" \| "sun" \| 7`                                                                                                                                  | None    |
| month     | undefined | Month, starting with January. Will also accept first-letter capitalized (`"January"`) and all-caps (`"JANUARY"`).- `"january" \| "jan" \| 1`
- `"february" \| "feb" \| 2`
- `"march" \| "mar" \| 3`
- `"april" \| "apr" \| 4`
- `"may" \| "may" \| 5`
- `"june" \| "jun" \| 6`
- `"july" \| "jul" \| 7`
- `"august" \| "aug" \| 8`
- `"september" \| "sep" \| 9`
- `"october" \| "oct" \| 10`
- `"november" \| "nov" \| 11`
- `"december" \| "dec" \| 12` | None    |
| year      | undefined | Year                                                                                                                                                                                                                                                                                                                                                                                                                                                      | None    |
| hour      | undefined | An hour as a number, between 0 and 23. Date field values have an hour value of 0.                                                                                                                                                                                                                                                                                                                                                                         | None    |

Example:

This example combines the `month` and `year` filters. This query will return content published in May 2020:

* **JavaScript:**

  ```tsx
  [
    prismic.filter.dateYear("my.article.example_date", 2020),
    prismic.filter.dateMonth("my.article.example_date", "May"),
  ];
  ```

* **Unencoded:**

  ```auto
  [date.year(my.article.example_date, 2020)]
  [date.month(my.article.example_date, 'May')]
  ```

* **URL:**

  ```
  https://your-repo-name.cdn.prismic.io/api/v2/documents/search?ref=WmdIBCcAAHhUDe_K&q=%5Bdate.year(my.article.example_date%2C%202020)%5D%0A%5Bdate.month(my.article.example_date%2C%20%22May%22)%5D
  ```

# orderings

This option specifies what field to order your results by, and whether to order them ascending or descending.

Use an orderings object to sort your query results in a given order. The following example will sort blog posts by the date they were originally published, in descending order:

Specify the field with the path `my.[custom-type].[field]`:

* **Unencoded:**

  ```
  orderings=[my.product.price]
  ```

* **Encoded:**

  ```
  orderings=%5Bmy.product.price%5D
  ```

* **JavaScript:**

  ```tsx
  {
    orderings: {
      field: 'my.product.price',
    },
  }
  ```

By default, the results will be ordered from lowest to highest. To order results highest to lowest, add `desc`:

* **Unencoded:**

  ```
  orderings=[my.product.price desc]
  ```

* **Encoded:**

  ```
  orderings=%5Bmy.product.price%20desc%5D
  ```

* **JavaScript:**

  ```tsx
  {
    orderings: {
      field: 'my.product.price',
      direction: 'desc',
    },
  }
  ```

To order by multiple fields, use a comma-separated list in the API and an object in JavaScript. The results will be ordered by the first path. When the value of the first path is the same for multiple results, they will be ordered by the second path, and so on.

In this example, products will be sorted by price. Products with the same price will then be sorted by title.

* **Unencoded:**

  ```
  orderings=[my.product.price,my.product.title]
  ```

* **Encoded:**

  ```
  orderings=%5Bmy.product.price%2Cmy.product.title%5D
  ```

* **JavaScript:**

  ```tsx
  {
    "orderings": [
      {
        "field": "my.product.price"
      },
      {
        "field": "my.product.title"
      }
    ]
  }
  ```

Documents also have a `first_publication_date` and `last_publication_date`. These can also be used with orderings:

* **Unencoded:**

  ```
  orderings=[document.first_publication_date]
  ```

* **Encoded:**

  ```
  orderings=%5Bdocument.first_publication_date%5D
  ```

* **JavaScript:**

  ```tsx
  {
    orderings: {
      field: 'document.first_publication_date',
    },
  }
  ```

# after

This option works with orderings to return documents after the one specified.

For example, imagine if you have a query that returns the following document IDs (in this order):

```
V9Zt3icAAAl8Uzob
PqZtvCcAALuRUzmO
VkRmhykAAFA6PoBj
V4Fs8rDbAAH9Pfow
G8ZtxQhAALuSix6R
Ww9yuAvdAhl87wh6
```

If you add the `after` option with the a value of `"VkRmhykAAFA6PoBj"`, like this,

* **Unencoded:**

  ```
  after=VkRmhykAAFA6PoBj
  ```

* **Encoded:**

  ```
  after=VkRmhykAAFA6PoBj
  ```

* **JavaScript:**

  ```tsx
  {
    after: "VkRmhykAAFA6PoBj";
  }
  ```

your query will return:

```
V4Fs8rDbAAH9Pfow
G8ZtxQhAALuSix6R
Ww9yuAvdAhl87wh6
```

By reversing the orderings in your query, you can use this same method to retrieve all the documents before the specified document.

# graphQuery

GraphQuery is a query option that enables you to make advanced queries. It allows for selective fetching (only retrieving specific fields) and deep fetching (retrieving content from linked documents and content relationships).

The Content API accepts an encoded GraphQuery string. You can encode the string with JavaScript's built-in encodeURIComponent() function or with a [web service](https://meyerweb.com/eric/tools/dencoder/). Prismic's development kits will automatically encode the string for you.

Request URLs to the Content API are limited to 2048 characters. You can reduce your string length by using line breaks with no spaces or tabs, or you can use a [white space removal tool](https://onlinetexttools.com/remove-all-whitespace-from-text).

Here's an example:

* **Unencoded:**

  ```
  graphQuery={ post { title } }
  ```

* **Encoded:**

  ```
  graphQuery=%7Bpost%7Btitle%7D%7D
  ```

* **JavaScript:**

  ```tsx
  {
    graphQuery: `{ post { title } }`;
  }
  ```

Read the complete reference for GraphQuery:

* [GraphQuery API Option Technical Reference](https://prismic.io/docs/fields/content-relationship.md#graphquery-legacy): \[object Object]

# fetch

*Please note: fetch is deprecated in favor of graphQuery.*

This option is used to make queries faster by only retrieving the specified field(s).

To retrieve a single field, specify it with `[custom-type].[field]`:

* **Unencoded:**

  ```
  fetch=product.title
  ```

* **Encoded:**

  ```
  fetch=product.title
  ```

* **JavaScript:**

  ```tsx
  {
    fetch: "product.title";
  }
  ```

To retrieve multiple fields, use array syntax:

* **Unencoded:**

  ```
  fetch=[product.title,product.description]
  ```

* **Encoded:**

  ```
  fetch=%5Bproduct.title%2Cproduct.description%5D
  ```

* **JavaScript:**

  ```tsx
  {
    fetch: ["product.title", "product.description"];
  }
  ```

# fetchLinks

This option allows you to retrieve a specific content field from a linked document and add it to the document response object.

fetchLinks can *not* retrieve the following fields:

* Rich text (anything other than the first element)
* Any field in a slice (only the slice zone)

To retrieve the linked content, use the format `[linked-document-type].[field-on-linked-doc]`:

* **Unencoded:**

  ```
  fetchLinks=author.name
  ```

* **Encoded:**

  ```
  fetchLinks=author.name
  ```

* **JavaScript:**

  ```tsx
  {
    fetchLinks: "author.name";
  }
  ```

To retrieve multiple fields, use array syntax:

* **Unencoded:**

  ```
  fetchLinks=[author.name,author.avatar]
  ```

* **Encoded:**

  ```
  fetchLinks=%5Bauthor.name%2Cauthor.avatar%5D
  ```

* **JavaScript:**

  ```tsx
  {
    fetchLinks: ["author.name", "author.avatar"];
  }
  ```

To retrieve a content field inside a group field, use the format `[linked-document-type].[group-on-linked-doc].[field-on-linked-doc]`:

* **Unencoded:**

  ```
  fetchLinks=author.author_group.name
  ```

* **Encoded:**

  ```
  fetchLinks=author.author_group.name
  ```

* **JavaScript:**

  ```tsx
  {
    fetchLinks: ["author.author_group.name"];
  }
  ```

To retrieve the slice zone, use the format `[linked-document-type].body`:

* **Unencoded:**

  ```
  fetchLinks=author.body
  ```

* **Encoded:**

  ```
  fetchLinks=author.body
  ```

* **JavaScript:**

  ```
  { fetchLinks: ['author.body'] }
  ```

# lang

This option allows you to specify what locale you would like to retrieve content from. By default, the API will return content from your master locale.

To specify a particular locale, pass the locale code:

* **Unencoded:**

  ```
  lang=en-us
  ```

* **Encoded:**

  ```
  lang=en-us
  ```

* **JavaScript:**

  ```tsx
  {
    lang: "en-us";
  }
  ```

To retrieve all locales, pass the wildcard value `*`:

* **Unencoded:**

  ```
  lang=*
  ```

* **Encoded:**

  ```
  lang=*
  ```

* **JavaScript:**

  ```tsx
  {
    lang: "*";
  }
  ```

# pageSize

This option defines the maximum number of documents that the API will return for your query. It accepts a number. The default is 20, and the maximum is 100.

* **Unencoded:**

  ```
  pageSize=100
  ```

* **Encoded:**

  ```
  pageSize=100
  ```

* **JavaScript:**

  ```tsx
  {
    pageSize: 100;
  }
  ```

# page

The page option defines the pagination for the result of your query. It defaults to 1, corresponding to the first page.

* **Unencoded:**

  ```
  page=2
  ```

* **Encoded:**

  ```
  page=2
  ```

* **JavaScript:**

  ```tsx
  {
    page: 2;
  }
  ```

# integrationFieldsRef

The [integration field](https://prismic.io/docs/integration.md) allows you to integrate data from third-party services. `integrationFieldsRef` specifies the version of Integration Field data embedded in Prismic documents to query. You can retrieve the latest `integrationFieldsRef` for your repository by making a call to the Repository Endpoint, just like you do to retrieve a standard ref. If you omit `integrationFieldsRef`, you might not get the freshest data from the integration.

* **Unencoded:**

  ```
   integrationFieldsRef=example-repo~7207b47e-3472-4350-bb0c-5a771c0ea671
  ```

* **Encoded:**

  ```
   integrationFieldsRef=example-repo~7207b47e-3472-4350-bb0c-5a771c0ea671
  ```

* **JavaScript:**

  ```tsx
  {
    integrationFieldsRef: "example-repo~7207b47e-3472-4350-bb0c-5a771c0ea671";
  }
  ```

# routes

The `routes` option — also called the route resolver — resolves URL paths for every document based on rules defined by the client. If no `routes` option is specified, the `url` property will be `null`.

The route resolver has the properties `type`, `uid`, `lang`, and `resolvers`. The `resolvers` property has access to the variables `:uid`, `:lang`, and `:[resolver]`. `:lang` and `:[resolver]` can be marked as optional with a question mark `?`.

For a full definition, see the route resolver article:

* [Route Resolver](https://prismic.io/docs/route-resolver.md): \[object Object]

Here is a simple route resolver:

* **Unencoded:**

  ```
  routes=[{"type":"page","path":"/:uid"}]
  ```

* **Encoded:**

  ```
  routes=%5B%7B%22type%22%3A%22page%22%2C%22path%22%3A%22%2F%3Auid%22%7D%5D
  ```

* **JavaScript:**

  ```
  { routes: [{ type: "page", path: "/:uid" }] }
  ```

# brokenRoute

The `brokenRoute` option defines a URL path for broken links.

Broken links occur when a document with inbound content relationships or links is deleted. In the linking documents, the link or content relationship field shows up with `type: broken` and `isBroken: true`. The `routes` option will not generate a `url` property for broken links.

The path defined with `brokenRoute` will populate in the `url` property of broken link and content relationship fields.

* **Unencoded:**

  ```
  brokenRoute=/404
  ```

* **Encoded:**

  ```
  brokenRoute=%2F404
  ```

* **JavaScript:**

  ```tsx
  {
    brokenRoute: "/404";
  }
  ```
