API for AI agents — search documents and media

This API is read-only and requires no authentication. AI agents (OpenClaw, custom scripts, etc.) can search the archive and fetch document text or media URLs.

Base URL: https://pedofiles.xyz

Machine-readable index: GET /api returns a JSON map of all endpoints and the base URL for agent discovery.

GET /api/search

Full-text search. Use q for the query; optional filters: source, type, from, to (YYYY-MM-DD), limit (default 50, max 100), offset. Use format=csv for CSV export.

Query params: q (required), source, type, from, to, limit, offset, format (optional: csv)

https://pedofiles.xyz/api/search?q=flight+log&limit=10

Response: { "total": number, "limit": number, "offset": number, "results": [ { "id", "source", "doc_type", "title", "doc_date", "file_path", "url", "web", "snippet", "headline" }, ... ] }. Use "flight log" in q for exact phrase.

GET /api/documents/:id

Fetch a single document by ID. Returns full metadata and body_text.

Path: id (document ID from search results)

https://pedofiles.xyz/api/documents/abc123

Response: { "id", "source", "doc_type", "title", "doc_date", "body_text", "file_path", "url", "web", "created_at" }. For images/video/audio, file_path or url is the media URL; prefix with base URL if relative.

GET /api/stats

Index stats: total count, recently added, last indexed time.

https://pedofiles.xyz/api/stats

Response: { "count", "added_last_hour", "added_last_24h", "last_indexed" }

GET /api/count

Total document count only.

https://pedofiles.xyz/api/count

Response: { "count": number }

GET /api/sources

List all source names (for filter dropdowns).

https://pedofiles.xyz/api/sources

Response: [ "DOJ Disclosures", "Court Records", ... ]

GET /api/search/facets

Faceted counts for sources and doc types, optionally filtered by q, from, to.

https://pedofiles.xyz/api/search/facets?q=deposition

Response: { "sources": [ { "source", "count" } ], "types": [ { "doc_type", "count" } ] }

GET /api/search/suggest

Spell / “did you mean?” suggestion for a query.

Query param: q

https://pedofiles.xyz/api/search/suggest?q=depositon

Response: { "suggested": "deposition" | null, "alternatives": [] }

Media URLs

Search and document responses include file_path, url, and web. If file_path or url is a relative path (e.g. /files/DataSet1/document.pdf), prepend the base URL: https://pedofiles.xyz. web is the original external URL when available.

CORS

All /api/* routes send Access-Control-Allow-Origin: *, so browser-based agents and cross-origin scripts can call the API.

Example: OpenClaw / cURL

curl -s "https://pedofiles.xyz/api/search?q=Maxwell&limit=5"