# Image Metadata Remover: EXIF, GPS & AI Prompt Stripper (`chivalrous_skyline_vtd/image-metadata-stripper`) Actor

Remove EXIF, GPS, XMP and embedded AI prompts (Stable Diffusion, ComfyUI, NovelAI) from JPEG, PNG and WebP images without re-encoding. Bulk by URL, with a report of what was removed.

- **URL**: https://apify.com/chivalrous_skyline_vtd/image-metadata-stripper.md
- **Developed by:** [HexaX](https://apify.com/chivalrous_skyline_vtd) (community)
- **Categories:** Developer tools, Other
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$3.00 / 1,000 image cleaneds

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

## Image Metadata Remover: EXIF, GPS & AI Prompt Stripper

Remove **EXIF, GPS location, XMP and embedded AI prompts** from JPEG, PNG and WebP images. Give it image URLs, get cleaned files back plus a report of what was removed from each one.

The pixels are **not re-encoded**. The Actor cuts the metadata blocks out of the file container, so there is no quality loss and the cleaned file is byte-for-byte the same picture.

### What it removes

| Format | Removed | Kept |
|---|---|---|
| JPEG | EXIF (camera, GPS, timestamps), XMP, IPTC/Photoshop, comments, other APP blocks | Color profile (optional), a minimal rotation flag (optional) |
| PNG | `tEXt` / `zTXt` / `iTXt` text (Stable Diffusion `parameters`, ComfyUI `prompt` and `workflow`, NovelAI `Comment`, InvokeAI metadata, author, description), `eXIf`, `tIME` | Color profile (optional) |
| WebP | EXIF, XMP | Color profile (optional) |

### Use cases

- Publish AI-generated images without leaking your prompt, seed, model or ComfyUI workflow.
- Remove GPS coordinates and camera serial data from photos before sharing them.
- Prepare image sets for marketplaces, galleries and client delivery.
- Audit which files in a set carry location or prompt data (the report shows it per file).

### Quick start

Keep the example URLs (a small PNG with an embedded prompt and a JPEG with GPS data) and press Start. Cleaned files appear in the run's **Key-value store**; the dataset lists what was removed.

### Input

```json
{
  "imageUrls": ["https://raw.githubusercontent.com/ianare/exif-samples/master/jpg/gps/DSCN0010.jpg"],
  "keepColorProfile": true,
  "keepOrientation": true
}
```

| Field | Default | Notes |
|---|---|---|
| `imageUrls` | (required) | Up to 2,000 direct links to JPEG, PNG or WebP files. |
| `keepColorProfile` | `true` | Keeps the ICC profile so colors do not shift. |
| `keepOrientation` | `true` | JPEG: keeps a minimal EXIF block with only the rotation flag, so phone photos stay upright. |
| `maxImageSizeMb` | `30` | Larger files are skipped with an error. |
| `maxConcurrency` | `4` | Parallel downloads. |

### Output

```json
{
  "url": "https://raw.githubusercontent.com/ianare/exif-samples/master/jpg/gps/DSCN0010.jpg",
  "status": "cleaned",
  "format": "JPEG",
  "removed": ["EXIF (GPS)", "APP1"],
  "had_gps": true,
  "camera": "NIKON COOLPIX P6000",
  "had_ai_generation_data": false,
  "bytes_before": 161713,
  "bytes_after": 146420,
  "cleaned_file_key": "00002-DSCN0010-clean.jpg",
  "cleaned_file_url": "https://api.apify.com/v2/key-value-stores/<id>/records/00002-DSCN0010-clean.jpg"
}
```

`status` is `cleaned`, `already_clean` (nothing to remove, no file written, not charged) or `error`. GPS coordinates themselves are never copied into the report, only whether they were present.

### Limits

- Pixel-level watermarks are not touched. That includes the hidden "stealth" prompt some AI tools write into the alpha channel of PNGs.
- Only JPEG, PNG and WebP. Other formats are reported as errors.
- Metadata is removed from the copy in the key-value store; the original at your URL is never changed.
- Each site's `robots.txt` is checked before downloading. Use it on images you are allowed to process.

### Pricing

Pay per event: you are charged once per image that was cleaned. Images with nothing to remove, and failed downloads, are free.

### Related Actors

- **Stable Diffusion Prompt Extractor**: read the prompt and settings embedded in AI images instead of removing them.
- **Bulk Image Compressor & WebP / AVIF Converter**: shrink and convert images (metadata is dropped there too).
- **Duplicate & Similar Image Finder**: find repeated images in a gallery before you publish it.

# Actor input Schema

## `imageUrls` (type: `array`):

Direct links to JPEG, PNG or WebP files (up to 2,000 per run). Only images you are allowed to download and modify. Each site's robots.txt is checked first.

## `keepColorProfile` (type: `boolean`):

Keep the embedded ICC color profile so colors do not shift. The profile does not identify you or the camera body.

## `keepOrientation` (type: `boolean`):

JPEG only: keep a minimal EXIF block that holds just the rotation flag, so phone photos are not shown sideways. Everything else in EXIF is removed.

## `maxImageSizeMb` (type: `integer`):

Larger images are skipped with an error.

## `maxConcurrency` (type: `integer`):

Lower this if a site rate-limits you.

## Actor input object example

```json
{
  "imageUrls": [
    "https://raw.githubusercontent.com/d3x-at/sd-parsers/master/tests/resources/parsers/AUTOMATIC1111/automatic1111_cropped.png",
    "https://raw.githubusercontent.com/ianare/exif-samples/master/jpg/gps/DSCN0010.jpg"
  ],
  "keepColorProfile": true,
  "keepOrientation": true,
  "maxImageSizeMb": 30,
  "maxConcurrency": 4
}
```

# Actor output Schema

## `results` (type: `string`):

Results in the run's default dataset.

# 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 = {
    "imageUrls": [
        "https://raw.githubusercontent.com/d3x-at/sd-parsers/master/tests/resources/parsers/AUTOMATIC1111/automatic1111_cropped.png",
        "https://raw.githubusercontent.com/ianare/exif-samples/master/jpg/gps/DSCN0010.jpg"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("chivalrous_skyline_vtd/image-metadata-stripper").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 = { "imageUrls": [
        "https://raw.githubusercontent.com/d3x-at/sd-parsers/master/tests/resources/parsers/AUTOMATIC1111/automatic1111_cropped.png",
        "https://raw.githubusercontent.com/ianare/exif-samples/master/jpg/gps/DSCN0010.jpg",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("chivalrous_skyline_vtd/image-metadata-stripper").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 '{
  "imageUrls": [
    "https://raw.githubusercontent.com/d3x-at/sd-parsers/master/tests/resources/parsers/AUTOMATIC1111/automatic1111_cropped.png",
    "https://raw.githubusercontent.com/ianare/exif-samples/master/jpg/gps/DSCN0010.jpg"
  ]
}' |
apify call chivalrous_skyline_vtd/image-metadata-stripper --silent --output-dataset

```

## MCP server setup

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

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/hYiDohOaSsUj8GaON/builds/hfebrSbvHLwwo94xu/openapi.json
