# API Reference

## Introduction

The content delivery API provides common query parameters like `limit`, `offset` and `sorting`, but also offers advanced methods such as `filters` , `locale` for list endpoints like [All Documents](/apis/rest-api/endpoints.md#all-documents) and [Collections](/apis/rest-api/endpoints.md#document-collections).

Queries are submitted per `GET` method either by query parameters e.g. or as an URI Encoded JSON Object.

Queries longer than 11kB that can't be submitted using the `GET` method, and must be sent using the `POST` method. The payload is a JSON Object ([Example](/apis/rest-api/examples/sorting.md#post-request))

{% hint style="success" %}
`POST` requests up to 2kB are also supported by the API CDN Cache.
{% endhint %}

## List of available Parameter Names

* `limit`
* `offset`
* [`sorting`](/apis/rest-api/filters/sorting.md)
* [`filters`](/apis/rest-api/filters/filters.md)
* [`locale`](/apis/rest-api/filters/localisation.md)
* [`fields`](/apis/rest-api/filters/reducing-payloads.md)
* [`includes`](/apis/rest-api/filters/includes.md)
* [`embedAssets`](/apis/rest-api/filters/includes.md#embed-assets)
* [`includeTags`](/apis/rest-api/filters/filters.md#include-tags)
* [`excludeTags`](/apis/rest-api/filters/filters.md#exclude-tags)
* [`search`](/apis/rest-api/filters/search.md)

## API CDN Cache

Each request gets cached by a global CND Cache provided by [Fastly](https://www.fastly.com/). An API CDN Cache does not only boost the speed of responses for edge cases and in general, but also greatly increases the reliability and robustness of an API.

The first API call will hit our servers to provide the response. This response is cached and every additional call for the same route will be provided from the cache as long as the returned data for this call doesn't change.

## Field Types

| **Name**    | **API Output**  |
| ----------- | --------------- |
| Text        | `string`        |
| Richtext    | `{plain, html}` |
| Number      | `number`        |
| Select      | `string\|array` |
| Assets      | `array`         |
| Date & Time | `string`        |
| Relation    | `object\|array` |
| Location    | `object`        |
| Boolean     | `boolean`       |
| JSON        | `object`        |
| Color       | `string`        |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.comfortable.io/apis/rest-api/filters.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
