Site Content API
This site exposes a read-only JSON API so that LLMs and other tools can search and retrieve published content (pages, journal articles, and FAQs). Use it to answer questions from our content or to build context for assistants.
Endpoint
GET /api/site-content
Query parameters
qoptionalSearch string. Matches against titles, descriptions, slugs, and full body text across all content types. If omitted, returns the most recently updated items.
limitoptionalNumber of results to return (default
20, max 200). Use a higher limit or omit q to retrieve more (or all) content.fulloptionalSet to
1 to include the full text of each result in a content field (for LLM context). Otherwise only snippet is returned.Example request
HTTP
GET /api/site-content?q=investing&limit=5
Example response
JSON
{
"ok": true,
"query": "investing",
"totalDocs": 12,
"limit": 5,
"results": [
{
"type": "journal",
"title": "Understanding risk and return",
"url": "https://example.com/journal/understanding-risk",
"snippet": "A short description or excerpt...",
"metaTitle": "Optional meta title"
},
{
"type": "faq",
"title": "How do I get started with investing?",
"url": "https://example.com/faqs/getting-started/how-do-i-get-started-123",
"snippet": "You can get started by..."
},
{
"type": "page",
"title": "Our approach",
"url": "https://example.com/our-approach",
"snippet": "We believe in..."
}
]
}Result types
type | Description |
|---|---|
page | Static site pages |
journal | Journal entries |
faq | FAQ entries (questions and answers) |
Rate limiting
The API allows 60 requests per minute per IP. If you exceed this, the response is 429 Too Many Requests with a Retry-After: 60 header. Stay at or below this limit when polling or batching.
Usage notes
- Only published content is returned (drafts and unpublished items are excluded).
- Responses are JSON only. Set
Accept: application/jsonif needed. - Use the
urlfield to link users to the full content on this site. - The
snippetfield is a short preview; usefull=1to get full text incontentfor each result.