{"openapi":"3.1.0","info":{"title":"Quote and Citation Checker API","version":"0.1.0","description":"Pay-per-call exact quotations and word-for-word quote checking from hosted public-domain texts, with citations and file hashes (USDC, x402). No AI model. Verbatim excerpts from public-domain texts for research and citation; not legal advice. Check the original before quoting in print.","x-guidance":"Use POST /v1/quote, POST /v1/verify with JSON bodies. Unpaid calls receive HTTP 402 with x402 payment terms. See /llms.txt.","termsOfService":"https://ordstirr.com/agents/terms","contact":{"url":"https://ordstirr.com"}},"servers":[{"url":"https://quotes.ordstirr.com"}],"paths":{"/health":{"get":{"operationId":"health","summary":"Free health check","security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/v1/quote":{"post":{"operationId":"quotePublicDomainPassage","summary":"Exact quotation from a hosted public-domain text, with citation, source-file hash and excerpt hash","description":"Ask by locator (work + section + paragraph) or by words (query). Returns the passage text exactly as held, a citation (work, edition, chapter, paragraph, printed pages, source URL, licence) and SHA-256 hashes of the source file and of the excerpt. Works: Babcock's Rules for Mah-Jongg (1923, chapters II, IV, V, VI), Linnaeus's Tablut (English 1811, Latin 1889 OCR). A query that matches nothing is rejected with HTTP 400 and never charged. Unpaid calls receive HTTP 402 with x402 payment terms. Invalid input is rejected with HTTP 400 and never charged.","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.02"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"work":{"type":"string","enum":["babcock-1923","linnaeus-tablut-1811","linnaeus-tablut-latin-1889"],"description":"Work id (GET /v1/works). Optional for a query (searches all works); required with paragraph."},"section":{"type":["string","integer"],"description":"Chapter/section id, e.g. \"4\" or \"IV\". Needed with paragraph for Babcock; optional filter for a query."},"paragraph":{"type":"integer","minimum":1,"description":"1-based paragraph number within the section (use instead of query)."},"query":{"type":"string","minLength":3,"maxLength":300,"description":"Words to find (use instead of paragraph)."},"max_chars":{"type":"integer","minimum":50,"maximum":1200,"default":600,"description":"Longest excerpt to return; cut at a sentence end where possible."}},"additionalProperties":false},"example":{"work":"babcock-1923","query":"stealing the fourth to win"}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object"},"example":{"found":true,"mode":"search","match_score":1,"citation":{"passage_id":"babcock-1923:2:73","work_id":"babcock-1923","title":"Babcock's Rules for Mah-Jongg: The Red Book of Rules (second edition, revised and enlarged)","author":"Joseph Park Babcock","publisher":"Mah-Jongg Sales Company of America, San Francisco","year":1923,"edition":"1923 second edition","language":"en","ocr":false,"section":{"id":"2","label":"Chapter II: Rules of Play","printed_pages":"7-30"},"paragraph":73,"paragraphs_in_section":138,"source_file":"babcock-1923-chapter-2.txt","source_sha256":"e779ed4e3f6f2b815a4c29b1bfef68e46367a873c265f0b7c2e90545fbf415a6","source_url":"https://en.wikisource.org/wiki/Babcock%27s_Rules_for_Mah-Jongg","license":"Public domain in the United States (published 1923; term ended 31 Dec 2018)."},"excerpt":{"text":"Stealing the Fourth to Win: Where a player who, having three of a kind Punged on the Table, declares the fourth one and exposes it on the table with the other three and this fourth one completes the hand of another player, the other player may Pung this tile for MAH-JONGG. This is called Stealing the Fourth to Win and entitles the winning player to a special bonus score of ten points. (See Score Sheet, Page 35.)","char_start":0,"char_end":415,"truncated":false,"sha256":"e8279208834f637374e130f6cf73401d70f9210cb926decdec2afc863a43958f"},"alternates":[{"passage_id":"babcock-1923:2:74","score":1,"preview":"For example, West has three two's of characters, already Punged and exposed on the table, "},{"passage_id":"babcock-1923:2:76","score":1,"preview":"Where a player fails to declare the fourth for a set of fours, either overlooking it or de"},{"passage_id":"babcock-1923:2:77","score":1,"preview":"Where a discarded tile is Punged by a player for four of a kind, and this discarded tile c"}],"disclaimer":"Excerpts are verbatim from public-domain source files held by Ordstirr (file hash shown); runs of whitespace are collapsed to one space. Wikisource transcriptions can differ from the printed page and the Latin text is OCR with misreadings. Check the original before quoting in print. Not legal advice.","terms_url":"https://ordstirr.com/agents/terms","notice":"Draft - check each quote against the source before publishing or citing."}}}},"400":{"description":"Invalid input (never charged)"},"402":{"description":"Payment required (x402). See the PAYMENT-REQUIRED header."},"413":{"description":"Request body too large (never charged)"}}}},"/v1/verify":{"post":{"operationId":"verifyQuotation","summary":"Check whether a quotation really appears word for word in the hosted public-domain texts","description":"Send a quotation (8 to 2,000 characters). Case, curly quotes, dashes and line breaks are ignored when comparing. Use ... or an ellipsis character to skip words (the pieces must appear in order in one paragraph). Returns verbatim true/false; when true, the exact original wording and where it is. When false, the closest paragraph so the quote can be corrected. Always answers 200 for well-formed input. Unpaid calls receive HTTP 402 with x402 payment terms. Invalid input is rejected with HTTP 400 and never charged.","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.02"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"quote":{"type":"string","minLength":8,"maxLength":2000,"description":"The quotation to check."},"work":{"type":"string","enum":["babcock-1923","linnaeus-tablut-1811","linnaeus-tablut-latin-1889"],"description":"Optional: only check this work."},"section":{"type":["string","integer"],"description":"Optional: only check this chapter/section (needs work)."}},"required":["quote"],"additionalProperties":false},"example":{"quote":"Stealing the Fourth to Win: This is fully explained on Page 22","work":"babcock-1923"}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object"},"example":{"verbatim":true,"mode":"exact","matched_text":"Stealing the Fourth to Win: This is fully explained on Page 22","char_start":0,"char_end":62,"matched_sha256":"e31b0558f4a79804449824815beedab6b4a0a40bf16e2889f990b71cdea14ef3","citation":{"passage_id":"babcock-1923:5:24","work_id":"babcock-1923","title":"Babcock's Rules for Mah-Jongg: The Red Book of Rules (second edition, revised and enlarged)","author":"Joseph Park Babcock","publisher":"Mah-Jongg Sales Company of America, San Francisco","year":1923,"edition":"1923 second edition","language":"en","ocr":false,"section":{"id":"5","label":"Chapter V: Aids in Scoring for Mah-Jongg","printed_pages":"38-40"},"paragraph":24,"paragraphs_in_section":25,"source_file":"babcock-1923-chapter-5.txt","source_sha256":"fa3a6c1c184deeb213c55cf1dec97453ceeb36cab2a2b8d1169224f92ae0289c","source_url":"https://en.wikisource.org/wiki/Babcock%27s_Rules_for_Mah-Jongg","license":"Public domain in the United States (published 1923; term ended 31 Dec 2018)."},"closest":null,"note":"Compared without regard to case, curly quotes, dashes or line breaks. matched_text is the exact wording held in the source.","disclaimer":"Excerpts are verbatim from public-domain source files held by Ordstirr (file hash shown); runs of whitespace are collapsed to one space. Wikisource transcriptions can differ from the printed page and the Latin text is OCR with misreadings. Check the original before quoting in print. Not legal advice.","terms_url":"https://ordstirr.com/agents/terms","notice":"Draft - check each quote against the source before publishing or citing."}}}},"400":{"description":"Invalid input (never charged)"},"402":{"description":"Payment required (x402). See the PAYMENT-REQUIRED header."},"413":{"description":"Request body too large (never charged)"}}}}}}