Skip to content

Document Extractor

This API provides a multi-format parsing engine. It accepts a direct URL to a document or code file and returns the clean, raw text content. This is ideal for feeding individual documents into LLMs or search indexes.

  • PDF (.pdf)
  • Word (.docx)
  • Plain Text (.txt)
  • Code (.js, .ts, .py, .java, .html, .css, .json, .md, etc.)
POST /api/v1/doc-extract

The following parameters are accepted in the request body:

FieldTypeRequiredDescription
urlstringYesDirect URL to the file.
Terminal window
curl -X POST https://heavstal.com.ng/api/v1/doc-extract \
-H "Content-Type: application/json" \
-H "x-api-key: <YOUR_API_KEY>" \
-d '{"url": "https://example.com/contract.docx"}'
{
"status": "success",
"creator": "HEAVSTAL TECH",
"data": {
"detected_type": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"extension": "docx",
"content": "Contract Agreement\nThis agreement is made between..."
}
}