Skip to content

Parse

POST /v2/parse

Copy page

Upload a PDF, an Office file or an image and get its text back. An image is read by OCR, only with the image parser on.

POST /v2/parse

Authentication: your key as a bearer token.

Body

FieldTypeRequiredDefault
filefileRequired
optionsobjectOptional
options.formats(string | object)[]Optional["markdown"]
options.timeoutinteger | nullOptional30000
options.parsers(string | object)[]Optional
options.redactPIIboolean | objectOptional
Firecrawl compatibility fields

Firecrawl fields DarkCrawl does not offer. It takes them so the Firecrawl SDKs keep working, then ignores or refuses each one as the table says.

FieldWhat DarkCrawl does
options.onlyMainContentIgnored, with a warning when not Firecrawl's default.
options.includeTagsIgnored, with a warning when not Firecrawl's default.
options.excludeTagsIgnored, with a warning when not Firecrawl's default.
options.mobileIgnored, with a warning when not Firecrawl's default.
options.blockAdsIgnored, with a warning when not Firecrawl's default.
options.fastModeIgnored, with a warning when not Firecrawl's default.
options.originAccepted and ignored.
options.skipTlsVerificationAccepted and ignored.
options.removeBase64ImagesAccepted and ignored.

Request

curl
curl -X POST https://api.darkcrawl.dev/v2/parse \
  -H "Authorization: Bearer $DARKCRAWL_API_KEY" \
  -F "file=@<your file>" \
  -F 'options={"formats":["markdown","links"]}'

Response

Status 200.

Response
{
  "success": true,
  "data": {
    "markdown": "# Sample report\n\nPage one of a fictional PDF.\n",
    "indicators": [],
    "metadata": {
      "title": "Sample report",
      "numPages": 1,
      "totalPages": 1,
      "sourceFile": "report.pdf",
      "contentType": "application/pdf",
      "document": {
        "type": "pdf",
        "pages": 1,
        "totalPages": 1,
        "ocrPages": 0,
        "truncated": false,
        "encrypted": false
      }
    }
  }
}

Errors

CodeStatus
BAD_REQUEST400
NOT_IMPLEMENTED400
POLICY_FORBIDDEN400
SCRAPE_TIMEOUT408
PAYLOAD_TOO_LARGE413
EXTRACTION_FAILED422
AI_UNAVAILABLE503
BLOCKLIST_UNAVAILABLE503
EXTRACTION_UNAVAILABLE503

What each code means, and what to do about it: Errors.

Notes

  • The request is multipart/form-data: a file part and, optionally, an options part that holds JSON.
  • Any other options field answers 400 BAD_REQUEST. What is read, and the limits, are on Parse.