> For the complete documentation index, see [llms.txt](https://fair-indonesia.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fair-indonesia.gitbook.io/docs/developers/dictionaries.md).

# Dictionaries

Several search filters in [Creator Search & Analytics](/docs/developers/api-reference/creator-search-analytics.md) take Fair's own identifiers rather than free text — locations, languages, brands, interests, and topics. The **dictionary** endpoints turn a search string into those identifiers, which you then pass into `POST /discovery`.

For example, to filter `discovery` by audience location you first look the location up:

```bash
curl "https://stg.api.fair-indonesia.com/api/fairservice/dictionary/locations?search_string=jakarta" \
  -H "Authorization: <your_token>"
```

```json
{ "locations": [ { "id": "0244d71d-...", "name": "Jakarta", "type": "city" } ] }
```

…then pass the returned `id` into the `audience_locations` (or `creator_locations`) filter.

## Available dictionaries

| Dictionary      | Endpoint                           | Feeds these filters                                                       |
| --------------- | ---------------------------------- | ------------------------------------------------------------------------- |
| Locations       | `GET /dictionary/locations`        | `audience_locations`, `creator_locations`                                 |
| Languages       | `GET /dictionary/languages`        | `audience_language`, `creator_language`                                   |
| Brands          | `GET /dictionary/brands`           | `audience_brand_affinities`, `creator_brand_affinities`, `brand_sponsors` |
| Interests       | `GET /dictionary/interests`        | `audience_interests`, `creator_interests`                                 |
| Topics          | `GET /dictionary/topics`           | `topic_relevance`                                                         |
| Topic relevance | `GET /dictionary/topics/relevance` | weight for a topic tag                                                    |
| User handles    | `GET /dictionary/userhandles`      | autocomplete a username as the user types                                 |

Each takes `search_string`, `limit`, and `offset` query parameters. Full request and response details are in the [Creator Search & Analytics reference](/docs/developers/api-reference/creator-search-analytics.md).

{% hint style="info" %}
Dictionary data changes rarely. Cache the responses on your side (about 15 days is fine) instead of calling these on every search.
{% endhint %}

## Related

* [Creator Search & Analytics](/docs/developers/api-reference/creator-search-analytics.md)
* [Guides → Find creators for a campaign](/docs/developers/guides/find-creators-for-a-campaign.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://fair-indonesia.gitbook.io/docs/developers/dictionaries.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
