---
search:
  tags:
    - Catalog
    - GET
seo:
  description: >-
    Resolves an author or book name to the catalog IDs that search filters take.
    Returns up to five candidates with the author's death year (AH) and a match
    score.
sidebar:
  label: Look up an author or book
  badge: GET
title: Look up an author or book
type: openapi-operation
---
Resolves an author or book name to the catalog IDs that search filters take. Returns up to five candidates with the author's death year (AH) and a match score.

`GET /catalog/lookup`

URL: `https://api.qaf.ai/v1/catalog/lookup`

**Parameters**

- `type` (query, string, required, one of `author`, `book`) — Whether the name is an author or a book.
- `query` (query, string, required, 1–200 characters) — The name to resolve, in Arabic or English.
- `locale` (query, string, one of `ar`, `en`, default `en`) — Language of the candidate labels; no other is returned.

**Responses**

- `200` — The candidates for the name.
- `401` — The API key is missing, invalid or revoked.
- `403` — The key's account can't use the API.
- `422` — A field is invalid. data.fieldErrors lists the problems by field.
- `429` — Too many requests; data.reason says which limit was reached. For minute, the account's requests per minute, retry after Retry-After seconds. For day, the account's daily search cap, Retry-After is the time until the cap resets. For invalid\_keys, the key doesn't exist or was revoked and this address has sent too many such keys, so fix the key rather than retrying. The X-RateLimit headers describe the account's minute window, so an invalid\_keys refusal, which comes before any key is known, has none.
- `500` — Something went wrong on our side.
- `503` — Qaf could not complete the request in time, or a service it relies on is unavailable. Retry shortly.

Response example, 200:

```json
{
  "candidates": [
    {
      "type": "author",
      "id": 54,
      "label": "Ibn Taymiyya",
      "deathYearAH": 728,
      "deathInexactLabel": null,
      "matchScore": 1
    },
    {
      "type": "author",
      "id": 988,
      "label": "Majd al-Din Ibn Taymiyya",
      "deathYearAH": 652,
      "deathInexactLabel": null,
      "matchScore": 0.95
    }
  ]
}
```
