Documentation
Learn how to integrate CitationAPI into your application. Generate perfectly formatted citations from any URL with a single API call.
Base URL
https://api.citationapi.comGetting Started
Get up and running in under a minute.
Copy your API key
Find it on your dashboard after signing in.
Make a request
Use the example below to cite your first URL.
curl -X POST https://api.citationapi.com/v1/citations \
-H "Content-Type: application/json" \
-H "X-API-Key: ca_live_your_key_here" \
-d '{"url": "https://doi.org/10.1038/s41586-020-2649-2"}'Authentication
Authenticate requests with an API key.
All API requests require an API key passed in the X-API-Key header. You can create and manage API keys from your dashboard.
X-API-Key: ca_live_your_key_hereNote: Requests without a valid API key will receive a 401 Unauthorized response. Sign up for a free account to get your API key.
Endpoints
Create and retrieve citations.
/v1/citationsCreate a citation from a URL. Returns structured CSL-JSON metadata and pre-formatted citations.
Request Body
| Parameter | Type | Status | Description |
|---|---|---|---|
url | string | Required | The URL to generate a citation for. |
style | string | Optional | Any CSL style ID (e.g. apa, mla, chicago, ieee, vancouver, and 9,000+ more). Omit to return all default styles (APA, MLA, Chicago, BibTeX). |
force | boolean | Optional | Bypass cache and re-extract. Default: false. |
Example Request
{
"url": "https://doi.org/10.1038/s41586-020-2649-2",
"style": "apa",
"force": false
}Response
{
"id": "a1b2c3d4e5f6...",
"url": "https://doi.org/10.1038/s41586-020-2649-2",
"source": "crossref",
"confidence": 0.98,
"csl": {
"type": "article-journal",
"title": "Array programming with NumPy",
"author": [
{"family": "Harris", "given": "Charles R."},
{"family": "Millman", "given": "K. Jarrod"}
],
"issued": {"date-parts": [[2020, 9, 16]]},
"container-title": "Nature",
"volume": "585",
"issue": "7825",
"page": "357-362",
"DOI": "10.1038/s41586-020-2649-2"
},
"formatted": {
"apa": "Harris, C. R., Millman, K. J., ... (2020). Array programming with NumPy. Nature, 585(7825), 357–362.",
"mla": "Harris, Charles R., et al. \"Array Programming with NumPy.\" Nature, vol. 585, ...",
"chicago": "Harris, Charles R., K. Jarrod Millman, ... 2020. \"Array Programming with NumPy.\" ...",
"bibtex": "@article{harris2020array, ...}"
},
"cached": false,
"extracted_at": "2025-02-10T14:30:00Z"
}/v1/citations/:idRetrieve a previously extracted citation by its hash ID. Returns the same response format as the POST endpoint.
Path Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
id | string | Required | The SHA256 hash ID returned from the POST endpoint. |
Rate Limits
Limits vary by plan and are applied per API key.
| Plan | Rate Limit | Monthly Requests |
|---|---|---|
| Free | 10 req/min | 500 |
| Developer | 60 req/min | 50,000 |
| Pro | 300 req/min | 500,000 |
When rate limited, the API returns 429 Too Many Requests. Cached responses do not count against your extraction quota.
Error Codes
Standard HTTP error codes with descriptive messages.
| Code | Meaning | Description |
|---|---|---|
400 | Bad Request | Missing or invalid URL in request body |
401 | Unauthorized | Invalid or missing API key |
404 | Not Found | Citation ID not found in cache |
422 | Unprocessable | URL is valid but could not be cited (extraction failed across all layers) |
429 | Rate Limited | Too many requests — slow down or upgrade plan |
500 | Server Error | Internal error — retry with exponential backoff |
CSL-JSON Schema
The canonical data format for citation metadata.
CitationAPI uses CSL-JSON (Citation Style Language JSON) as its canonical data format. This is the same schema used by Zotero, Mendeley, and other reference managers.
Key Fields
| Field | Type | Description |
|---|---|---|
type | string | CSL type: "article-journal", "book", "software", "post", etc. |
title | string | Title of the work |
author | array | Array of name objects with "family" and "given" or "literal" keys |
issued | object | Publication date as date-parts array |
container-title | string | Journal name, book title, or repository |
DOI | string | Digital Object Identifier |
URL | string | Source URL of the work |
Example Object
{
"type": "article-journal",
"title": "Array programming with NumPy",
"author": [
{"family": "Smith", "given": "John"},
{"literal": "Organization Name"}
],
"issued": {
"date-parts": [[2024, 3, 15]]
},
"container-title": "Nature",
"volume": "585",
"issue": "7825",
"page": "357-362",
"DOI": "10.1038/s41586-020-2649-2",
"URL": "https://example.com",
"abstract": "..."
}The csl field in every API response contains the full CSL-JSON object. You can use this with any CSL-compatible tool to render citations in custom styles.
Ready to get started?
Get your free API key and start citing in seconds.