# Preprint-to-Publication Lineage Resolver (`flintglade/preprint-publication-lineage-resolver`) Actor

Resolve evidence-backed links among preprints, publications, versions, and corrections using official Crossref, Europe PMC, arXiv, bioRxiv, and medRxiv metadata.

- **URL**: https://apify.com/flintglade/preprint-publication-lineage-resolver.md
- **Developed by:** [Flintglade](https://apify.com/flintglade) (community)
- **Categories:** Automation, Developer tools, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.02 / lineage check

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## 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/docs.md):

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.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/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

## Preprint-to-Publication Lineage Resolver

Resolve evidence-backed links among preprints, publications, versions, corrections, and related records while keeping confirmed provider relations separate from bibliographic candidates.

### What this does not do

- No plagiarism detection.
- No author identity profiling.
- No claim that similar titles prove publication lineage.
- No full-text comparison.
- No citation network crawl.
- No automatic merging of works.

### Sources

The Actor calls only official Crossref, Europe PMC, arXiv, and bioRxiv/medRxiv APIs. Europe PMC requests `resultType=core`; arXiv identifier work is grouped into `id_list` batches of at most 50; and bioRxiv plus medRxiv is complete only after both applicable probes terminate. It does not scrape search engines or publisher pages. Every edge carries provider evidence and a record locator. Source contracts and attribution are in `source_contracts/` and `SOURCE_POLICY.md`.

### Input

Submit 1-200 works using DOI, PMID, arXiv ID, bioRxiv DOI, or title/first-author/year metadata. The smallest public input is:

```json
{"works":[{"arxivId":"1706.03762","publishedDoi":"10.5555/3295222.3295349"}],"maxCandidates":5,"requireConfirmed":false,"concurrency":1}
````

The arXiv record has no official DOI or journal reference and the supplied DOI is absent from Crossref, so this example is expected to terminate without a confirmed edge. User-supplied identifier pairs are search hints, never confirmation evidence.

### Output

Each work produces a submitted-work graph node, provider nodes, typed edges, confirmation state, component candidate scores, conflicts, official evidence locators, and suggested human checks. Candidate records are scored only against the submitted work; two or more surviving candidates are ambiguous. Paid graph artifacts are stored and added to the manifest only after `charged_count == 1`. A final uncharged run-summary row reports counts by substatus, warning count, and the artifact-manifest link.

### Pricing

The exact primary event is `lineage-check`, priced at $0.02 per terminal work lineage. Confirmed, candidate-only, ambiguous, and definitive no-link results are chargeable. Invalid input and provider failures that prevent a terminal result are not. A 10-work run costs at most 10 × $0.02 = $0.20, plus any low platform start charge shown by Apify.

### State

Version 0.1 is stateless. It writes only run-scoped dataset and key-value-store records; it does not merge works or maintain a baseline.

### Partial failures and negative results

An explicit official relation can confirm a lineage when one applicable source completes; failures from other sources remain in errors and warnings. Candidate-only and ambiguous rows remain non-confirming leads. A terminal `no_link_found` claim requires at least two applicable completed sources; skipped/not-applicable providers do not count. The combined bioRxiv/medRxiv adapter is terminal only after both probes terminate and preserves each probe's real status. `requireConfirmed` preserves candidates but marks a deterministic refusal.

### Resources

Minimum 256 MB, default 512 MB, maximum 1024 MB, and hosted timeout 300 seconds. Concurrency is limited to 8 and provider bodies to 3 MB. Two hundred arXiv identifiers require at most four paced `id_list` requests.

### Data handling

Inputs and official response-derived metadata are processed for the run. No credentials are accepted. Delete the run dataset and key-value store in Apify to remove retained outputs. See `PRIVACY.md`.

### Rights and attribution

Metadata rights and availability remain with each provider. Outputs preserve source attribution and do not redistribute full text. See `SOURCE_POLICY.md`.

### Limitations

Provider metadata can lag or conflict. Similarity scores are leads, not identity proof. Confirmed status requires an explicit official relation or canonical identifier identity.

### Acceptance evidence

The checked-in acceptance corpus contains hash-verified official response fixtures, 30 reviewer-labelled explicit pairs with per-pair source/index/field provenance, 20 stored reviewed negatives, and named title/total threshold-boundary cases. Tests compute confirmed-edge precision from emitted graph edges rather than reconstructing expected output from resolver behavior.

### Support and changelog

Email support@flintglade.com. See `SUPPORT.md` and `CHANGELOG.md`.

# Actor input Schema

## `inputSchemaVersion` (type: `integer`):

Fixed input contract version; leave set to 1.

## `works` (type: `array`):

Scholarly works to resolve. Runtime validation requires at least one identifier or title per object.

## `candidateSources` (type: `array`):

Official APIs to query; at least two applicable sources must terminate before billing.

## `maxCandidates` (type: `integer`):

Maximum candidate edges returned per work.

## `requireConfirmed` (type: `boolean`):

Return candidates but mark refusal when no confirmed relation exists.

## `includeVersions` (type: `boolean`):

Retain arXiv and provider version identifiers in graph nodes.

## `concurrency` (type: `integer`):

Maximum work-level concurrency from 1 through 8; arXiv requests remain globally paced.

## Actor input object example

```json
{
  "inputSchemaVersion": 1,
  "works": [
    {
      "arxivId": "1706.03762",
      "publishedDoi": "10.5555/3295222.3295349"
    }
  ],
  "candidateSources": [
    "crossref",
    "europe_pmc",
    "arxiv",
    "biorxiv"
  ],
  "maxCandidates": 10,
  "requireConfirmed": false,
  "includeVersions": true,
  "concurrency": 4
}
```

# Actor output Schema

## `defaultDataset` (type: `string`):

No description

## `artifactManifest` (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 = {
    "works": [
        {
            "arxivId": "1706.03762",
            "publishedDoi": "10.5555/3295222.3295349"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("flintglade/preprint-publication-lineage-resolver").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 = { "works": [{
            "arxivId": "1706.03762",
            "publishedDoi": "10.5555/3295222.3295349",
        }] }

# Run the Actor and wait for it to finish
run = client.actor("flintglade/preprint-publication-lineage-resolver").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 '{
  "works": [
    {
      "arxivId": "1706.03762",
      "publishedDoi": "10.5555/3295222.3295349"
    }
  ]
}' |
apify call flintglade/preprint-publication-lineage-resolver --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=flintglade/preprint-publication-lineage-resolver",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Preprint-to-Publication Lineage Resolver",
        "description": "Resolve evidence-backed links among preprints, publications, versions, and corrections using official Crossref, Europe PMC, arXiv, bioRxiv, and medRxiv metadata.",
        "version": "0.1",
        "x-build-id": "4XY2gXDJ3OUunW9Y5"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/flintglade~preprint-publication-lineage-resolver/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-flintglade-preprint-publication-lineage-resolver",
                "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/flintglade~preprint-publication-lineage-resolver/runs": {
            "post": {
                "operationId": "runs-sync-flintglade-preprint-publication-lineage-resolver",
                "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/flintglade~preprint-publication-lineage-resolver/run-sync": {
            "post": {
                "operationId": "run-sync-flintglade-preprint-publication-lineage-resolver",
                "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": [
                    "works"
                ],
                "properties": {
                    "inputSchemaVersion": {
                        "title": "Input schema version",
                        "minimum": 1,
                        "maximum": 1,
                        "type": "integer",
                        "description": "Fixed input contract version; leave set to 1.",
                        "default": 1
                    },
                    "works": {
                        "title": "Works",
                        "minItems": 1,
                        "maxItems": 200,
                        "type": "array",
                        "description": "Scholarly works to resolve. Runtime validation requires at least one identifier or title per object.",
                        "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                                "doi": {
                                    "title": "DOI",
                                    "description": "Known DOI for the work.",
                                    "type": "string",
                                    "maxLength": 300
                                },
                                "publishedDoi": {
                                    "title": "Published DOI",
                                    "description": "Possible published DOI search hint; never confirmation by itself.",
                                    "type": "string",
                                    "maxLength": 300
                                },
                                "pmid": {
                                    "title": "PMID",
                                    "description": "PubMed identifier containing digits only.",
                                    "type": "string",
                                    "pattern": "^[0-9]+$"
                                },
                                "arxivId": {
                                    "title": "arXiv ID",
                                    "description": "Modern or legacy arXiv identifier, optionally with a version suffix.",
                                    "type": "string",
                                    "maxLength": 100
                                },
                                "biorxivDoi": {
                                    "title": "bioRxiv or medRxiv DOI",
                                    "description": "Preprint DOI registered by bioRxiv or medRxiv.",
                                    "type": "string",
                                    "maxLength": 300
                                },
                                "title": {
                                    "title": "Title",
                                    "description": "Bibliographic title used only for candidate discovery.",
                                    "type": "string",
                                    "minLength": 3,
                                    "maxLength": 1000
                                },
                                "firstAuthor": {
                                    "title": "First author",
                                    "description": "First-author search hint used only for candidate scoring.",
                                    "type": "string",
                                    "maxLength": 200
                                },
                                "year": {
                                    "title": "Year",
                                    "description": "Publication or preprint year search hint.",
                                    "type": "integer",
                                    "minimum": 1900,
                                    "maximum": 2100
                                }
                            }
                        }
                    },
                    "candidateSources": {
                        "title": "Official candidate sources",
                        "minItems": 1,
                        "uniqueItems": true,
                        "type": "array",
                        "description": "Official APIs to query; at least two applicable sources must terminate before billing.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "crossref",
                                "europe_pmc",
                                "arxiv",
                                "biorxiv"
                            ]
                        },
                        "default": [
                            "crossref",
                            "europe_pmc",
                            "arxiv",
                            "biorxiv"
                        ]
                    },
                    "maxCandidates": {
                        "title": "Maximum candidates",
                        "minimum": 1,
                        "maximum": 20,
                        "type": "integer",
                        "description": "Maximum candidate edges returned per work.",
                        "default": 10
                    },
                    "requireConfirmed": {
                        "title": "Require confirmed",
                        "type": "boolean",
                        "description": "Return candidates but mark refusal when no confirmed relation exists.",
                        "default": false
                    },
                    "includeVersions": {
                        "title": "Include versions",
                        "type": "boolean",
                        "description": "Retain arXiv and provider version identifiers in graph nodes.",
                        "default": true
                    },
                    "concurrency": {
                        "title": "Concurrency",
                        "minimum": 1,
                        "maximum": 8,
                        "type": "integer",
                        "description": "Maximum work-level concurrency from 1 through 8; arXiv requests remain globally paced.",
                        "default": 4
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
