Skip to main content
PII redaction replaces personally identifiable information in returned markdown before you send it downstream to agents, logs, vector stores, or analytics pipelines.

How it works

Set redactPII: true on a scrape request. Firecrawl redacts the generated markdown and returns the redacted version in markdown. You do not need to pass formats; markdown is the default output.
from firecrawl import Firecrawl

firecrawl = Firecrawl(api_key="fc-YOUR_API_KEY")

doc = firecrawl.scrape(
    "https://example.com/contact",
    redact_pii=True,
)

print(doc.markdown)

Redaction options

For most requests, use redactPII: true. To tune redaction, pass an options object:
{
  "redactPII": {
    "mode": "accurate",
    "entities": ["EMAIL", "PHONE", "SECRET"],
    "replaceStyle": "tag"
  }
}
OptionValuesDefaultDescription
modeaccurate, aggressive, fastaccurateRedaction strategy. accurate uses the model-only path, aggressive increases recall with additional heuristics, and fast skips the model call.
entitiesPERSON, EMAIL, PHONE, LOCATION, FINANCIAL, SECRETAll entitiesLimit redaction to specific entity buckets.
replaceStyletag, mask, removetagReplace spans with tags like <EMAIL>, mask them with *, or remove the characters entirely.
The Firecrawl CLI and MCP server expose simple boolean redaction. Advanced options are available through the API and SDKs that expose the full redactPII options object.

Response

When redaction succeeds, markdown contains the redacted content:
{
  "success": true,
  "data": {
    "markdown": "Contact us at <EMAIL> or <PHONE>.",
    "metadata": {
      "sourceURL": "https://example.com/contact"
    }
  }
}
For command-line viewing, pipe the markdown into your preferred renderer:
cURL
curl -X POST https://api.firecrawl.dev/v2/scrape \
  -H "Authorization: Bearer $FIRECRAWL_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
    "url": "https://dlptest.com/sample-data.pdf",
    "redactPII": true
  }' | jq -r ".data.markdown" | glow

Billing

PII redaction costs 5 credits per page: 1 base scrape credit plus 4 additional credits for redaction. For parsed PDFs, each additional PDF page still incurs the normal PDF parsing credit and also receives the additional redaction charge.

Availability

PII redaction is supported anywhere Firecrawl accepts scrape options:
  • Scrape - set redactPII on /v2/scrape.
  • Crawl, batch scrape, and search - pass redactPII inside scrapeOptions.
  • Parse - pass redactPII inside the multipart options JSON.
  • SDKs - Python uses redact_pii; JavaScript and other SDKs use redactPII or their native option casing.
  • CLI - pass --redact-pii to firecrawl scrape.
  • MCP server - include "redactPII": true in firecrawl_scrape tool arguments for simple boolean redaction.
Are you an AI agent that needs a Firecrawl API key? See firecrawl.dev/agent-onboarding/SKILL.md for automated onboarding instructions.