Skip to content

Parse

GET /v2/parse/formats

Copy page

List the file types parse reads.

GET /v2/parse/formats

Authentication: your key as a bearer token.

Request

bash
curl https://api.darkcrawl.dev/v2/parse/formats \
  -H "Authorization: Bearer $DARKCRAWL_API_KEY"

Response

Status 200.

Response
{
  "success": true,
  "formats": [
    {
      "extension": ".pdf",
      "mimeType": "application/pdf"
    },
    {
      "extension": ".docx",
      "mimeType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
    },
    {
      "extension": ".png",
      "mimeType": "image/png",
      "needs": "image parser"
    }
  ],
  "data": {
    "formats": [
      {
        "format": "pdf",
        "kind": "document",
        "extensions": [
          ".pdf"
        ],
        "mimeTypes": [
          "application/pdf"
        ],
        "available": true
      }
    ]
  }
}

Notes

  • The reply here is cut short: formats has an entry for each extension, and data.formats one for each type of file.
  • An image has needs: "image parser": it is read only when the request sends the image parser. Parse has the rest.