API Documentation
Remove visible text watermarks from PDFs with a single HTTP request.
Overview
Send a PDF and the watermark text you want removed. The API processes the document synchronously and returns the result in the same response, together with a machine-readable report that says exactly what was (or was not) removed.
Call this host directly from your server. Browser requests from other websites are blocked by CORS.
- Authentication
- Optional. Anonymous requests are limited per client IP to 10 per minute and 60 per hour. An API key sent as
X-API-Keygets its own, higher quota and attributes requests to your client name. Request a key via the contact link in the footer. - Limits
- One PDF per request,
application/pdf, up to 10MB when calling the API directly. The website uploader is limited to 10MB. Processing is synchronous and typically takes a few seconds; allow a timeout of at least 120 seconds. - What it removes
- Text watermarks in the PDF text layer that match the text you supply. Scanned or image-only pages have no text layer and are reported as
no_text_layer. - Uploads
- Uploaded files are handled as described in the Privacy Policy. Do not send documents you are not permitted to modify.
Endpoints
Returns the processed PDF as the response body. The report travels in response headers so a single request is enough.
Request (multipart/form-data)
- filerequired, max 10MB
- The PDF to process. The part must carry
Content-Type: application/pdf; other types are rejected with 400. - watermark_textrequired, up to 256 chars
- The watermark text as it appears on the page, for example
CONFIDENTIALorDRAFT - DO NOT DISTRIBUTE. Up to 4 lines, each with at least three letters or digits; long passages that look like body text are rejected with 400. The engine also looks for close variants and reports them inoutcome.discovery. - X-Request-IDoptional header
- Your own correlation id. Echoed back on every response; one is generated if you omit it.
- X-API-Keyoptional header
- Your API key. Omit it to use the anonymous tier; an unknown key is rejected with 401 rather than downgraded.
Response (200, application/pdf)
- X-Processing-ReportJSON
- The verdict. Read
outcome.statusbefore treating the file as cleaned; see “Reading the result” below. Kept under 8 KiB: on long documentsdiagnosticsand thenpageskeep their first entries andpages_truncatedgives the number left out. The stats endpoint returns the full report. - X-Watermark-StatsJSON
- Counts plus matched
locations,page_statistics, andpatterns_matched. Kept under 5 KiB: on documents with many matchespage_statisticsand thenlocationskeep their first entries andlocations_truncatedgives the number left out. - X-Request-ID
- The correlation id for this request. Include it when reporting a problem.
- Content-Disposition
- attachment; filename=<suggested name>.pdf
- RateLimit-*
RateLimit-Limitis your hourly quota,RateLimit-Remainingthe requests left in it, andRateLimit-Resetthe seconds until the oldest counted request expires.
Accepts the same multipart request and runs the same processing, but returns a JSON body instead of the file: { message, file_path, statistics, processing_report }. statistics and processing_report are the same objects as the two headers above. Use this to preview an outcome, or when your HTTP client caps header size. file_path is the server-side output name and is informational only; no file is returned.
Reading the result
A 200 means the request was processed, not that a watermark was removed. The response always contains a PDF; check outcome.status in X-Processing-Report to know whether anything changed.
- removed
- At least one watermark occurrence was removed. summary and pages say how many and where.
- nothing_removed
- The document was left unchanged.
reasonexplains why:no_text_layer— the PDF has no extractable text (scanned or image-only pages).target_not_found— the text was not found on any page. Check spelling, spacing, and case against the visible watermark.target_found_not_removed— the text was located but could not be removed without risking other content, so nothing was changed.undetermined— no verdict could be established. Retry with the exact watermark text, or use the contact link if it persists.
Example X-Processing-Report
{
"summary": {
"text_watermarks_found": 9,
"text_watermarks_removed": 9,
"image_watermarks_found": 0,
"image_watermarks_removed": 0,
"patterns_matched": ["CONFIDENTIAL"]
},
"outcome": {
"status": "removed",
"reason": null,
"discovery": {
"status": "uncorroborated",
"discovered_target": null,
"similarity": 0.453,
"adopted": false
}
},
"pages": {
"1": {
"page": 1,
"text_watermarks": 3,
"image_watermarks": 0,
"location_count": 1,
"location_types": ["text"],
"has_reported_change": true
}
},
"warnings": [],
"diagnostics": { "...": "engine internals, shape may change" }
}summaryholds the run totals.pageshas one entry per page the engine touched, andtext_watermarks/image_watermarkscount the occurrences removed on that page. A shared form drawn on several pages counts once per page, so the per-page sum can exceed the total. Treathas_reported_changeas the per-page yes/no; a page listed only withchunk_textevidence changed but could not be counted.location_typesvalues includetext,image, andchunk_text.outcome.discoveryis informational.foundwithadopted: truemeans the engine used a close variant of your text (discovered_target);no_textmeans no text layer. Otherstatusvalues describe why no variant was adopted, and the set may grow.summary,outcome,pages, andwarningsare stable.diagnosticsexposes engine internals and may change between releases.
Errors
Errors return JSON with a detail field and no PDF.
- 400
- Rejected input: not a PDF, empty, larger than 10MB, or a PDF that could not be parsed or repaired.
detailis a human-readable string. - 401
- Unknown
X-API-Key. Keys are case-sensitive; omit the header to use the anonymous tier. - 422
- Missing
fileorwatermark_text.detailis a list of validation errors withlocandmsg. - 429
- Rate limit exceeded. Wait
Retry-Afterseconds before retrying; the response also carries theRateLimit-*headers. Rejected requests do not consume quota. - 500
- Processing failed. Retry once; if it persists, report the
X-Request-IDfrom the response.
Examples
curl -sS -X POST https://api.watermarkremoval.com/api/v1/remove-watermark \ -F "file=@input.pdf;type=application/pdf" \ -F "watermark_text=CONFIDENTIAL" \ -D headers.txt \ -o output.pdf # The verdict is in the X-Processing-Report header grep -i '^x-processing-report' headers.txt
The OpenAPI document carries every header and error shape on this page, with stable operation ids (remove_watermark, remove_watermark_stats) for generated clients. https://api.watermarkremoval.com/health reports service status and the deployed engine_version.
Selected image objects
This separate workflow removes one explicitly selected image draw, not pixels inside a scan. It does not detect logos automatically. Limits: 5MB per PDF, 32 pages, small axis-aligned images only. Unsupported structures are refused rather than guessed at.
POST /api/v1/image-watermarks/candidates with multipart file and a one-based page_number. The response includes the source SHA-256 and candidate instruction indices with normalized, top-left bounding boxes. An empty list means no safe selection.
After the user selects a whole image, POST the same original file, page number, instruction_index, source_sha256, and confirmed=true to /api/v1/image-watermarks/preview. The PDF response is a proposed edit, not a claim that all watermarks are gone. Show original and preview, and obtain final confirmation before offering a download. Each request shares the normal API-key and per-IP quota rules.
No uploads are retained by this workflow. Other occurrences, including shared image resources, are left unchanged. It does not reconstruct covered text or imagery. A busy or resource-limited worker may refuse the request.
Legacy endpoint
Earlier versions of this page listed https://www.watermarkremoval.com/api/remove-watermark. That path still accepts the same request, but it runs through the website host, which caps uploads at 4.5MB, redirects the bare watermarkremoval.com host with a 308, and does not offer /stats. Move integrations to the base URL above.