# Citation Formatter: APA, MLA, Chicago, IEEE & BibTeX (`pandadad0214/citation-formatter`) Actor

Turn DOIs, ISBNs, arXiv IDs, titles or messy references into APA 7, MLA 9, Chicago, Harvard, IEEE and Vancouver citations plus BibTeX and RIS. Looks up Crossref, DataCite and Open Library, formats with citeproc-js and official CSL styles, and flags anything uncertain.

- **URL**: https://apify.com/pandadad0214/citation-formatter.md
- **Developed by:** [Panda Federation](https://apify.com/pandadad0214) (community)
- **Categories:** AI, Education, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Citation Formatter: DOI to APA, MLA, Chicago, Harvard, IEEE, Vancouver, BibTeX & RIS

**Paste DOIs, ISBNs, arXiv IDs, titles or a messy reference list. Get clean citations in six styles plus BibTeX and RIS, with a flag on anything that needs a second look.**

Formatting references by hand is slow, and online generators guess. **Citation Formatter** looks every reference up in the official registries (**Crossref**, **DataCite**, **Open Library**, plus **PubMed** for PMIDs), then formats it with **citeproc-js**, the open-source citation engine behind Zotero and Mendeley, using the **official CSL style files**. Nothing is hand-rolled, so the commas, italics and initials follow the style guide.

- 📚 **Six styles in one run:** APA 7, MLA 9, Chicago author-date (18th ed.), Harvard (Cite Them Right 12th ed.), IEEE and Vancouver (NLM)
- 🔁 **Exports for reference managers:** BibTeX (.bib) for LaTeX and Overleaf, and RIS (.ris) for Zotero, Mendeley, EndNote and Rayyan
- 🧭 **Takes whatever you have:** DOIs, DOI links, ISBNs, arXiv IDs, PMIDs, bare titles, references in any style, or a pasted .bib/.ris file
- 🚦 **Honest confidence:** every reference is marked **OK**, **CHECK** or **FIX**, with a plain-language reason
- 🧹 **Cleans up registry data:** sentence-case titles for APA, initials fixed ("AJ" → "A. J."), series vs. book title for conference chapters, duplicates removed
- 💸 **$0.003 per formatted citation.** All six styles, BibTeX and RIS are included in that price. References we can't find are free.

### Who it's for

- **Researchers, grad students and postdocs:** convert a bibliography from one journal's style to another before submission.
- **Editors, proofreaders and thesis formatters:** turn a messy reference list into a clean APA or Harvard list in seconds, then spend your time on the edge cases we flag.
- **Librarians and research support teams:** batch-convert reading lists and export them to Zotero or EndNote.
- **Developers and AI agents:** turn DOIs into formatted citations through the Apify API or MCP, without maintaining a citation engine.

### How to use it

1. Click **Try for free**. Put one reference per line in **References**, or paste a whole list (or a .bib/.ris file) into **Paste a reference list**.
2. Pick your **styles** (all six are on by default and cost the same).
3. Click **Start**. Ten references usually take 10–20 seconds (preprint titles without a DOI can take up to a minute while we search DataCite).
4. Download the ready-to-paste bibliography from **Storage → Key-value store** (`BIBLIOGRAPHY_APA`, `BIBLIOGRAPHY_APA_HTML` with italics for Word or Google Docs, `BIBLIOGRAPHY_BIBTEX`, `BIBLIOGRAPHY_RIS`...), or open the **Formatted citations** table.
5. Open **Needs review** to see the CHECK and FIX items and why they were flagged.

#### Input example

```json
{
  "references": [
    "10.1038/nature14539",
    "ISBN 978-0-262-03384-8",
    "arXiv:1706.03762",
    "PMID: 26017442",
    "He K, Zhang X, Ren S, Sun J. Deep residual learning for image recognition. CVPR 2016",
    "https://doi.org/10.1016/S0140-6736(97)11096-0"
  ],
  "text": "@article{watson1953,\n  author = {Watson, J. D. and Crick, F. H. C.},\n  title = {Molecular Structure of Nucleic Acids},\n  journal = {Nature}, volume = {171}, number = {4356},\n  pages = {737--738}, year = {1953}, doi = {10.1038/171737a0}\n}",
  "styles": ["apa", "mla", "chicago", "harvard", "ieee", "vancouver"],
  "includeBibtex": true,
  "includeRis": true
}
```

### Output example

Real output from a platform run:

**APA 7**

> LeCun, Y., Bengio, Y., & Hinton, G. (2015). Deep learning. *Nature, 521*(7553), 436–444. https://doi.org/10.1038/nature14539
>
> Cormen, T. H., Leiserson, C. E., Rivest, R. L., & Stein, C. (2009). *Introduction to algorithms* (3rd ed.). The MIT Press.
>
> Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, L., & Polosukhin, I. (2017). *Attention is all you need* (arXiv:1706.03762). arXiv. https://doi.org/10.48550/ARXIV.1706.03762

**MLA 9**

> LeCun, Yann, et al. “Deep Learning.” *Nature*, vol. 521, no. 7553, May 2015, pp. 436–44, https://doi.org/10.1038/nature14539.

**Chicago author-date**

> LeCun, Yann, Yoshua Bengio, and Geoffrey Hinton. 2015. “Deep Learning.” *Nature* 521 (7553): 436–44. https://doi.org/10.1038/nature14539.

**Harvard (Cite Them Right)**

> LeCun, Y., Bengio, Y. and Hinton, G. (2015) ‘Deep learning’, *Nature*, 521(7553), pp. 436–444. Available at: https://doi.org/10.1038/nature14539.

**IEEE**

> \[1] K. He, X. Zhang, S. Ren, and J. Sun, “Deep residual learning for image recognition,” in *2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR)*, IEEE, Jun. 2016, pp. 770–778. doi: 10.1109/cvpr.2016.90.

