# Resolve

Resolve DOIs, arXiv, OpenAlex, PubMed ids, or exact titles to papers.

`POST /v1/resolve` resolves up to 100 identifiers and 50 titles in one call. It needs the `papers` scope.

Lookups are **free up to 5,000 per calendar month** per workspace. After that they cost $0.10 per 1,000. One call is one lookup, whatever it contains.

## Request [#request]

| field         | type       | notes                                                                                                                         |
| ------------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `identifiers` | `string[]` | DOI (`10.1038/...`), arXiv (`arXiv:2106.09685` or `2106.09685`), OpenAlex (`W2963403868`), PubMed (`pmid:31234567`). Max 100. |
| `titles`      | `string[]` | Exact or near-exact titles. Max 50.                                                                                           |
| `maxResults`  | `int`      | Cap on papers returned. Default 10, max 100.                                                                                  |

Send at least one of `identifiers` or `titles`.

<CodeGroup>
  ```bash title="cURL"
  curl -X POST https://api.anara.com/v1/resolve \
    -H "Authorization: Bearer $ANARA_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"identifiers": ["10.1038/s41586-020-2649-2", "arXiv:1706.03762"]}'
  ```

  ```python title="Python"
  import os
  import requests

  response = requests.post(
      "https://api.anara.com/v1/resolve",
      headers={"Authorization": f"Bearer {os.environ['ANARA_API_KEY']}"},
      json={"identifiers": ["10.1038/s41586-020-2649-2", "arXiv:1706.03762"]},
  )
  print(response.json())
  ```

  ```ts title="TypeScript"
  const response = await fetch('https://api.anara.com/v1/resolve', {
    method: 'POST',
    headers: {
      Authorization: `Bearer ${process.env.ANARA_API_KEY}`,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      identifiers: ['10.1038/s41586-020-2649-2', 'arXiv:1706.03762'],
    }),
  });
  console.log(await response.json());
  ```
</CodeGroup>

## Response [#response]

```json title="Response"
{
  "papers": [
    {
      "id": "W3103145119",
      "title": "Array programming with NumPy",
      "year": 2020,
      "doi": "10.1038/s41586-020-2649-2",
      "authors": ["Charles R. Harris"],
      "citedByCount": 12000,
      "openAccess": true,
      "hasFulltext": true
    },
    {
      "id": "W2963403868",
      "title": "Attention Is All You Need",
      "authors": ["Ashish Vaswani"],
      "year": 2017,
      "arxivId": "1706.03762",
      "citedByCount": 100000,
      "openAccess": true,
      "hasFulltext": true
    }
  ],
  "resolutions": [
    {
      "input": "10.1038/s41586-020-2649-2",
      "status": "resolved",
      "paperIds": ["W3103145119"]
    },
    {
      "input": "arXiv:1706.03762",
      "status": "resolved",
      "paperIds": ["W2963403868"]
    }
  ],
  "charge": { "costMicroUsd": 0, "balanceMicroUsd": 10000000 }
}
```

`resolutions` has one entry per input. `status` is `resolved`, `ambiguous` (a title matched more than one paper; all ids are listed), or `unresolved`.

Each paper includes `venue`, `publicationDate` (the full indexed date, not just `year`), `field`, `language`, `arxivId`, `pmcid`, and `pmid` alongside `doi` when available. Missing metadata is omitted. `openAlexId` is not exposed.
