API

Developer APIs for Herkules platform. Currently featuring document processing services.

We built these APIs to solve our own document processing needs at Herkules. Working with thousands of tender documents daily, we needed reliable, fast conversion tools that just work.

Now we're making them available to other developers. No complex SDKs, no vendor lock-in - just simple REST endpoints that handle the heavy lifting of document processing.

GET

CVR Lookup API

CVR{JSON

Look up Danish company information by CVR number. Returns name, address, and contact details.

Endpoint

https://herkules.dk/api/cvr/lookup?cvr=12345678

Request

curl "https://herkules.dk/api/cvr/lookup?cvr=45333043" \
  -H "Authorization: Bearer YOUR_API_KEY"

Parameters

cvr: 8-digit CVR number (required)

Response

{
  "vat": 45333043,
  "name": "RTT A/S",
  "address": "Transformervej 4",
  "zipcode": 2860,
  "city": "Soborg",
  "phone": "44535515"
}
POST

PDF to Markdown API

PDF#MD

Convert PDF, DOCX, PPTX, and other documents to clean Markdown text.

Endpoint

https://api.herkules.dk/convert/markdown

Request

curl -X POST https://api.herkules.dk/convert/markdown \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@document.pdf"

Supported Formats

.pdf.docx.doc.pptx.xlsx.odt.rtf.html.txt

Response

{
  "filename": "document.pdf",
  "markdown": "# Content..."
}
POST

DOCX to PDF API

DOCXPDF

Convert Office documents to PDF using Gotenberg LibreOffice engine.

Endpoint

https://api.herkules.dk/convert/pdf

Request

curl -X POST https://api.herkules.dk/convert/pdf \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@document.docx" \
  --output document.pdf

Supported Formats

.docx.doc.xlsx.pptx.odt.ods.rtf.txt.csv

Response

Binary PDF file (application/pdf)
POST

PDF Thumbnail API

PDFJPEG

Generate JPEG thumbnails from PDF first pages.

Endpoint

https://api.herkules.dk/thumbnail

Request

curl -X POST https://api.herkules.dk/thumbnail \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@document.pdf" \
  -F "width=800" \
  -F "height=600" \
  --output thumbnail.jpg

Parameters

width: 1-2000 (default: 800)
height: 1-2000 (default: 800)

Response

Binary JPEG image (image/jpeg)

$ request_api_key()

// Initialize your access credentials

200 OK • Response time: <2s