{"components":{"schemas":{"DocumentStatus":{"enum":["available","text_unavailable","not_stored","page_has_no_text","page_provenance_unavailable","unsafe_storage_path","file_too_large","pdf_unreadable_or_limit_exceeded","file_unreadable"],"type":"string"},"ask_scoutInput":{"additionalProperties":false,"properties":{"date_from":{"format":"date","type":"string"},"date_to":{"format":"date","type":"string"},"municipality":{"maxLength":200,"type":"string"},"question":{"maxLength":8000,"minLength":1,"type":"string"}},"required":["question"],"type":"object"},"ask_scoutOutput":{"additionalProperties":false,"properties":{"answer":{"type":"string"},"sources":{"items":{"additionalProperties":false,"properties":{"article_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"date":{"type":"string"},"district":{"type":"string"},"municipality":{"type":"string"},"municipality_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"municipality_name":{"type":"string"},"ref":{"maximum":2147483647,"minimum":1,"type":"integer"},"scout_url":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"}},"required":["municipality_id","article_id","title","municipality","municipality_name","district","date","url","scout_url","ref"],"type":"object"},"type":"array"}},"required":["answer","sources"],"type":"object"},"find_documentsInput":{"additionalProperties":false,"properties":{"date_from":{"format":"date","type":"string"},"date_to":{"format":"date","type":"string"},"fields":{"default":["title","municipality","date","summary","url","scout_url","article_id"],"items":{"enum":["title","municipality","municipality_id","district","date","summary","url","scout_url","attachments","article_id","score"],"type":"string"},"type":"array"},"limit":{"default":10,"maximum":25,"minimum":1,"type":"integer"},"municipality":{"maxLength":200,"type":"string"},"offset":{"default":0,"maximum":100000,"minimum":0,"type":"integer"},"only_with_pdf":{"type":"boolean"},"query":{"maxLength":8000,"minLength":1,"type":"string"}},"required":["query"],"type":"object"},"find_documentsOutput":{"additionalProperties":false,"properties":{"fields":{"items":{"enum":["title","municipality","municipality_id","district","date","summary","url","scout_url","attachments","article_id","score"]},"type":"array"},"has_more":{"type":"boolean"},"hint":{"type":"string"},"offset":{"minimum":0,"type":"integer"},"query":{"type":"string"},"result_window":{"additionalProperties":false,"properties":{"corpus_exhaustive":{"const":false},"keyword_limit":{"const":100},"scope":{"const":"ranked_candidates"},"semantic_limit":{"const":50}},"required":["semantic_limit","keyword_limit","corpus_exhaustive","scope"],"type":"object"},"results":{"items":{"additionalProperties":false,"properties":{"article_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"attachments":{"additionalProperties":false,"properties":{"document_count":{"minimum":0,"type":"integer"},"has_more":{"type":"boolean"},"next_documents_offset":{"minimum":0,"type":["integer","null"]},"pdfs":{"items":{"additionalProperties":false,"properties":{"availability":{"enum":["stored_reference","text_reference","not_stored"]},"document_id":{"pattern":"^[0-9a-f]{64}$","type":"string"},"filename":{"type":"string"},"page_count":{"minimum":0,"type":"integer"},"title":{"type":"string"},"url":{"type":"string"}},"required":["document_id","url","title","filename","page_count","availability"],"type":"object"},"maxItems":100,"type":"array"}},"required":["document_count","pdfs","has_more","next_documents_offset"],"type":"object"},"date":{"type":"string"},"district":{"type":"string"},"municipality":{"type":"string"},"municipality_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"score":{"type":"number"},"scout_url":{"type":"string"},"summary":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"}},"required":[],"type":"object"},"maxItems":25,"type":"array"},"total":{"minimum":0,"type":"integer"}},"required":["query","total","offset","has_more","fields","results","hint","result_window"],"type":"object"},"get_documentInput":{"additionalProperties":false,"properties":{"article_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"document_id":{"pattern":"^[0-9a-f]{64}$","type":"string"},"documents_offset":{"default":0,"maximum":100000,"minimum":0,"type":"integer"},"max_chars":{"default":20000,"maximum":20000,"minimum":1,"type":"integer"},"municipality_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"page":{"default":1,"maximum":100000,"minimum":1,"type":"integer"},"text_offset":{"default":0,"maximum":10000000,"minimum":0,"type":"integer"}},"required":["municipality_id","article_id"],"type":"object"},"get_documentOutput":{"additionalProperties":false,"properties":{"article_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"content_kind":{"enum":["article_original","pdf_extracted","legacy_extracted"]},"date":{"type":"string"},"district":{"type":"string"},"document_id":{"type":"string"},"documents":{"items":{"additionalProperties":false,"properties":{"availability":{"enum":["stored_reference","text_reference","not_stored"]},"document_id":{"pattern":"^[0-9a-f]{64}$","type":"string"},"filename":{"type":"string"},"page_count":{"minimum":0,"type":"integer"},"title":{"type":"string"},"url":{"type":"string"}},"required":["document_id","url","title","filename","page_count","availability"],"type":"object"},"maxItems":100,"type":"array"},"municipality":{"type":"string"},"municipality_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"municipality_name":{"type":"string"},"next":{"anyOf":[{"type":"null"},{"additionalProperties":false,"properties":{"page":{"maximum":2147483647,"minimum":1,"type":"integer"},"text_offset":{"minimum":0,"type":"integer"}},"required":["page","text_offset"],"type":"object"}]},"next_documents_offset":{"minimum":0,"type":["integer","null"]},"page":{"minimum":1,"type":["integer","null"]},"page_count":{"minimum":1,"type":["integer","null"]},"scout_url":{"type":"string"},"source_url":{"type":"string"},"status":{"enum":["available","text_unavailable","not_stored","page_has_no_text","page_provenance_unavailable","unsafe_storage_path","file_too_large","pdf_unreadable_or_limit_exceeded","file_unreadable"]},"text":{"type":"string"},"title":{"type":"string"},"truncated":{"type":"boolean"},"url":{"type":"string"}},"required":["municipality_id","article_id","title","municipality","municipality_name","district","date","url","scout_url","document_id","source_url","content_kind","status","text","page","page_count","next","truncated","documents","next_documents_offset"],"type":"object"},"list_municipalitiesInput":{"additionalProperties":false,"properties":{"limit":{"default":1000,"maximum":1000,"minimum":1,"type":"integer"},"name_filter":{"maxLength":200,"type":"string"},"offset":{"default":0,"maximum":100000,"minimum":0,"type":"integer"}},"required":[],"type":"object"},"list_municipalitiesOutput":{"additionalProperties":false,"properties":{"has_more":{"type":"boolean"},"municipalities":{"items":{"additionalProperties":false,"properties":{"district":{"type":"string"},"municipality_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"name":{"type":"string"},"region":{"type":"string"}},"required":["municipality_id","name","district","region"],"type":"object"},"maxItems":1000,"type":"array"},"name_filter":{"type":"string"},"next_offset":{"minimum":0,"type":["integer","null"]},"offset":{"minimum":0,"type":"integer"},"total":{"minimum":0,"type":"integer"}},"required":["total","name_filter","offset","has_more","next_offset","municipalities"],"type":"object"}},"securitySchemes":{"ServiceKey":{"description":"Vom Betreiber separat ausgegebener Dienstschl\u00fcssel","scheme":"bearer","type":"http"}}},"info":{"description":"Separate Dienstschl\u00fcssel; Browsercookies gew\u00e4hren keinen API-Zugang. Ranking-Fenster 50/100, total nur aktuelle Seite. Keine Vollst\u00e4ndigkeitsgarantie. 30 Anfragen/Minute und 2 gleichzeitig je Schl\u00fcssel/Worker, 4 insgesamt/Worker; keine globale Quote. Originale max. 20000 Zeichen, 100 Anh\u00e4nge; PDF max. 25 MiB, 10 Sekunden, 2 gleichzeitig/Worker. next und next_documents_offset unabh\u00e4ngig. Legacy ohne Seitenbeleg.","title":"Scout Recherche und Originaldokumente","version":"1.0.0"},"openapi":"3.1.0","paths":{"/v1/documents/read":{"post":{"operationId":"get_document_documents_read","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"article_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"document_id":{"pattern":"^[0-9a-f]{64}$","type":"string"},"documents_offset":{"default":0,"maximum":100000,"minimum":0,"type":"integer"},"max_chars":{"default":20000,"maximum":20000,"minimum":1,"type":"integer"},"municipality_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"page":{"default":1,"maximum":100000,"minimum":1,"type":"integer"},"text_offset":{"default":0,"maximum":10000000,"minimum":0,"type":"integer"}},"required":["municipality_id","article_id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"article_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"content_kind":{"enum":["article_original","pdf_extracted","legacy_extracted"]},"date":{"type":"string"},"district":{"type":"string"},"document_id":{"type":"string"},"documents":{"items":{"additionalProperties":false,"properties":{"availability":{"enum":["stored_reference","text_reference","not_stored"]},"document_id":{"pattern":"^[0-9a-f]{64}$","type":"string"},"filename":{"type":"string"},"page_count":{"minimum":0,"type":"integer"},"title":{"type":"string"},"url":{"type":"string"}},"required":["document_id","url","title","filename","page_count","availability"],"type":"object"},"maxItems":100,"type":"array"},"municipality":{"type":"string"},"municipality_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"municipality_name":{"type":"string"},"next":{"anyOf":[{"type":"null"},{"additionalProperties":false,"properties":{"page":{"maximum":2147483647,"minimum":1,"type":"integer"},"text_offset":{"minimum":0,"type":"integer"}},"required":["page","text_offset"],"type":"object"}]},"next_documents_offset":{"minimum":0,"type":["integer","null"]},"page":{"minimum":1,"type":["integer","null"]},"page_count":{"minimum":1,"type":["integer","null"]},"scout_url":{"type":"string"},"source_url":{"type":"string"},"status":{"enum":["available","text_unavailable","not_stored","page_has_no_text","page_provenance_unavailable","unsafe_storage_path","file_too_large","pdf_unreadable_or_limit_exceeded","file_unreadable"]},"text":{"type":"string"},"title":{"type":"string"},"truncated":{"type":"boolean"},"url":{"type":"string"}},"required":["municipality_id","article_id","title","municipality","municipality_name","district","date","url","scout_url","document_id","source_url","content_kind","status","text","page","page_count","next","truncated","documents","next_documents_offset"],"type":"object"}}},"description":"Ergebnis; Inhaltsstatus sind keine Toolfehler."},"400":{"description":"Parameter ung\u00fcltig"},"401":{"description":"Dienstschl\u00fcssel fehlt/ung\u00fcltig"},"403":{"description":"Dienst gesperrt oder Freigabe ge\u00e4ndert"},"404":{"description":"Nicht gefunden oder nicht zug\u00e4nglich"},"429":{"description":"Worker-Limit: Retry-After 60"},"503":{"description":"Technischer Fehler"}},"security":[{"ServiceKey":[]}],"summary":"get_document"}},"/v1/municipalities":{"post":{"operationId":"list_municipalities_municipalities","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"limit":{"default":1000,"maximum":1000,"minimum":1,"type":"integer"},"name_filter":{"maxLength":200,"type":"string"},"offset":{"default":0,"maximum":100000,"minimum":0,"type":"integer"}},"required":[],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"has_more":{"type":"boolean"},"municipalities":{"items":{"additionalProperties":false,"properties":{"district":{"type":"string"},"municipality_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"name":{"type":"string"},"region":{"type":"string"}},"required":["municipality_id","name","district","region"],"type":"object"},"maxItems":1000,"type":"array"},"name_filter":{"type":"string"},"next_offset":{"minimum":0,"type":["integer","null"]},"offset":{"minimum":0,"type":"integer"},"total":{"minimum":0,"type":"integer"}},"required":["total","name_filter","offset","has_more","next_offset","municipalities"],"type":"object"}}},"description":"Ergebnis; Inhaltsstatus sind keine Toolfehler."},"400":{"description":"Parameter ung\u00fcltig"},"401":{"description":"Dienstschl\u00fcssel fehlt/ung\u00fcltig"},"403":{"description":"Dienst gesperrt oder Freigabe ge\u00e4ndert"},"404":{"description":"Nicht gefunden oder nicht zug\u00e4nglich"},"429":{"description":"Worker-Limit: Retry-After 60"},"503":{"description":"Technischer Fehler"}},"security":[{"ServiceKey":[]}],"summary":"list_municipalities"}},"/v1/rag/ask":{"post":{"operationId":"ask_scout_rag_ask","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"date_from":{"format":"date","type":"string"},"date_to":{"format":"date","type":"string"},"municipality":{"maxLength":200,"type":"string"},"question":{"maxLength":8000,"minLength":1,"type":"string"}},"required":["question"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"answer":{"type":"string"},"sources":{"items":{"additionalProperties":false,"properties":{"article_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"date":{"type":"string"},"district":{"type":"string"},"municipality":{"type":"string"},"municipality_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"municipality_name":{"type":"string"},"ref":{"maximum":2147483647,"minimum":1,"type":"integer"},"scout_url":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"}},"required":["municipality_id","article_id","title","municipality","municipality_name","district","date","url","scout_url","ref"],"type":"object"},"type":"array"}},"required":["answer","sources"],"type":"object"}}},"description":"Ergebnis; Inhaltsstatus sind keine Toolfehler."},"400":{"description":"Parameter ung\u00fcltig"},"401":{"description":"Dienstschl\u00fcssel fehlt/ung\u00fcltig"},"403":{"description":"Dienst gesperrt oder Freigabe ge\u00e4ndert"},"404":{"description":"Nicht gefunden oder nicht zug\u00e4nglich"},"429":{"description":"Worker-Limit: Retry-After 60"},"503":{"description":"Technischer Fehler"}},"security":[{"ServiceKey":[]}],"summary":"ask_scout"}},"/v1/rag/search":{"post":{"operationId":"find_documents_rag_search","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"date_from":{"format":"date","type":"string"},"date_to":{"format":"date","type":"string"},"fields":{"default":["title","municipality","date","summary","url","scout_url","article_id"],"items":{"enum":["title","municipality","municipality_id","district","date","summary","url","scout_url","attachments","article_id","score"],"type":"string"},"type":"array"},"limit":{"default":10,"maximum":25,"minimum":1,"type":"integer"},"municipality":{"maxLength":200,"type":"string"},"offset":{"default":0,"maximum":100000,"minimum":0,"type":"integer"},"only_with_pdf":{"type":"boolean"},"query":{"maxLength":8000,"minLength":1,"type":"string"}},"required":["query"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"fields":{"items":{"enum":["title","municipality","municipality_id","district","date","summary","url","scout_url","attachments","article_id","score"]},"type":"array"},"has_more":{"type":"boolean"},"hint":{"type":"string"},"offset":{"minimum":0,"type":"integer"},"query":{"type":"string"},"result_window":{"additionalProperties":false,"properties":{"corpus_exhaustive":{"const":false},"keyword_limit":{"const":100},"scope":{"const":"ranked_candidates"},"semantic_limit":{"const":50}},"required":["semantic_limit","keyword_limit","corpus_exhaustive","scope"],"type":"object"},"results":{"items":{"additionalProperties":false,"properties":{"article_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"attachments":{"additionalProperties":false,"properties":{"document_count":{"minimum":0,"type":"integer"},"has_more":{"type":"boolean"},"next_documents_offset":{"minimum":0,"type":["integer","null"]},"pdfs":{"items":{"additionalProperties":false,"properties":{"availability":{"enum":["stored_reference","text_reference","not_stored"]},"document_id":{"pattern":"^[0-9a-f]{64}$","type":"string"},"filename":{"type":"string"},"page_count":{"minimum":0,"type":"integer"},"title":{"type":"string"},"url":{"type":"string"}},"required":["document_id","url","title","filename","page_count","availability"],"type":"object"},"maxItems":100,"type":"array"}},"required":["document_count","pdfs","has_more","next_documents_offset"],"type":"object"},"date":{"type":"string"},"district":{"type":"string"},"municipality":{"type":"string"},"municipality_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"score":{"type":"number"},"scout_url":{"type":"string"},"summary":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"}},"required":[],"type":"object"},"maxItems":25,"type":"array"},"total":{"minimum":0,"type":"integer"}},"required":["query","total","offset","has_more","fields","results","hint","result_window"],"type":"object"}}},"description":"Ergebnis; Inhaltsstatus sind keine Toolfehler."},"400":{"description":"Parameter ung\u00fcltig"},"401":{"description":"Dienstschl\u00fcssel fehlt/ung\u00fcltig"},"403":{"description":"Dienst gesperrt oder Freigabe ge\u00e4ndert"},"404":{"description":"Nicht gefunden oder nicht zug\u00e4nglich"},"429":{"description":"Worker-Limit: Retry-After 60"},"503":{"description":"Technischer Fehler"}},"security":[{"ServiceKey":[]}],"summary":"find_documents"}},"/v1/search":{"post":{"operationId":"find_documents_search","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"date_from":{"format":"date","type":"string"},"date_to":{"format":"date","type":"string"},"fields":{"default":["title","municipality","date","summary","url","scout_url","article_id"],"items":{"enum":["title","municipality","municipality_id","district","date","summary","url","scout_url","attachments","article_id","score"],"type":"string"},"type":"array"},"limit":{"default":10,"maximum":25,"minimum":1,"type":"integer"},"municipality":{"maxLength":200,"type":"string"},"offset":{"default":0,"maximum":100000,"minimum":0,"type":"integer"},"only_with_pdf":{"type":"boolean"},"query":{"maxLength":8000,"minLength":1,"type":"string"}},"required":["query"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"fields":{"items":{"enum":["title","municipality","municipality_id","district","date","summary","url","scout_url","attachments","article_id","score"]},"type":"array"},"has_more":{"type":"boolean"},"hint":{"type":"string"},"offset":{"minimum":0,"type":"integer"},"query":{"type":"string"},"result_window":{"additionalProperties":false,"properties":{"corpus_exhaustive":{"const":false},"keyword_limit":{"const":100},"scope":{"const":"ranked_candidates"},"semantic_limit":{"const":50}},"required":["semantic_limit","keyword_limit","corpus_exhaustive","scope"],"type":"object"},"results":{"items":{"additionalProperties":false,"properties":{"article_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"attachments":{"additionalProperties":false,"properties":{"document_count":{"minimum":0,"type":"integer"},"has_more":{"type":"boolean"},"next_documents_offset":{"minimum":0,"type":["integer","null"]},"pdfs":{"items":{"additionalProperties":false,"properties":{"availability":{"enum":["stored_reference","text_reference","not_stored"]},"document_id":{"pattern":"^[0-9a-f]{64}$","type":"string"},"filename":{"type":"string"},"page_count":{"minimum":0,"type":"integer"},"title":{"type":"string"},"url":{"type":"string"}},"required":["document_id","url","title","filename","page_count","availability"],"type":"object"},"maxItems":100,"type":"array"}},"required":["document_count","pdfs","has_more","next_documents_offset"],"type":"object"},"date":{"type":"string"},"district":{"type":"string"},"municipality":{"type":"string"},"municipality_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"score":{"type":"number"},"scout_url":{"type":"string"},"summary":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"}},"required":[],"type":"object"},"maxItems":25,"type":"array"},"total":{"minimum":0,"type":"integer"}},"required":["query","total","offset","has_more","fields","results","hint","result_window"],"type":"object"}}},"description":"Ergebnis; Inhaltsstatus sind keine Toolfehler."},"400":{"description":"Parameter ung\u00fcltig"},"401":{"description":"Dienstschl\u00fcssel fehlt/ung\u00fcltig"},"403":{"description":"Dienst gesperrt oder Freigabe ge\u00e4ndert"},"404":{"description":"Nicht gefunden oder nicht zug\u00e4nglich"},"429":{"description":"Worker-Limit: Retry-After 60"},"503":{"description":"Technischer Fehler"}},"security":[{"ServiceKey":[]}],"summary":"find_documents"}}},"x-scout-default-fields":["title","municipality","date","summary","url","scout_url","article_id"]}
