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

qoptional
Search string. Matches against titles, descriptions, slugs, and full body text across all content types. If omitted, returns the most recently updated items.
limitoptional
Number of results to return (default 20, max 200). Use a higher limit or omit q to retrieve more (or all) content.
fulloptional
Set 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

typeDescription
pageStatic site pages
journalJournal entries
faqFAQ 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