Documentation Index
Fetch the complete documentation index at: https://docs.simplefunctions.dev/llms.txt
Use this file to discover all available pages before exploring further.
Use these endpoints when an agent needs source context separate from prediction-market objects.
Economic query
GET /api/public/query-econ
curl "https://simplefunctions.dev/api/public/query-econ?q=unemployment%20rate&limit=3"
Parameters:
| Parameter | Values | Use |
|---|
q | string | Economic series or macro topic. Required. |
mode | full, raw | full includes answer text from the mirror; raw is structured retrieval. |
limit | 1 to 10 | Max series. Default 5. |
includeMarkets | true, 1, yes | Include related Kalshi/Polymarket markets. Default false. |
Response shape:
{
"query": "unemployment rate",
"answer": "...",
"series": [
{
"id": "UNRATE",
"title": "Unemployment Rate",
"units": "Percent",
"frequency": "Monthly",
"latest": {
"date": "2026-03-01",
"value": "4.3",
"numericValue": 4.3
},
"changes": {
"previous": {},
"yearAgo": {}
},
"observations": [],
"source": "FRED",
"sourceUrl": "https://fred.stlouisfed.org/series/UNRATE",
"observationsUrl": "https://simplefunctions.dev/api/public/fred?series=UNRATE"
}
],
"markets": [],
"meta": {
"provider": "fred-mirror",
"mode": "full",
"includeMarkets": false,
"latencyMs": 0
},
"nextActions": {
"inspect": [],
"related": []
}
}
Add markets:
curl "https://simplefunctions.dev/api/public/query-econ?q=unemployment%20rate&includeMarkets=true"
CLI:
sf econ "unemployment rate" --json
sf fred UNRATE --json
Government query
GET /api/public/query-gov
curl "https://simplefunctions.dev/api/public/query-gov?q=save%20act&limit=3"
Parameters:
| Parameter | Values | Use |
|---|
q | string | Bill, nomination, member, jurisdiction, or policy question. Required. |
mode | full, raw | full includes synthesis. raw returns structured retrieval. |
sources | comma list | congress, openstates, kalshi, crs. Default all. |
limit | 1 to 20 | Max results per source. Default 10. |
depth | true | Fetch deeper bill/action/orderbook context where available. |
Response shape:
{
"query": "save act",
"answer": "...",
"keyFactors": [],
"bills": [
{
"id": "119-hr-22",
"congress": 119,
"type": "hr",
"number": 22,
"title": "...",
"status": "...",
"sponsor": "...",
"hasMarket": true,
"market": {
"ticker": "...",
"title": "...",
"venue": "kalshi"
}
}
],
"nominations": [],
"markets": [],
"members": [],
"meta": {
"provider": "congress-mirror",
"mode": "full",
"latencyMs": 0
},
"nextActions": {
"inspect": [],
"related": []
}
}
Examples:
curl "https://simplefunctions.dev/api/public/query-gov?q=warsh%20fed%20chair&limit=5"
curl "https://simplefunctions.dev/api/public/query-gov?q=save%20act&sources=congress,kalshi"
curl "https://simplefunctions.dev/api/public/query-gov?q=new%20york%20energy%20bill&sources=openstates"
CLI:
sf policy "save act" --json
sf bill 119-hr-22 --json
Bill detail
GET /api/public/legislation/{billId}
curl "https://simplefunctions.dev/api/public/legislation/119-hr-22"
Use bill detail after query-gov returns a bill id.