simple and fast html -> markdown reader service in go.
GET /healthzGET /readyzGET /read?url=https://example.comPOST /extract
docker compose up --buildthis starts:
go-readeron:8080
set API_KEY to require an X-API-KEY header on GET /read and POST /extract.
- when
API_KEYis not set, auth is disabled GET /healthzandGET /readyzare always publicx
example:
API_KEY=supersecret docker compose up --build{
"url": "https://example.com",
"timeout_ms": 8000,
"user_agent": "my-reader/1.0"
}for /extract, user-agent precedence is:
X-User-Agentrequest headeruser_agentin JSON body- default
go-reader/0.1
for /read, set X-User-Agent to override the default.
curl "http://localhost:8080/read?url=https://example.com"curl -X POST "http://localhost:8080/extract" \
-H "content-type: application/json" \
-d '{"url":"https://example.com"}'curl -X POST "http://localhost:8080/extract" \
-H "content-type: application/json" \
-H "X-User-Agent: my-reader/1.0" \
-d '{"url":"https://example.com","user_agent":"body-reader/1.0"}'curl "http://localhost:8080/read?url=https://example.com" \
-H "X-User-Agent: my-reader/1.0"