# MARCXML Literal Metadata Export (`immemorial_sarinda/marcxml-literal-export`) Actor

Offline literal MARCXML metadata export preserving ordered repeats, with full JSON and optional CSV or TSV projection. No catalog certification or fetching.

- **URL**: https://apify.com/immemorial_sarinda/marcxml-literal-export.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 marcxml 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

## MARCXML Literal Metadata Export

Export literal metadata from an authorized supported MARCXML collection. Preserve field order, repeats and values in a full JSON report, with an optional CSV or TSV projection. No catalog-rule certification, authority lookup, record merging or import-readiness assurance.

#### Input and limits

Use `{"useDemo":true}` for the fictional repeated-field record: one complete record with no issues. Own mode requires `useDemo=false`, `authorizedNonpersonalNonconfidentialData=true` and literal `xmlText`. Optional own `exportFormat` is `json`, `csv` or `tsv`; omitted means JSON. Omit all own fields in demo, whose format is fixed JSON.

Supported uniform unqualified elements or the MARC21 slim namespace http://www.loc.gov/MARC21/slim. Mixed/other namespaces, unknown structure/attributes, DTD/entity declarations and processing instructions are refused. A complete record requires the supported 24-character ASCII leader shape, one nonblank 001 control field and nonempty datafield subfield structure. Other empty literal values may remain valid. Empty collections and incomplete records are not delivered as partial paid reports. Shape checks do not certify bibliographic correctness or indicator meanings.

Limits: 1 MiB decoded UTF-8 input, 1,200,000 raw request bytes, depth 4, 10,000 elements and 1,000 records. Native JSON and selected CSV/TSV together must fit 2 MiB; serialized delivery must fit 4,500,000 bytes. Selected delimited output is checked against the complete report, including exact header, row/cell order and literal values. CSV/TSV uses quoted literal cells and performs no spreadsheet-formula sanitization. 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 and the selected export.csv or export.tsv when requested 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: [marcxml-report-helper-0.1.2.zip](https://api.apify.com/v2/key-value-stores/f7yuJ759tlYrp43zi/records/marcxml-report-helper-0.1.2.zip), 22,236 bytes, SHA-256 `afca869a5a2fc7eaed7a357e0604103ce03574b02198ee7a716d887fd935546e`. Unpack all four files.

# Actor input Schema

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

Own mode requires true and authorized nonpersonal, nonconfidential data.

## `exportFormat` (type: `string`):

Own mode only; omitted means JSON. Leave absent in demo; demo is fixed JSON.

## `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/marcxml-literal-export").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/marcxml-literal-export").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/marcxml-literal-export --silent --output-dataset

```

## MCP server setup

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

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/7DhRggsEaouRLWOzS/builds/zI79jvMG44FCJ8F6Z/openapi.json