**Vancouver (NLM)**

> 1. LeCun Y, Bengio Y, Hinton G. Deep learning. Nature. 2015 May 27;521(7553):436–44. doi:10.1038/nature14539

One dataset row per reference (shortened):

```json
{
  "index": 1,
  "input": "10.1038/nature14539",
  "inputType": "doi",
  "status": "OK",
  "confidence": 1,
  "matchMethod": "doi",
  "doi": "10.1038/nature14539",
  "title": "Deep learning",
  "authors": "LeCun, Yann; Bengio, Yoshua; Hinton, Geoffrey",
  "year": 2015,
  "apa": "LeCun, Y., Bengio, Y., & Hinton, G. (2015). Deep learning. Nature, 521(7553), 436–444. https://doi.org/10.1038/nature14539",
  "mla": "LeCun, Yann, et al. “Deep Learning.” Nature, vol. 521, no. 7553, May 2015, pp. 436–44, https://doi.org/10.1038/nature14539.",
  "inText": {"apa": "(LeCun et al., 2015)", "mla": "(LeCun et al.)", "harvard": "(LeCun, Bengio and Hinton, 2015)", "ieee": "[1]"},
  "bibtex": "@article{LeCun2015Deep, ...}",
  "ris": "TY  - JOUR ...",
  "warnings": []
}
```

#### What OK, CHECK and FIX mean

| Status | Meaning | Charged? |
|---|---|---|
| 🟢 **OK** | Exact DOI/ISBN lookup, or a text match with 90%+ confidence | Yes |
| 🟡 **CHECK** | Formatted, but read the note first: the match was by title only, the venue or version differs (e.g. arXiv vs. proceedings), the record is retracted, or the registry is missing authors or a date | Yes (duplicates are free) |
| 🔴 **FIX** | Not found anywhere. Often a typo, a non-DOI source, or a fabricated reference. Listed at the end of each bibliography file as `[UNRESOLVED - check manually]` | No |

