Deep PII/secret guard for documents and URLs (paid)
pii_guard_documentsDetect and redact PII, secrets, names, and addresses in text, PDFs, or public document URLs; restore originals with placeholder maps.
Instructions
WHAT: Runs the Fairquery Apify Actor llm-data-guard-pii-secrets: everything pii_scan_text does PLUS person-name/location NER, street addresses, public document URLs (txt/md/json/csv/HTML/PDF text layer, <= 10 MB) and restore mode (put originals back into LLM output using a placeholder map). WHEN: You need NER names/addresses, need to scan files at URLs/PDFs, or want the hosted pipeline. For plain text with regex-detectable PII/secrets prefer free pii_scan_text / pii_redact_text. WHEN NOT: Plain text scans (free tools), images (no OCR), email deliverability. COST: Paid, billed to YOUR Apify account via your APIFY_TOKEN: $0.003 per document + $0.0005 per finding (Actor fairquery/llm-data-guard-pii-secrets). Example: 10 docs with 20 findings ~ $0.04. RETURNS: Paged rows: type="document" (id, source, chars, mode, finding_count, counts_by_type, risk_level, findings[] masked, output_text, placeholder_map if requested) or type="error". Tool errors: APIFY_TOKEN_MISSING, APIFY_TOKEN_INVALID, APIFY_PAYMENT_REQUIRED, APIFY_ACTOR_RUN_FAILED, APIFY_TIMEOUT, INPUT_EMPTY. BEHAVIOR: Read-only (does not modify your data), idempotent. Makes network calls: runs an Apify Actor billed to your APIFY_TOKEN; may fetch documentUrls. Latency seconds to a few minutes (300 s actor timeout). Up to 1000 texts / 100 URLs (10 MB each). PARAMETERS: texts or documentUrls = input (one required); mode = detect | redact | restore (default redact); redactionStyle (default placeholder); returnPlaceholderMap (default false); placeholderMap = map for restore mode; detectNames / detectAddresses = NER for names / addresses (default false); entropyScan (default false); entityTypes / allowList = restrict / exempt values; limit = page size (default 100, max 1000); offset = items to skip for paging (default 0). EXAMPLE: {"documentUrls":["https://example.com/report.pdf"],"mode":"redact","detectNames":true}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | "detect" findings only; "redact" (default) also output_text; "restore" replaces placeholders in texts using placeholderMap | redact |
| limit | No | Page size: items to return, integer 1-1000 (default 100) | |
| texts | No | Documents as strings (each <= 1,000,000 chars, max 1000). Optional if documentUrls given | |
| offset | No | Items to skip for paging, integer >= 0 (default 0); pass nextOffset from the previous response | |
| allowList | No | Values never flagged | |
| detectNames | No | Person-name NER (default false) | |
| entityTypes | No | Restrict types, e.g. ["EMAIL","PERSON"] | |
| entropyScan | No | Flag high-entropy tokens (default false) | |
| documentUrls | No | Public http(s) URLs of txt/md/json/csv/HTML/PDF files (<= 10 MB each), fetched by the Actor in Apify cloud, max 100. Example: ["https://example.com/a.pdf"] | |
| placeholderMap | No | For mode="restore": {"[EMAIL_1]":"jane@acme.com"} | |
| redactionStyle | No | Redact style (default placeholder) | placeholder |
| detectAddresses | No | Street addresses + place-name NER (default false) | |
| returnPlaceholderMap | No | Include placeholder_map with original values (default false) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| meta | No | Tool-specific context (summary counts, cost notes, ...) | |
| count | Yes | Number of items in this page | |
| items | Yes | Result rows for this page | |
| total | Yes | Total items before paging | |
| offset | Yes | Offset of the first item in this page | |
| hasMore | Yes | True if more items exist after this page | |
| nextOffset | Yes | Offset to pass for the next page, or null |