# Scholarly Metadata: arXiv, OpenAlex and PubMed search (`examsens.ai/scholarly-metadata`) Actor

Searches arXiv, OpenAlex and PubMed, or looks up papers by DOI, arXiv id, PMID or OpenAlex id, and returns title, authors, abstract, dates, DOI, venue and links, within each source's rate limits.

- **URL**: https://apify.com/examsens.ai/scholarly-metadata.md
- **Developed by:** [Ed Rayyis](https://apify.com/examsens.ai) (community)
- **Categories:** Education, AI
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.70 / 1,000 record returneds

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

## Scholarly Metadata: arXiv, OpenAlex and PubMed search

Search three open scholarly sources at once, or look papers up by DOI, arXiv id, PubMed id or OpenAlex id. Every result comes back in one shape, so you can compare and merge them.

For each paper you get:

- Title, authors and abstract
- Publication date, last updated date and year
- DOI, journal or venue, and publication type
- A link to the record, plus the PDF link for arXiv papers and the open access link from OpenAlex
- arXiv categories, OpenAlex citation counts, and the PubMed id where OpenAlex knows it
- The license or attribution line for the source, and for PubMed the publisher's copyright line

### Input

- Search queries. Each query runs on every selected source. Words are combined with AND on arXiv. Source syntax passes through: `au:Hinton ti:capsule` on arXiv, `smith j[au]` on PubMed.
- Identifiers to look up. The type is detected for you:
  - a DOI (`10.1038/nature12373` or a doi.org link) is looked up in OpenAlex and PubMed
  - an arXiv id (`1706.03762`) or arXiv DOI is looked up in arXiv and OpenAlex
  - a PubMed id (`PMID:31452104` or the bare number) is looked up in PubMed and OpenAlex
  - an OpenAlex work id (`W2741809807`) is looked up in OpenAlex
- Sources: arXiv, OpenAlex, PubMed (default all three).
- Maximum results per query and source: 1 to 200 (default 25).
- Published from and to, as YYYY-MM-DD, for searches.
- Sort searches by relevance or newest first.
- Your own OpenAlex API key and NCBI API key, both optional and stored as secrets.
- A contact email, optional, passed to PubMed and in the User-Agent header.

### Output

One dataset item per paper per source, with `source`, `inputType` (`search` or `lookup`), `query` or `lookupId`, `recordId`, `url`, `title`, `authors`, `abstract`, `publishedDate`, `updatedDate`, `year`, `doi`, `venue`, `publicationType`, `categories`, `pdfUrl`, `openAccessUrl`, `citedByCount`, `pmid`, `copyrightNotice`, `license`, `attribution` and `totalResults`. A search or lookup that fails or finds nothing gives one item with `error`, so you can see which input it was.

Authors are listed by name as they appear in the citation. Affiliations and author contact details are not collected.

### Source rules and limits

- arXiv: one request every three seconds, one connection at a time, as the arXiv API terms require. arXiv metadata is released under CC0. The actor is not endorsed by arXiv.
- PubMed: 3 requests a second, or 10 with your own NCBI API key. Rows carry the attribution NLM asks for, "Courtesy of the U.S. National Library of Medicine". PubMed abstracts can be under the publisher's copyright: the `copyrightNotice` field carries the publisher's line when the record has one, and reuse beyond fair use needs the copyright holder's permission.
- OpenAlex: data under CC0. Lookups by id are free. Searches spend a daily budget: without a key it covers about 100 searches a day, and your own free OpenAlex key raises it tenfold. An invalid key gives an error item that says so.

### Pricing

Pay per event: one `record-returned` event per paper returned. Searches and lookups that find nothing or fail are not charged. The run stops when it reaches the maximum charge you set.

### Support

Questions and problems: the Issues tab on this page. Replies are written by an AI assistant on behalf of the developer and reviewed by the developer.

# Actor input Schema

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

Search terms. Each query runs on every selected source. arXiv field prefixes such as ti: and au: and PubMed field tags such as \[au] pass through to that source.

## `ids` (type: `array`):

DOIs (10.1038/nature12373 or a doi.org link), arXiv ids (1706.03762), PubMed ids (PMID:31452104 or the bare number) and OpenAlex work ids (W2741809807).

## `sources` (type: `array`):

Which sources to use.

## `maxResultsPerQuery` (type: `integer`):

Results kept for each query from each source.

## `dateFrom` (type: `string`):

Earliest publication or submission date for searches, as YYYY-MM-DD.

## `dateTo` (type: `string`):

Latest publication or submission date for searches, as YYYY-MM-DD.

## `sortBy` (type: `string`):

Relevance, or newest first.

## `openAlexApiKey` (type: `string`):

Your own free OpenAlex key. Without one, OpenAlex allows a small daily budget, about 100 searches. Lookups by id are free.

## `ncbiApiKey` (type: `string`):

Your own NCBI key. It raises the PubMed rate from 3 to 10 requests a second.

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

Sent to PubMed in the email parameter and in the User-Agent header, so the services can reach you about your traffic. Leave empty to send none.

## Actor input object example

```json
{
  "queries": [
    "large language models evaluation"
  ],
  "ids": [
    "1706.03762",
    "10.1038/nature12373"
  ],
  "sources": [
    "arxiv",
    "openalex",
    "pubmed"
  ],
  "maxResultsPerQuery": 25,
  "sortBy": "relevance"
}
```

# Actor output Schema

## `results` (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 = {
    "queries": [
        "large language models evaluation"
    ],
    "ids": [
        "1706.03762",
        "10.1038/nature12373"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("examsens.ai/scholarly-metadata").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 = {
    "queries": ["large language models evaluation"],
    "ids": [
        "1706.03762",
        "10.1038/nature12373",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("examsens.ai/scholarly-metadata").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 '{
  "queries": [
    "large language models evaluation"
  ],
  "ids": [
    "1706.03762",
    "10.1038/nature12373"
  ]
}' |
apify call examsens.ai/scholarly-metadata --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,examsens.ai/scholarly-metadata"
        }
    }
}
```

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/rHQ0OBQfQKNJCvBPI/builds/Y1NznBOgUDds5ju8N/openapi.json
