Sign inSign up

cyzzxc/defuddle-api

By cyzzxc

Updated about 2 months ago

Extract main content from any URL as Markdown/JSON (defuddle HTTP API)

Image
0

121

cyzzxc/defuddle-api repository overview

defuddle-api

Thin HTTP API around kepano/defuddle. Give it a URL, get clean Markdown (or JSON). Multi-arch: linux/amd64, linux/arm64.

Quick start

docker run -d --name defuddle-api -p 8787:8787 cyzzxc/defuddle-api:latest
Docker Compose
services:
  defuddle-api:
    image: cyzzxc/defuddle-api:latest
    container_name: defuddle-api
    ports:
      - "8787:8787"
    environment:
      PORT: "8787"
    restart: unless-stopped
docker compose up -d

Usage

# Markdown (default)
curl http://localhost:8787/example.com
curl http://localhost:8787/https://example.com

# JSON
curl -H 'Accept: application/json' http://localhost:8787/https://example.com

# POST
curl -X POST http://localhost:8787/api/convert \
  -H 'Content-Type: application/json' \
  -d '{"url":"https://example.com"}'

# Health
curl http://localhost:8787/health
MethodPathResponse
GET/{url}Markdown; or JSON if Accept: application/json
POST/api/convertJSON ({"url":"..."})
GET/healthok

Path may be example.com or full https://example.com. No auth. Blocks private/metadata target hosts (SSRF guard).

Env

VariableDefaultNotes
PORT8787Listen port inside container

Tags

  • latest — multi-arch manifest

Tag summary

Content type

Image

Digest

sha256:158f95c26

Size

58.1 MB

Last updated

about 2 months ago

docker pull cyzzxc/defuddle-api