---
title: "Search keys"
method: POST
path: "/projects/{project_id}/keys/search"
tags: ["Keys"]
---

# Search keys

`POST /projects/{project_id}/keys/search`

Search keys for the given project matching query.

## Path parameters

- `project_id` string, required

## Query parameters

- `page` integer
- `per_page` integer

## Headers

- `X-PhraseApp-OTP` string

## Request body

- object
  - `branch` string — specify the branch to use
  - `sort` string — Sort by field. Can be one of: name, created_at, updated_at.
  - `order` string — Order direction. Can be one of: asc, desc.
  - `q` string — Specify a query to do broad search for keys by name (including wildcards). The following qualifiers are also supported in the search term: * `ids:key_id,...` for queries on a comma-separated list of ids * `name:key_name,...` for text queries on a comma-seperated list of exact key names - spaces, commas, and colons need to be escaped with double backslashes * `tags:tag_name,...` to filter for keys with certain comma-seperated list of tags * `uploads:upload_id,...` to filter for keys with certain comma-seperated list of uploads * `job:{true|false}` to filter for keys mentioned in an active job * `translated:{true|false}` for translation status (also requires `locale_id` to be specified) * `updated_at:{>=|<=}2013-02-21T00:00:00Z` for date range queries * `unmentioned_in_upload:upload_id,...` to filter keys unmentioned within upload. When multiple upload IDs provided, matches only keys not mentioned in **all** uploads Find more examples [here](/en/api/strings/usage-examples). Please note: If `tags` are added to filter the search, the search will be limited to a maximum of 65,536 tagged keys.
  - `locale_id` string — Locale used to determine the translation state of a key when filtering for untranslated or translated keys.

## Response `200`

OK

- TranslationKey[]
  - `id` string
  - `name` string
  - `description` string
  - `name_hash` string
  - `plural` boolean
  - `use_ordinal_rules` boolean
  - `tags` string[]
  - `data_type` string
  - `created_at` string, date-time
  - `updated_at` string, date-time

## Other responses

- `400` — Bad request. The request could not be parsed or a parameter failed validation. Verify the request body, the content type, and the parameter types, then retry.
- `401` — Unauthorized. Authentication failed because the access token is missing, expired, or invalid. Supply a valid access token and retry.
- `403` — Forbidden. The credentials are valid but not permitted for this request: the access token may lack the required scope, the user may lack permission on the resource, or the account plan may not include the feature. Use a token with the required scope on an account and user that hold the necessary permissions.
- `404` — Not found. The requested resource does not exist or is not visible to the authenticated user. Verify the identifiers in the request path and that the token has access to them, then retry.
- `429` — Too many requests. The rate limit has been exceeded. Wait until the time indicated by the `X-Rate-Limit-Reset` response header before retrying.

---

[API](https://skmtc.net/phrase/apis/control-hub-service.md) · [All operations](https://skmtc.net/phrase/apis/control-hub-service/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/phrase/control-hub-service/revisions/98ecac7ba2bf/schema)
