{"openapi":"3.1.0","jsonSchemaDialect":"https://json-schema.org/draft/2020-12/schema","info":{"title":"Nithyanandapedia API","version":"1","description":"Read-only JSON API of Nithyanandapedia. Every URL in a response is absolute; pages are also available as Markdown (markdownUrl). Responses carry CORS (`*`). A `limit` or `offset` outside its documented range is clamped to it; any other bad parameter is a 400."},"servers":[{"url":"https://nithyanandapedia.org/api"}],"paths":{"/pages/{key}":{"get":{"operationId":"getPage","summary":"One page","description":"A page of the Main or Project namespace with its metadata, categories, sections, infobox, event data and content. Non-canonical keys and wiki redirects answer 301 to the canonical URL; Category: keys answer 301 to /categories/{key}.","parameters":[{"name":"key","in":"path","required":true,"description":"Page key (MediaWiki DB key: spaces as `_`, namespace prefix kept). Encoded like a /wiki/ URL; '/' in a key is kept as is (KAILASA_TORONTO,_CANADA_on_7/31/2021), so the parameter spans the rest of the path.","schema":{"type":"string"},"x-allowReserved":true},{"name":"format","in":"query","required":false,"description":"Content format: blocks (ContentDocument + images map), markdown, text, or none","schema":{"type":"string","enum":["blocks","markdown","text","none"],"default":"blocks"}}],"responses":{"200":{"description":"The page","headers":{"Cache-Control":{"description":"Caching policy of the response","schema":{"type":"string"}},"Access-Control-Allow-Origin":{"description":"Always `*` (public, read-only API)","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageDetail"}}}},"301":{"description":"Canonical key, wiki redirect, or category","headers":{"Location":{"description":"Canonical URL (base path included)","schema":{"type":"string"}},"Cache-Control":{"description":"Caching policy of the response","schema":{"type":"string"}},"Access-Control-Allow-Origin":{"description":"Always `*` (public, read-only API)","schema":{"type":"string"}}}},"400":{"description":"Bad parameter","headers":{"Cache-Control":{"description":"Caching policy of the response","schema":{"type":"string"}},"Access-Control-Allow-Origin":{"description":"Always `*` (public, read-only API)","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"No such page","headers":{"Cache-Control":{"description":"Caching policy of the response","schema":{"type":"string"}},"Access-Control-Allow-Origin":{"description":"Always `*` (public, read-only API)","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/events":{"get":{"operationId":"listEvents","summary":"Events","description":"Event pages, newest first (undated events last), filtered by place, date range, type and activity. Follow `next` for more.","parameters":[{"name":"place","in":"query","required":false,"description":"Case-insensitive substring of the place ('toronto', 'canada')","schema":{"type":"string","maxLength":200}},{"name":"from","in":"query","required":false,"description":"First day, inclusive","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":false,"description":"Last day, inclusive (from ≤ to). With from or to, undated events are left out.","schema":{"type":"string","format":"date"}},{"name":"type","in":"query","required":false,"description":"Event type, case-insensitive: Online, In-Person, Both, …","schema":{"type":"string","maxLength":100}},{"name":"activity","in":"query","required":false,"description":"One of the activity types (exact)","schema":{"type":"string","maxLength":200}},{"name":"order","in":"query","required":false,"description":"Date order","schema":{"type":"string","enum":["desc","asc"],"default":"desc"}},{"name":"limit","in":"query","required":false,"description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from `next`","schema":{"type":"string"}}],"responses":{"200":{"description":"One page of events","headers":{"Cache-Control":{"description":"Caching policy of the response","schema":{"type":"string"}},"Access-Control-Allow-Origin":{"description":"Always `*` (public, read-only API)","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventList"}}}},"400":{"description":"Bad parameter (date, from > to, cursor)","headers":{"Cache-Control":{"description":"Caching policy of the response","schema":{"type":"string"}},"Access-Control-Allow-Origin":{"description":"Always `*` (public, read-only API)","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/categories/{key}":{"get":{"operationId":"getCategory","summary":"One category","description":"Description, parents, subcategories (with member counts) and one page of members, by page key. `Category:` in the key is optional.","parameters":[{"name":"key","in":"path","required":true,"description":"Category key, with or without `Category:`. Encoded like a /wiki/ URL; '/' in a key is kept as is (KAILASA_TORONTO,_CANADA_on_7/31/2021), so the parameter spans the rest of the path.","schema":{"type":"string"},"x-allowReserved":true},{"name":"limit","in":"query","required":false,"description":"Members per page","schema":{"type":"integer","minimum":1,"maximum":500,"default":200}},{"name":"cursor","in":"query","required":false,"description":"First member key of the page (from `pages.next`)","schema":{"type":"string"}}],"responses":{"200":{"description":"The category","headers":{"Cache-Control":{"description":"Caching policy of the response","schema":{"type":"string"}},"Access-Control-Allow-Origin":{"description":"Always `*` (public, read-only API)","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryDetail"}}}},"301":{"description":"Category redirect","headers":{"Location":{"description":"Canonical URL (base path included)","schema":{"type":"string"}},"Cache-Control":{"description":"Caching policy of the response","schema":{"type":"string"}},"Access-Control-Allow-Origin":{"description":"Always `*` (public, read-only API)","schema":{"type":"string"}}}},"400":{"description":"Bad parameter","headers":{"Cache-Control":{"description":"Caching policy of the response","schema":{"type":"string"}},"Access-Control-Allow-Origin":{"description":"Always `*` (public, read-only API)","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"No such category","headers":{"Cache-Control":{"description":"Caching policy of the response","schema":{"type":"string"}},"Access-Control-Allow-Origin":{"description":"Always `*` (public, read-only API)","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/images":{"get":{"operationId":"listImages","summary":"Images of a page","description":"The images a page uses (galleries, inline images, the PDB photo, images in kept HTML), by role then position. Images without a CDN copy have only `sourceUrl`.","parameters":[{"name":"page","in":"query","required":true,"description":"Page key","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Images per page","schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},{"name":"offset","in":"query","required":false,"description":"Images to skip","schema":{"type":"integer","minimum":0,"maximum":1000000,"default":0}}],"responses":{"200":{"description":"One page of images","headers":{"Cache-Control":{"description":"Caching policy of the response","schema":{"type":"string"}},"Access-Control-Allow-Origin":{"description":"Always `*` (public, read-only API)","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageList"}}}},"301":{"description":"Canonical key or wiki redirect","headers":{"Location":{"description":"Canonical URL (base path included)","schema":{"type":"string"}},"Cache-Control":{"description":"Caching policy of the response","schema":{"type":"string"}},"Access-Control-Allow-Origin":{"description":"Always `*` (public, read-only API)","schema":{"type":"string"}}}},"400":{"description":"Bad parameter","headers":{"Cache-Control":{"description":"Caching policy of the response","schema":{"type":"string"}},"Access-Control-Allow-Origin":{"description":"Always `*` (public, read-only API)","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"No such page","headers":{"Cache-Control":{"description":"Caching policy of the response","schema":{"type":"string"}},"Access-Control-Allow-Origin":{"description":"Always `*` (public, read-only API)","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/search":{"get":{"operationId":"search","summary":"Search","description":"Full-text search, merged with semantic (vector) search when embeddings are available (`mode` in the result tells which ran).","parameters":[{"name":"q","in":"query","required":true,"description":"Search terms","schema":{"type":"string","maxLength":300}},{"name":"limit","in":"query","required":false,"description":"Results per page","schema":{"type":"integer","minimum":1,"maximum":50,"default":10}},{"name":"offset","in":"query","required":false,"description":"Results to skip (hybrid mode returns at most 200 results in all)","schema":{"type":"integer","minimum":0,"maximum":10000,"default":0}},{"name":"mode","in":"query","required":false,"description":"auto: hybrid when available; fts: full text only","schema":{"type":"string","enum":["auto","fts"],"default":"auto"}}],"responses":{"200":{"description":"Search results","headers":{"Cache-Control":{"description":"Caching policy of the response","schema":{"type":"string"}},"Access-Control-Allow-Origin":{"description":"Always `*` (public, read-only API)","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResult"}}}},"400":{"description":"Bad parameter","headers":{"Cache-Control":{"description":"Caching policy of the response","schema":{"type":"string"}},"Access-Control-Allow-Origin":{"description":"Always `*` (public, read-only API)","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/wiki/opensearch":{"get":{"operationId":"opensearch","summary":"Title suggestions","description":"OpenSearch suggestions for a title prefix (the search box).","parameters":[{"name":"search","in":"query","required":true,"description":"Title prefix","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Suggestions","schema":{"type":"integer","minimum":1,"maximum":100,"default":10}}],"responses":{"200":{"description":"Suggestions","headers":{"Cache-Control":{"description":"Caching policy of the response","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"array","description":"OpenSearch suggestions: [query, [titles], [descriptions], [urls]]","prefixItems":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"string"}}],"minItems":4,"maxItems":4}}}},"502":{"description":"Search backend unavailable","headers":{"Cache-Control":{"description":"Caching policy of the response","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"array","description":"OpenSearch suggestions: [query, [titles], [descriptions], [urls]]","prefixItems":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"string"}}],"minItems":4,"maxItems":4}}}}}}}},"components":{"schemas":{"Links":{"type":"object","properties":{"url":{"type":"string","description":"HTML page"},"markdownUrl":{"type":"string","description":"The page as Markdown (/wiki/<key>.md)"},"apiUrl":{"type":"string","description":"The page as JSON"}},"required":["url","markdownUrl","apiUrl"],"additionalProperties":false},"ApiImage":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"url320":{"anyOf":[{"type":"string","description":"Absolute URL"},{"type":"null"}],"description":"320 px wide copy"},"url1080":{"anyOf":[{"type":"string","description":"Absolute URL"},{"type":"null"}],"description":"1080 px wide copy"},"original":{"anyOf":[{"type":"string","description":"Absolute URL"},{"type":"null"}],"description":"Unchanged original file"},"sourceUrl":{"anyOf":[{"type":"string","description":"Absolute URL"},{"type":"null"}],"description":"Where the file lived before the CDN copy"},"width":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"caption":{"type":"string"}},"required":["id","url320","url1080","original","sourceUrl","width","height"],"additionalProperties":false},"KeyTitleLink":{"type":"object","properties":{"key":{"type":"string","description":"Page key (MediaWiki DB key; categories without `Category:`)"},"title":{"type":"string"},"url":{"type":"string","description":"HTML page"},"markdownUrl":{"type":"string","description":"The page as Markdown (/wiki/<key>.md)"},"apiUrl":{"type":"string","description":"The page as JSON"}},"required":["key","title","url","markdownUrl","apiUrl"],"additionalProperties":false},"PageSummary":{"type":"object","properties":{"key":{"type":"string"},"title":{"type":"string"},"type":{"type":"string","description":"Page type: article, event, tamil, stub, press_meet, dharana"},"description":{"description":"First sentence of the page text (≤200 characters)","type":["string","null"]},"lastModified":{"description":"ISO timestamp of the last edit","type":["string","null"]},"url":{"type":"string","description":"HTML page"},"markdownUrl":{"type":"string","description":"The page as Markdown (/wiki/<key>.md)"},"apiUrl":{"type":"string","description":"The page as JSON"}},"required":["key","title","type","description","lastModified","url","markdownUrl","apiUrl"],"additionalProperties":false},"EventInfo":{"type":"object","properties":{"date":{"description":"YYYY-MM-DD","type":["string","null"]},"place":{"description":"e.g. \"KAILASA TORONTO, CANADA\"","type":["string","null"]},"eventType":{"description":"Online, In-Person, Both, or another label","type":["string","null"]},"activityTypes":{"type":"array","items":{"type":"string"}},"participantsCount":{"type":["number","null"]},"volunteersCount":{"type":["number","null"]},"mealsCount":{"type":["number","null"]},"foodServed":{"type":["boolean","null"]},"description":{"type":["string","null"]},"durationText":{"type":["string","null"]}},"required":["date","place","eventType","activityTypes","participantsCount","volunteersCount","mealsCount","foodServed","description","durationText"],"additionalProperties":false},"EventItem":{"type":"object","properties":{"key":{"type":"string"},"title":{"type":"string"},"type":{"type":"string","description":"Page type: article, event, tamil, stub, press_meet, dharana"},"description":{"type":["string","null"]},"lastModified":{"description":"ISO timestamp of the last edit","type":["string","null"]},"url":{"type":"string","description":"HTML page"},"markdownUrl":{"type":"string","description":"The page as Markdown (/wiki/<key>.md)"},"apiUrl":{"type":"string","description":"The page as JSON"},"date":{"description":"YYYY-MM-DD","type":["string","null"]},"place":{"description":"e.g. \"KAILASA TORONTO, CANADA\"","type":["string","null"]},"eventType":{"description":"Online, In-Person, Both, or another label","type":["string","null"]},"activityTypes":{"type":"array","items":{"type":"string"}},"participantsCount":{"type":["number","null"]},"volunteersCount":{"type":["number","null"]},"mealsCount":{"type":["number","null"]},"foodServed":{"type":["boolean","null"]},"durationText":{"type":["string","null"]},"leadImage":{"anyOf":[{"$ref":"#/components/schemas/ApiImage"},{"type":"null"}]}},"required":["key","title","type","description","lastModified","url","markdownUrl","apiUrl","date","place","eventType","activityTypes","participantsCount","volunteersCount","mealsCount","foodServed","durationText","leadImage"],"additionalProperties":false},"Section":{"type":"object","properties":{"level":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"line":{"type":"string"},"anchor":{"type":"string"}},"required":["level","line","anchor"],"additionalProperties":false},"PageDetail":{"type":"object","properties":{"key":{"type":"string"},"title":{"type":"string"},"type":{"type":"string","description":"Page type: article, event, tamil, stub, press_meet, dharana"},"description":{"description":"First sentence of the page text (≤200 characters)","type":["string","null"]},"lastModified":{"description":"ISO timestamp of the last edit","type":["string","null"]},"url":{"type":"string","description":"HTML page"},"markdownUrl":{"type":"string","description":"The page as Markdown (/wiki/<key>.md)"},"apiUrl":{"type":"string","description":"The page as JSON"},"displayTitle":{"type":["string","null"]},"namespace":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"language":{"type":["string","null"]},"created":{"type":"string","description":"When the page was imported into this database (ISO timestamp); not the wiki page’s creation date"},"categories":{"type":"array","items":{"$ref":"#/components/schemas/KeyTitleLink"}},"sections":{"type":"array","items":{"$ref":"#/components/schemas/Section"}},"infobox":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean","null"]}}}},{"type":"null"}]},"fields":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}],"description":"Type-specific data (events, press meets, dharanas)"},"event":{"anyOf":[{"$ref":"#/components/schemas/EventInfo"},{"type":"null"}]},"leadImage":{"anyOf":[{"$ref":"#/components/schemas/ApiImage"},{"type":"null"}]},"format":{"type":"string","enum":["blocks","markdown","text","none"]},"content":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"string"},{"type":"null"}],"description":"format=blocks: the ContentDocument {version, toc, blocks}; markdown/text: a string (null in the MCP get_page structuredContent, whose text result is the body); none: null"},"images":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/ApiImage"},"description":"Images referenced by the blocks, by image id (format=blocks)"}},"required":["key","title","type","description","lastModified","url","markdownUrl","apiUrl","displayTitle","namespace","language","created","categories","sections","infobox","fields","event","leadImage","format","content","images"],"additionalProperties":false},"SearchHit":{"type":"object","properties":{"key":{"type":"string"},"title":{"type":"string"},"snippet":{"type":"string","description":"Plain text"},"anchor":{"description":"Best-matching section (vector hits), or null","type":["string","null"]},"url":{"type":"string","description":"HTML page, with #anchor when there is one"},"markdownUrl":{"type":"string","description":"Absolute URL"},"apiUrl":{"type":"string","description":"Absolute URL"},"score":{"type":"number"},"matchedBy":{"type":"array","items":{"type":"string","enum":["fts","vector"]}}},"required":["key","title","snippet","anchor","url","markdownUrl","apiUrl","score","matchedBy"],"additionalProperties":false},"SearchResult":{"type":"object","properties":{"q":{"type":"string","description":"The normalised query"},"mode":{"type":"string","enum":["hybrid","fts"],"description":"hybrid when vector results were merged in"},"go":{"anyOf":[{"$ref":"#/components/schemas/PageSummary"},{"type":"null"}],"description":"Exact title match (the \"Go\" page), if any"},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"items":{"type":"array","items":{"$ref":"#/components/schemas/SearchHit"}},"next":{"anyOf":[{"type":"string","description":"Absolute URL"},{"type":"null"}]}},"required":["q","mode","go","total","items","next"],"additionalProperties":false},"CategoryDetail":{"type":"object","properties":{"key":{"type":"string","description":"Bare category key (no `Category:`)"},"title":{"type":"string"},"url":{"type":"string","description":"HTML page"},"markdownUrl":{"type":"string","description":"The page as Markdown (/wiki/<key>.md)"},"apiUrl":{"type":"string","description":"The page as JSON"},"llmsUrl":{"type":"string","description":"llms.txt-style list of the category"},"description":{"type":["string","null"]},"parents":{"type":"array","items":{"$ref":"#/components/schemas/KeyTitleLink"}},"subcategories":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Page key (MediaWiki DB key; categories without `Category:`)"},"title":{"type":"string"},"url":{"type":"string","description":"HTML page"},"markdownUrl":{"type":"string","description":"The page as Markdown (/wiki/<key>.md)"},"apiUrl":{"type":"string","description":"The page as JSON"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["key","title","url","markdownUrl","apiUrl","count"],"additionalProperties":false}},"pages":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/KeyTitleLink"}},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"next":{"anyOf":[{"type":"string","description":"Absolute URL"},{"type":"null"}]}},"required":["items","total","next"],"additionalProperties":false}},"required":["key","title","url","markdownUrl","apiUrl","llmsUrl","description","parents","subcategories","pages"],"additionalProperties":false},"ApiError":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"EventList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/EventItem"}},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"next":{"anyOf":[{"type":"string","description":"Absolute URL"},{"type":"null"}]}},"required":["items","total","next"],"additionalProperties":false},"ImageList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ApiImage"}},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"next":{"anyOf":[{"type":"string","description":"Absolute URL"},{"type":"null"}]}},"required":["items","total","next"],"additionalProperties":false}}}}