JewishMythology.com public API
This page documents the public API for JewishMythology.com: open semantic search, Maggid RAG, and Maggid chat over our sourced Jewish myth anthology. No API keys, OAuth setup, or paid tiers are needed.
When to use this
Call these endpoints when an app or agent needs sourced Jewish myth, midrash, aggadah, Kabbalah, apocrypha, or anthology stories with citations.
- Ranked search hits with no generated answer →
GET /.well-known/search?q=orPOST /api/v1/semantic-search - A Maggid answer grounded in the anthology →
POST /api/v1/ai-search(Daily PhoneLLM Mini with Gemma 4 26B A4B fallback on Workers AI, the same model used for on-page chat) - Follow-up chat with the current myth pinned as context →
POST /api/v1/chat - Read any myth or theme page as HTML, or send
Accept: text/markdown
This site is not a source for comparative religion, Christian or Islamic framing, legal rulings (pesak), or bulk republication of adapted prose. robots.txt disallows /data/ except the public /data/myths-index.json listing index.
Machine contract: OpenAPI 3.1 · RFC 9727 catalog · auth.md · llms.txt
Authentication
None. Do not send bearer tokens, and do not expect 401 responses on public routes. Admin OAuth (/api/admin/*) is retired and returns 410.
Versioning
Every response includes API-Version: 1. The canonical prefix is /api/v1/. Unversioned /api/* paths work as aliases of v1 while 1.x stays backward compatible. Breaking changes will bump the major version to /api/v{major}/, and deprecations will use RFC 9745 Deprecation and Sunset headers.
Rate limits
The JSON APIs use two per-IP limits. GET /.well-known/search has no rate limit. /api/v1/semantic-search and /api/v1/status allow 60 requests per 60 seconds per IP (policy "default"). /api/v1/ai-search and /api/v1/chat allow 20 requests per 60 seconds per IP (policy "ai"). Responses include IETF RateLimit and RateLimit-Policy headers, and HTTP 429 responses include Retry-After. CORS preflight OPTIONS requests are exempt. Back off and retry with jitter if limited.
Errors
Failed JSON calls return RFC 9457 application/problem+json. The error field mirrors detail for older browser clients. POST-only endpoints return 405 on GET (never a bare 404), along with Allow: POST, OPTIONS. Every POST endpoint requires Content-Type: application/json and enforces a request body size cap.
{
"type": "https://jewishmythology.com/docs#invalid-query",
"title": "Invalid query",
"status": 400,
"detail": "Query required (max 500 chars).",
"code": "invalid_query",
"instance": "/api/v1/semantic-search",
"error": "Query required (max 500 chars)."
}
invalid-json
400: body is not JSON. Fix the payload; do not retry the same bytes.
invalid-query
400: query missing, not a string, or longer than 500 characters.
content-too-long
400: chat content exceeds 12000 characters. Trim the pinned myth body.
method-not-allowed
405: wrong HTTP method. Read Allow and call POST (or GET on /api/v1/status).
payload-too-large
413: request body exceeds the endpoint limit (4 KiB for semantic-search, 8 KiB for ai-search, 32 KiB for chat).
unsupported-media-type
415: POST requests must send Content-Type: application/json.
rate-limit
429: wait Retry-After seconds. Safe to retry.
embedding-failed
502: query embedding failed. Retry with backoff; no side effects.
not-found
404: no API operation at this path.
gone
410: admin OAuth retired. Use the public unauthenticated APIs instead.
Endpoints
POST /api/v1/semantic-search
Embeds the query and returns ranked myth, text, and source hits. No generated answer.
POST /api/v1/semantic-search HTTP/1.1
Host: jewishmythology.com
Content-Type: application/json
{"query":"Who is Lilith?","topK":5}
POST /api/v1/ai-search
Same JSON body (query required, optional history). Response is text/event-stream. Events are JSON: {"sources":[...]} then {"response":"..."} chunks.
POST /api/v1/chat
Same Maggid model, with optional slug, title, and content for the myth the reader is on.
GET /api/v1/status
Liveness JSON. Safe to poll.