# PDF & Word Metadata Cleaner — Works with MCP (`myworkingmemory/document-metadata-cleaner`) Actor

Verified PDF and Word DOCX metadata cleanup. $4 per clean on Free; $0.02 on paid Apify plans. Inspect before cleaning. Works with MCP.

- **URL**: https://apify.com/myworkingmemory/document-metadata-cleaner.md
- **Developed by:** [Myworkingmemory LLC](https://apify.com/myworkingmemory) (community)
- **Categories:** Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.02 / verified document clean

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## Metadata Cleaner — inspect and remove metadata from PDF and Word

Inspect a PDF or Word DOCX, review the findings, then create a separately verified cleaned copy. Inspection is the default and does not change your file. This cloud Actor uses a Python port of Metadata Cleaner's services; it is a separate delivery channel from the ChatGPT, Codex, Kimi and MiniMax editions. Their purchases and balances do not automatically apply here.

### Quick start

Run with one file source:

```json
{"operation":"inspect","documentUrl":"https://your-file-host.example/document.docx"}
```

Supply a direct public HTTPS download URL without redirects, or use `documentBase64` instead. Input values are marked secret in Apify's input schema. URLs requiring cookies, custom headers, private network access, redirects or ports other than 443 are rejected. Files are limited to **25 MiB**; expanded DOCX packages are limited to 100 MiB and 4,096 ZIP entries.

Inspection returns finding titles and risk levels, a `document_sha256`, and `requires_content_confirmation`. It does not echo author names or other extracted private values.

For metadata-only cleaning:

```json
{"operation":"clean","documentUrl":"https://your-file-host.example/document.pdf"}
```

When inspection reports tracked changes, hidden text or custom XML, review the effects below and resubmit the same document with explicit approval and its inspection hash:

```json
{"operation":"clean","documentUrl":"https://your-file-host.example/document.docx","confirmContentChanges":true,"inspectedSha256":"COPY_THE_64_CHARACTER_HASH_FROM_INSPECTION"}
```

Without matching approval, the result is `confirmation_required` and no file is released. Changed file bytes invalidate the approval.

### Cleaning scope

DOCX: supported author/editor and document properties, comments, tracked changes, explicitly hidden runs, custom XML and revision identifiers. Accepted insertions remain; deletions and hidden runs are removed. Comments/custom XML parts and their relationships/content-type references are repaired. Images remain unchanged, including any metadata inside those images.

PDF: supported document information, catalog XMP, markup annotations, catalog embedded-file/JavaScript entries and document/page actions. Links and form widgets are preserved; forms are not flattened. Hidden layers and form content may remain. This is not redaction or a guarantee of anonymization. Visible content, links, images and form answers can still identify people. Review the returned document before sharing it.

Unsupported, encrypted or incomplete results are refused. A re-scan must complete all supported categories with no high-risk finding remaining before a cleaned artifact is released. Notes identify retained features. Already-clean files are returned byte-for-byte, with the report explicitly marking that no cleaned-copy re-scan was necessary.

### Output and download

A report is saved to the default dataset and the key-value store's `OUTPUT` record. Statuses: `inspected`, `confirmation_required`, `cleaned`, `cleaned_with_notes`, or `could_not_clean`. Only the two cleaned statuses have a file. Ordinary document refusals produce a successful Actor run containing `could_not_clean`; API callers must inspect the report status.

`cleaned_file` identifies the store and record (`cleaned.pdf`, `cleaned.docx`, or `document.*` when unchanged). Cloud reports contain the standard record endpoint. Fetch it with your Apify API token in the `Authorization: Bearer ...` header. Tokens are never embedded in result URLs. No public sharing URL is created and no expiring-link guarantee is made. In local runs, the file is in local key-value storage.

Files are uploaded and processed on Apify infrastructure. Input and output records remain subject to your Apify storage retention and access settings; this Actor does not automatically delete them. Delete the run's input, dataset and output storage when no longer needed, and do not share storage containing private documents. Inspection hashes and category reports are also stored. No document is sent to an LLM or the separate Metadata Cleaner service.

### Pricing and MCP

**Per successfully cleaned document: $4 on Apify Free; $0.02 on paid Apify plans.** Inspection, confirmation requests, refused files, and already-clean files have no cleaning-event charge. Platform costs are included in the displayed event price; your Apify subscription is separate. One input file per run; use repeated runs for multiple files. Set your maximum event budget to at least your plan’s per-document price. Your Apify subscription determines the tier; this Actor does not sell a separate subscription. The Actor honors the run's event spending limit and charges the `document-cleaned` event only after a verified file is stored. Existing ChatGPT/Codex/Kimi/MiniMax balances are separate.

**Works with MCP through Apify's MCP server.** Connect your compatible client to `https://mcp.apify.com`, authorize your Apify account, and select `myworkingmemory/document-metadata-cleaner`. Ask it to inspect your PDF or DOCX, explain any proposed content changes, and clean only after your approval. Supply a downloadable public HTTPS URL or base64; local disk paths are not cloud-upload instructions. Retrieve the result using your Apify storage access. This Actor uses limited permissions; it does not request access to unrelated Actors or account storage.

Documentation: https://docs.apify.com/mcp

### Connect through MCP

Add this server URL to a compatible MCP client such as Claude or Cursor, then authorize your Apify account. It preloads this Actor as a tool:

[Apify MCP — PDF & Word Metadata Cleaner](https://mcp.apify.com/?tools=myworkingmemory/document-metadata-cleaner)

```text
https://mcp.apify.com/?tools=myworkingmemory/document-metadata-cleaner
```

Connecting does not start a run. Ask your agent to review the input and pricing before running; the same prices, input requirements and limits apply. See the [Apify MCP setup guide](https://docs.apify.com/mcp).

### More tools from Myworkingmemory

- [Email Verifier](https://apify.com/myworkingmemory/email-verifier-bulk) — Verify email lists or Apify datasets; limited keyless pilot and BYOK options.
- [Shopify Product Scraper](https://apify.com/myworkingmemory/shopify-store-extractor) — Extract Shopify product prices, inventory and variants.
- [Curated Finds](https://apify.com/myworkingmemory/software-library-search) — Discover curated GitHub tools and Hugging Face models.

Each Actor has its own inputs and pricing; follow its README before running. [Browse all our Actors](https://apify.com/myworkingmemory).

# Actor input Schema

## `documentUrl` (type: `string`):

Direct HTTPS URL to a .pdf or .docx file (max 25 MB).

## `documentBase64` (type: `string`):

Alternative to URL: base64-encoded PDF or DOCX.

## `format` (type: `string`):

Leave auto to detect the format from the file itself.

## `operation` (type: `string`):

Inspect first. To clean content changes, confirm and supply the inspected SHA-256.

## `confirmContentChanges` (type: `boolean`):

Accept tracked changes and remove hidden text/custom XML reported by inspection.

## `inspectedSha256` (type: `string`):

Copy document_sha256 from inspection to bind your approval to this exact file.

## Actor input object example

```json
{
  "format": "auto",
  "operation": "inspect",
  "confirmContentChanges": false
}
```

# Actor output Schema

## `report` (type: `string`):

Status, findings, approval requirements and authenticated cleaned-file retrieval details.

## `result` (type: `string`):

Machine-readable result, including the store/key for successful output. Requires your Apify storage access.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("myworkingmemory/document-metadata-cleaner").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("myworkingmemory/document-metadata-cleaner").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 '{}' |
apify call myworkingmemory/document-metadata-cleaner --silent --output-dataset

```

## MCP server setup

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

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/egULX8186JN65aPhU/builds/0SQW9NVLtLdB0WQ45/openapi.json
