Skip to main content

GET /api/documents/filters

Returns all source_name values currently in the Alchemist database. Call this before using the source_name filter in POST /api/insights/search or GET /api/documents — source name matching is case-insensitive partial match, and this endpoint shows exactly what names are available.

Authentication

X-API-Key: alch_YOUR_KEY

No parameters

This endpoint takes no query parameters.

Response 200

{
  "source_names": [
    "Federal Reserve",
    "USDA",
    "Bureau of Labor Statistics",
    "Bureau of Economic Analysis",
    "U.S. Energy Information Administration",
    "SEC EDGAR",
    "Congressional Budget Office"
  ]
}
The list reflects what’s currently in the database and will grow as Alchemist ingests new sources.

Examples

curl https://api.askalchemist.com/api/documents/filters \
  -H "X-API-Key: alch_YOUR_KEY"

Usage pattern

import httpx

# 1. Get available sources
filters = httpx.get(
    "https://api.askalchemist.com/api/documents/filters",
    headers={"X-API-Key": "alch_YOUR_KEY"},
).json()["source_names"]

# 2. Pick the one that matches your intent
fed_source = next(s for s in filters if "Federal Reserve" in s)

# 3. Pass it as a filter
results = httpx.post(
    "https://api.askalchemist.com/api/insights/search",
    headers={"X-API-Key": "alch_YOUR_KEY"},
    json={"query": "rate path 2026", "source_name": fed_source},
).json()