# Crossref MCP — Academic DOI & Literature Metadata (`red.cars/crossref-mcp`) Actor

AI agent access to 120M+ academic papers, books, and conference proceedings via Crossref API. Search works, get detailed metadata, fetch references, and export BibTeX.

- **URL**: https://apify.com/red.cars/crossref-mcp.md
- **Developed by:** [AutomateLab](https://apify.com/red.cars) (community)
- **Categories:** MCP servers, AI
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Crossref MCP — Academic DOI & Literature Metadata

**Type:** Apify MCP Actor (JavaScript)  
**Purpose:** AI agent access to 120M+ academic papers, books, and conference proceedings via Crossref API  
**Stack:** Apify SDK, Node.js 20+, MCP protocol, standby mode

### Quick Start

```bash
cd ~/Projects/apify-actors/crossref-mcp
apify run          # Local development
apify push         # Deploy to Apify
````

### Key Files

- `src/main.js` — MCP handler entry point with `handleTool` export
- `.actor/actor.json` — Standby mode enabled (`usesStandbyMode: true`)
- `Dockerfile` — Node.js 24 runtime
- `package.json` — Dependencies (apify ^3.6.0)

### Architecture

- **Standby MCP** via `handleRequest` export
- **Readiness probe** at GET / (checks `x-apify-container-server-readiness-probe` header)
- **PPE (Pay-Per-Event) charging** for each tool invocation
- **ERROR\_RETRY** with exponential backoff (3 retries, 2s base delay)
- **Crossref API** at `https://api.crossref.org/works`

### Tools

| Tool | Description | PPE |
|------|-------------|-----|
| `searchWorks` | Search academic works by query, author, DOI, ISSN, date range | $0.03 |
| `getWorkDetails` | Get full metadata for a work by DOI (authors, abstract, funding) | $0.02 |
| `getReferences` | Get bibliography/reference list for a work by DOI | $0.04 |
| `exportBibTeX` | Export works as BibTeX, RIS, or JSON citation format | $0.01 |

### API Operations

#### searchWorks

Search for academic works by keyword, author, or filters.

```json
{
  "operation": "searchWorks",
  "parameters": {
    "query": "machine learning",
    "author": "Hinton",
    "type": "journal-article",
    "from_date": "2020-01-01",
    "max_results": 20
  }
}
```

**Returns:** Array of works with title, authors, DOI, publication date, journal, abstract, and citation counts.

#### getWorkDetails

Get full metadata for a specific work by DOI.

```json
{
  "operation": "getWorkDetails",
  "parameters": {
    "doi": "10.1038/nature12373",
    "include_references": true
  }
}
```

**Returns:** Complete metadata including authors with ORCIDs, abstract, funding info, license, references, and more.

#### getReferences

Get the reference list (bibliography) for a work.

```json
{
  "operation": "getReferences",
  "parameters": {
    "doi": "10.1038/nature12373",
    "max_references": 50
  }
}
```

**Returns:** Array of references with DOI, title, author, year, journal, pages.

#### exportBibTeX

Export one or more works as citation strings.

```json
{
  "operation": "exportBibTeX",
  "parameters": {
    "dois": ["10.1038/nature12373", "10.1126/science.1259856"],
    "format": "bibtex"
  }
}
```

**Returns:** Formatted citation string(s) in BibTeX, RIS, or JSON format.

### Input Schema

The actor accepts an `INPUT` JSON with `operation` and `parameters`:

```json
{
  "operation": "searchWorks",
  "parameters": {
    "query": "deep learning",
    "max_results": 10
  }
}
```

### PPE Pricing

This actor uses Apify's Pay-Per-Event pricing model. Each tool invocation incurs a small charge to cover Crossref API costs:

| Event | Charge |
|-------|--------|
| `searchWorks` | $0.03 |
| `getWorkDetails` | $0.02 |
| `getReferences` | $0.04 |
| `exportBibTeX` | $0.01 |

### Error Handling & Retry

The actor implements automatic retry with exponential backoff:

- **3 retries** on API failure
- **Base delay:** 2 seconds, doubling each retry (2s → 4s → 8s)
- **Rate limit handling:** Detects 429 responses, waits for Retry-After header

### Data Sources

- **Crossref API:** The official REST API for Crossref metadata
- **Coverage:** 120M+ works from 90,000+ publishers
- **Types:** Journal articles, books, conference proceedings, datasets, preprints, etc.

### MCP Protocol

This actor implements the Model Context Protocol (MCP) for AI agent integration:

- `initialize` — Returns server capabilities
- `tools/list` — Returns available tools and schemas
- `tools/call` — Executes a tool by name with parameters
- `handleRequest` — Legacy operation handler (operation + parameters)

### Deployed Actor

The actor runs at: `crossref-mcp.apify.actor`

### Rate Limits

The Crossref API has rate limits:

- **Polite pool:** 50 requests/second (with email)
- **Default:** 25 requests/second
- **Unauthenticated:** Heavily rate limited

The actor uses the polite pool (`mailto=apify@example.com`) and implements retry on 429 responses.

### Notes

- All dates are in ISO format (YYYY-MM-DD)
- DOIs are cleaned automatically (handles `https://doi.org/` prefixes)
- Abstracts are stripped of HTML tags
- BibTeX output escapes LaTeX special characters
- References are capped at 100 per request to avoid timeouts

# Actor input Schema

## `tool` (type: `string`):

MCP tool to call

## `params` (type: `object`):

Tool parameters as JSON object

## Actor input object example

```json
{
  "tool": "searchWorks",
  "params": {
    "query": "machine learning",
    "max_results": 10
  }
}
```

# 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 = {
    "tool": "searchWorks",
    "params": {
        "query": "machine learning",
        "max_results": 10
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("red.cars/crossref-mcp").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 = {
    "tool": "searchWorks",
    "params": {
        "query": "machine learning",
        "max_results": 10,
    },
}

# Run the Actor and wait for it to finish
run = client.actor("red.cars/crossref-mcp").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "tool": "searchWorks",
  "params": {
    "query": "machine learning",
    "max_results": 10
  }
}' |
apify call red.cars/crossref-mcp --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=red.cars/crossref-mcp",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Crossref MCP — Academic DOI & Literature Metadata",
        "description": "AI agent access to 120M+ academic papers, books, and conference proceedings via Crossref API. Search works, get detailed metadata, fetch references, and export BibTeX.",
        "version": "1.0",
        "x-build-id": "96qyAxuIqxCdV6NhA"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/red.cars~crossref-mcp/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-red.cars-crossref-mcp",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/red.cars~crossref-mcp/runs": {
            "post": {
                "operationId": "runs-sync-red.cars-crossref-mcp",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/red.cars~crossref-mcp/run-sync": {
            "post": {
                "operationId": "run-sync-red.cars-crossref-mcp",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "tool",
                    "params"
                ],
                "properties": {
                    "tool": {
                        "title": "Tool Name",
                        "enum": [
                            "searchWorks",
                            "getWorkDetails",
                            "getReferences",
                            "exportBibTeX"
                        ],
                        "type": "string",
                        "description": "MCP tool to call"
                    },
                    "params": {
                        "title": "Parameters (JSON)",
                        "type": "object",
                        "description": "Tool parameters as JSON object"
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
