# Crossref Works Metadata (`lanternlab318/crossref-works`) Actor

Search public scholarly bibliographic metadata by keywords or resolve bare DOIs for reference enrichment.

- **URL**: https://apify.com/lanternlab318/crossref-works.md
- **Developed by:** [Lantern Lab](https://apify.com/lanternlab318) (community)
- **Categories:** Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.49 / 1,000 work results

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

## Crossref Works Metadata

Search public scholarly bibliographic metadata by keywords or resolve bare DOIs for reference enrichment.

### Input

```json
{
  "queries": [
    "software engineering"
  ],
  "maxItems": 20
}
```

Supply queries or dois (at least one). Search pages use 100 rows and cursor pagination; DOI lookups consume one request each. Public pool only, no key or invented contact identity. Requests are sequential, at least 1.1 seconds apart; a 429 stops collection without retry. Title and citation metadata can be absent upstream and remain null. No abstracts, full text, author emails or third-party links are fetched. Bibliographic metadata is reusable; abstracts/full text may have separate rights and are excluded.

`maxItems` defaults to 100 (hard maximum 1,000 unique billable rows). `maxUpstreamRequests` defaults to 5 (hard maximum 20); every attempt including failed requests counts. Input limits are enforced in code as well as the UI. Omitted request limits use the documented finite default.

### Output and charging

One `work` row per unique stable ID, with `id`, `doi`, `title`, `publisher`, `journal`, `type`, `publicationDateParts`, `citedByCount`, `url`, `sourceUrl`, and `collectedAt`. Missing optional source fields are null, never fabricated. Free `input_status` rows distinguish empty input results from HTTP failures, schema drift, blocked/rate-limited sources and budget stops. A free `run_summary` row and `RUN_SUMMARY` key-value record expose result count, actual SDK charged count, failures, duplicates, request attempts and stop reason. A cap or failure marks the summary partial; already stored results remain real observations.

Only unique real result rows pass the named result event to `Actor.pushData`. No run-start charge is emitted. Free statuses, summary rows and missing-value rows have no event. The price is $0.49 per 1,000 `work` rows, with no start fee. A pre-push SDK budget check prevents the SDK from attempting an extra paid row at a depleted budget; its charge-limit response stops collection immediately. Positive default dataset-item pricing is refused to keep status rows free; only the named result event is priced, with no automatic run-start charge. Local runs may report zero charged events when billing is not configured. Empty successful collections are valid; failed collections with no real results fail the run after saving diagnostics. Storage or charging failures abort the run and are not disguised as upstream errors.

### Cost and access boundaries

Built-in Node HTTPS fetch only; fixed official hostname, no credentials, cookies, arbitrary input URLs, proxies, redirects, browser or paid upstream. Requests are sequential and separated by at least 1.1 seconds, timeout 20 seconds per request, decoded response hard limit 5 MiB. Collection has a 180-second wall-clock budget (plus bounded final storage writes). The SDK handles abort shutdown; an abort listener also cancels the in-flight fetch/body or pacing wait and prevents new requests and result charges. Diagnostics on platform abort are best-effort because the SDK exits. No retries. HTTP 403/429 stops the run, preserving partial results. Requests and item ceilings bound work; platform usage is included in the result price. Rerunning starts a fresh dataset; restart/resume idempotency across process crashes is not implemented.

### Official upstream references

- https://www.crossref.org/documentation/retrieve-metadata/rest-api/
- https://github.com/CrossRef/rest-api-doc
- https://www.crossref.org/documentation/retrieve-metadata/rest-api/access-and-authentication/

# Actor input Schema

## `queries` (type: `array`):

Search terms to submit to the official public API.

## `dois` (type: `array`):

Exact DOI identifiers without a doi.org URL prefix.

## `maxItems` (type: `integer`):

Stop after this many unique real result rows. Status and missing-value rows are free.

## `maxUpstreamRequests` (type: `integer`):

Hard cap on all upstream request attempts, including failed requests.

## Actor input object example

```json
{
  "dois": [
    "10.2307/3172660"
  ],
  "maxItems": 3,
  "maxUpstreamRequests": 1
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `runSummary` (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 = {
    "dois": [
        "10.2307/3172660"
    ],
    "maxItems": 3,
    "maxUpstreamRequests": 1
};

// Run the Actor and wait for it to finish
const run = await client.actor("lanternlab318/crossref-works").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 = {
    "dois": ["10.2307/3172660"],
    "maxItems": 3,
    "maxUpstreamRequests": 1,
}

# Run the Actor and wait for it to finish
run = client.actor("lanternlab318/crossref-works").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 '{
  "dois": [
    "10.2307/3172660"
  ],
  "maxItems": 3,
  "maxUpstreamRequests": 1
}' |
apify call lanternlab318/crossref-works --silent --output-dataset

```

## MCP server setup

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

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/ePZWOmhPhBzfLba31/builds/ZsbZAA2YCRUWFZA2r/openapi.json