Retracted papers are flagged in CHECK. To screen a whole bibliography for fabricated citations, retractions and wrong details, run our sister Actor, **[Reference Checker: Fake Citation & Retraction Detector](https://apify.com/pandadad0214/reference-checker)**.

### Files you get

| Key-value store key | What it is |
|---|---|
| `BIBLIOGRAPHY_APA`, `_MLA`, `_CHICAGO`, `_HARVARD`, `_IEEE`, `_VANCOUVER` | Plain-text bibliography per style, sorted the way the style requires (alphabetical or numbered) |
| `BIBLIOGRAPHY_<STYLE>_HTML` | The same list with italics and hanging indents. Open it and paste into Word or Google Docs |
| `BIBLIOGRAPHY_BIBTEX` | Combined .bib file |
| `BIBLIOGRAPHY_RIS` | Combined .ris file |
| `BIBLIOGRAPHY_CSL_JSON` | Cleaned CSL-JSON, for Pandoc, Zotero or your own code |
| `SUMMARY` | Counts by status and the list of files |

### Pricing

**$0.003 per formatted citation** (pay-per-event). Every selected style, BibTeX, RIS and in-text citations are included.

| References | Cost |
|---|---|
| 50 (a typical paper) | $0.15 |
| 300 (a thesis) | $0.90 |
| 1,000 | $3.00 |

Unresolved references and duplicates are never charged. You can also set a maximum charge per run in Apify.

### FAQ

**How accurate is the formatting?**
Formatting is done by citeproc-js with the official CSL styles, the same engine and styles used by Zotero and Mendeley. We checked the output against hand-verified examples from the APA, MLA, Chicago, Cite Them Right, IEEE and NLM guides. The weak spot of every citation tool is the source data, so we fix the common registry problems: Title Case titles, bare initials, and the series printed in place of the book title.

**Why did my title change case?**
APA, Harvard, IEEE and Vancouver use sentence case. Registries usually store Title Case, so we convert it, keeping acronyms (CVPR, mRNA), mixed-case words (iPhone) and names like Covid-19 or U-Net. A tool can't always tell a proper noun from an ordinary word, so check converted titles for names and places (each one carries a note). You can turn this off with **Sentence-case titles**.

**What about books, preprints and datasets?**
Books resolve by ISBN through Open Library, including the edition. arXiv preprints resolve through their DataCite DOIs, and datasets and software on Zenodo, Dryad or Figshare resolve by DOI.

**Can it handle references without a DOI?**
Yes. Free-text references and titles are matched against Crossref, OpenAlex and DataCite. A match needs a high title, author and year score, and weaker matches are refused rather than guessed (FIX). Websites, newspaper articles and grey literature without a DOI or ISBN usually end up as FIX.

**Can I call it from code or an AI agent?**
Yes, through the Apify API, the Python or JavaScript clients, or Apify's MCP server. Send DOIs and get formatted citations back in one call.

**Does it scrape websites?**
No. It only uses official public APIs (Crossref, DataCite, Open Library, NCBI E-utilities, OpenAlex), follows their rate limits and identifies itself politely.

### Data sources and credits

- [Crossref](https://www.crossref.org) and [DataCite](https://datacite.org) metadata via DOI content negotiation, plus the Crossref REST API
- [Open Library](https://openlibrary.org) for ISBNs, [NCBI E-utilities](https://www.ncbi.nlm.nih.gov/books/NBK25501/) for PMIDs, and [OpenAlex](https://openalex.org) for title matching
- [citeproc-js](https://github.com/Juris-M/citeproc-js) and [citation.js](https://citation.js.org) for formatting and BibTeX/RIS
- Styles and locales from the [CSL project](https://citationstyles.org) (CC BY-SA 3.0)

***

#### Built by Panda Federation

**Self-healing, local-first AI systems and data tools that run themselves.**

Panda Federation builds small, dependable tools that do one job well and keep doing it. Citation Formatter is the second module in our research toolkit, next to **[Reference Checker](https://apify.com/pandadad0214/reference-checker)**.

[More from Panda Federation on Apify](https://apify.com/pandadad0214) · [GitHub](https://github.com/pandadad0214)

# Actor input Schema

## `references` (type: `array`):

DOIs, DOI links, ISBNs, arXiv IDs, PMIDs ("PMID: 123"), paper titles, or messy reference strings in any style. Each one is looked up and formatted.

## `text` (type: `string`):

Optional. Paste a whole bibliography (numbered, one per line, or blank-line separated), or the contents of a .bib (BibTeX) or .ris file. BibTeX/RIS entries are converted directly without a lookup.

## `styles` (type: `array`):

Styles to output. All six are included in the price, so pick as many as you like.

## `includeBibtex` (type: `boolean`):

Add a BibTeX entry per reference and a combined .bib file (LaTeX, Overleaf, JabRef).

## `includeRis` (type: `boolean`):

Add an RIS entry per reference and a combined .ris file (Zotero, Mendeley, EndNote, Rayyan).

## `sentenceCaseTitles` (type: `boolean`):

APA, Harvard, IEEE and Vancouver use sentence case ("Deep residual learning for image recognition"). Registries often store Title Case, so we convert it; acronyms like CVPR, mRNA and COVID-19 are kept. MLA and Chicago re-capitalise automatically. Check proper nouns (names, places) in converted titles.

## `fixAllCapsTitles` (type: `boolean`):

Some registry records store titles in capitals. Convert them to sentence case.

## `listUnresolvedInFiles` (type: `boolean`):

Append references we could not find to the end of each bibliography file, marked \[UNRESOLVED - check manually], so nothing silently disappears. They are never charged.

## `minMatchScore` (type: `integer`):

How closely a search result must match a free-text reference (title, authors, year) to be used. DOIs and ISBNs are exact lookups and are not affected.

## `maxReferences` (type: `integer`):

Safety cap. Only formatted citations are billed.

## `contactEmail` (type: `string`):

Optional. Sent to Crossref and NCBI as the contact so requests use their faster 'polite' pools. Never shared elsewhere.

## Actor input object example

```json
{
  "references": [
    "10.1038/nature14539",
    "ISBN 978-0-262-03384-8",
    "arXiv:1706.03762",
    "He K, Zhang X, Ren S, Sun J. Deep residual learning for image recognition. CVPR 2016"
  ],
  "styles": [
    "apa",
    "mla",
    "chicago",
    "harvard",
    "ieee",
    "vancouver"
  ],
  "includeBibtex": true,
  "includeRis": true,
  "sentenceCaseTitles": true,
  "fixAllCapsTitles": true,
  "listUnresolvedInFiles": true,
  "minMatchScore": 80,
  "maxReferences": 1000
}
```

# Actor output Schema

## `citations` (type: `string`):

One row per reference with every selected style, status and notes.

## `needsReview` (type: `string`):

References marked CHECK or FIX, with the reason.

## `bibApa` (type: `string`):

No description

## `bibMla` (type: `string`):

No description

## `bibChicago` (type: `string`):

No description

## `bibHarvard` (type: `string`):

No description

## `bibIeee` (type: `string`):

No description

## `bibVancouver` (type: `string`):

No description

## `bibApaHtml` (type: `string`):

No description

## `bibtex` (type: `string`):

No description

## `ris` (type: `string`):

No description

## `summary` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "references": [
        "10.1038/nature14539",
        "ISBN 978-0-262-03384-8",
        "arXiv:1706.03762",
        "He K, Zhang X, Ren S, Sun J. Deep residual learning for image recognition. CVPR 2016"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("pandadad0214/citation-formatter").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "references": [
        "10.1038/nature14539",
        "ISBN 978-0-262-03384-8",
        "arXiv:1706.03762",
        "He K, Zhang X, Ren S, Sun J. Deep residual learning for image recognition. CVPR 2016",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("pandadad0214/citation-formatter").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "references": [
    "10.1038/nature14539",
    "ISBN 978-0-262-03384-8",
    "arXiv:1706.03762",
    "He K, Zhang X, Ren S, Sun J. Deep residual learning for image recognition. CVPR 2016"
  ]
}' |
apify call pandadad0214/citation-formatter --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,pandadad0214/citation-formatter"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/Fty4gleCl3WepugAj/builds/k8JeNWCP2iy1xTOI3/openapi.json
