# JATS Citation Relationships (`immemorial_sarinda/jats-citation-relationships`) Actor

Offline extraction of supported JATS reference and citation relationships into a complete literal report with resolved edges. No external lookup or citation repair.

- **URL**: https://apify.com/immemorial_sarinda/jats-citation-relationships.md
- **Developed by:** [Picknotes](https://apify.com/immemorial_sarinda) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$100.00 / 1,000 complete jats reports

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

## JATS Citation Relationships

Extract supported citation relationships from authorized nonpersonal, nonconfidential JATS XML offline. Get literal reference/citation data and ordered resolved edges. No external lookup, DOI normalization, citation repair, schema validation or deposit-readiness assurance.

#### Input and limits

Use `{"useDemo":true}` for a fictional article with one reference, one citation, one edge and six combined records. Own mode requires `useDemo=false`, `authorizedNonpersonalNonconfidentialData=true` and literal `xmlText`. Omit own fields in demo.

Only the exact supported element/attribute profile is admitted. All DOCTYPE declarations are refused, including ordinary publisher JATS DTD syntax. Unsupported elements/attributes, processing instructions, external-link findings, duplicate IDs and missing or ambiguous citation targets make output ineligible for delivery. Incomplete diagnostics are not sold as complete reports. An empty supported `<article/>` may produce a complete zero-record extraction, which does not certify article completeness. The pinned archive detector may reject otherwise-valid XML containing `ustar` at byte offset 257; this behavior is preserved.

Limits: 1 MiB decoded UTF-8 input, 1,200,000 raw request bytes, depth 64, 10,000 nodes, 256-character XML names, 1,000 combined records, 2 MiB native report and 4,500,000 serialized delivery bytes. Literal values, order and duplicate target occurrences are preserved. No truncation to force delivery.

#### Price and completed reports

US$0.10 per complete report, including the synthetic demo. Platform usage is included; no startup charge. Configure a run spending limit of at least US$0.11.

One full default-dataset item is attempted. If Apify accepts it, a completion charge can occur even if the run later fails or its acknowledgement is lost. Never automatically rerun uncertain delivery. The embedded receipt describes expected accounting, not settled charges or revenue.

#### Data and report download

Submit only authorized, nonpersonal, nonconfidential data. No credentials, tokens or secrets. Apify stores input before execution. Reports retain literal identifiers, metadata and text; input must already exclude personal author names or confidential content. No anonymization, secret detection, deletion, private storage or retention-period promise is made.

Download full raw default-dataset JSON without cleaning, field selection, flattening or unwinding. The matching minimal helper validates one report item or a singleton array and writes exact report.json bytes:

```
python3 -B extract_report.py dataset.json new-output-directory
```

Use a new directory under an existing trusted POSIX parent. Symlink paths and overwriting existing destinations are unsupported. Python standard library only; Windows unsupported. A late filesystem failure may leave an incomplete new directory. Hash/structure checks do not authenticate the sender or prove input truth. Read the included README.md and TERMS.md; no additional support or refund promise is made here.

Helper: [jats-report-helper-0.1.2.zip](https://api.apify.com/v2/key-value-stores/f7yuJ759tlYrp43zi/records/jats-report-helper-0.1.2.zip), 34,500 bytes, SHA-256 `cc499fe82f6b1d38d573b6eae3308fa72c50fa509d641a9beaaeef082a2369e3`. Unpack all four files.

# Actor input Schema

## `authorizedNonpersonalNonconfidentialData` (type: `boolean`):

Own mode requires true and authorized nonpersonal, nonconfidential data.

## `useDemo` (type: `boolean`):

Use immutable synthetic fixture through the real engine. Own fields must be absent.

## `xmlText` (type: `string`):

Own mode only; required by runtime. Literal authorized XML, never a URL. Leave absent in demo. Raw1.2MB and decoded1MiB UTF-8 caps apply.

## Actor input object example

```json
{
  "authorizedNonpersonalNonconfidentialData": false,
  "useDemo": true
}
```

# 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 = {
    "useDemo": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("immemorial_sarinda/jats-citation-relationships").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 = { "useDemo": True }

# Run the Actor and wait for it to finish
run = client.actor("immemorial_sarinda/jats-citation-relationships").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 '{
  "useDemo": true
}' |
apify call immemorial_sarinda/jats-citation-relationships --silent --output-dataset

```

## MCP server setup

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

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/rMeMiQbazn2MX6vf8/builds/0078X0JlscLqUhis4/openapi.json
