Generated from OpenAPI
API Reference
このページは momonga-search-api の FastAPI / Pydantic schema から生成した OpenAPI JSON を表示しています。
手書きのガイドは使い方を説明し、endpoint、request、response の詳細はコード由来の OpenAPI を正本にします。
API
/healthHealth
Responses
| Status | Description | Schema | Error codes |
|---|---|---|---|
200 | Successful Response | HealthResponse | - |
/health/readyReady
Responses
| Status | Description | Schema | Error codes |
|---|---|---|---|
200 | Successful Response | HealthResponse | - |
0-credit
/v1/issuers/searchSearch issuers
企業名または証券コードから issuer を検索します。
Parameters
| Name | In | Required | Schema |
|---|---|---|---|
q | query | yes | string |
limit | query | no | integer |
Responses
| Status | Description | Schema | Error codes |
|---|---|---|---|
200 | Successful Response | IssuerSearchResponse | - |
400 | The issuer search request is invalid. | ProblemDetails | missing_required_filter |
401 | Authentication failed. | ProblemDetails | authentication_requiredinvalid_api_key |
403 | The API key is valid but the account cannot access this API. | ProblemDetails | access_not_enabled |
422 | Validation Error | HTTPValidationError | - |
429 | Rate limit or usage limit exceeded. | ProblemDetails | quota_exceededrate_limit_exceeded |
500 | Internal server error. | ProblemDetails | internal_error |
/v1/documentsList documents
公開対象の文書を timeline_at の降順で一覧します。timeline_since / timeline_until も timeline_at 基準です。security_codes なしで市場全体を一覧する場合は timeline_since が必須です。next_cursor が null でなければ、同じフィルタに cursor を付けて次ページを取得します。
Parameters
| Name | In | Required | Schema |
|---|---|---|---|
security_codes | query | no | string[] | null |
document_types | query | no | string[] | null |
document_families | query | no | "edinet_filing" | "ir_material" | "timely_disclosure"[] | null |
timeline_since | query | no | string:date | null |
timeline_until | query | no | string:date | null |
limit | query | no | integer |
cursor | query | no | string | null |
Responses
| Status | Description | Schema | Error codes |
|---|---|---|---|
200 | Successful Response | DocumentListResponse | - |
400 | The document list request is invalid. | ProblemDetails | invalid_cursorinvalid_date_rangeinvalid_document_familyinvalid_query_parametermissing_required_filter |
401 | Authentication failed. | ProblemDetails | authentication_requiredinvalid_api_key |
403 | The API key is valid but the account cannot access this API. | ProblemDetails | access_not_enabled |
422 | Validation Error | HTTPValidationError | - |
429 | Rate limit or usage limit exceeded. | ProblemDetails | quota_exceededrate_limit_exceeded |
500 | Internal server error. | ProblemDetails | internal_error |
/v1/documents/{document_id}Get document
文書のメタデータと取得可否を返します。
Parameters
| Name | In | Required | Schema |
|---|---|---|---|
document_id | path | yes | string |
Responses
| Status | Description | Schema | Error codes |
|---|---|---|---|
200 | Successful Response | DocumentSummary | - |
401 | Authentication failed. | ProblemDetails | authentication_requiredinvalid_api_key |
403 | The API key is valid but the account cannot access this API. | ProblemDetails | access_not_enabled |
404 | The requested document was not found. | ProblemDetails | not_found |
422 | Validation Error | HTTPValidationError | - |
429 | Rate limit or usage limit exceeded. | ProblemDetails | quota_exceededrate_limit_exceeded |
500 | Internal server error. | ProblemDetails | internal_error |
/v1/documents/{document_id}/tocGet document TOC
本文取得に使えるセクションを toc[] として返します。toc[].section_id は GET /v1/documents/{document_id}/content?sections=... に渡せます。
Parameters
| Name | In | Required | Schema |
|---|---|---|---|
document_id | path | yes | string |
Responses
| Status | Description | Schema | Error codes |
|---|---|---|---|
200 | Successful Response | DocumentTocResponse | - |
401 | Authentication failed. | ProblemDetails | authentication_requiredinvalid_api_key |
403 | The API key is valid but the account cannot access this API. | ProblemDetails | access_not_enabled |
404 | The requested document was not found. | ProblemDetails | not_found |
409 | Document content is not available for delivery. | ProblemDetails | content_not_available |
422 | Validation Error | HTTPValidationError | - |
429 | Rate limit or usage limit exceeded. | ProblemDetails | quota_exceededrate_limit_exceeded |
500 | Internal server error. | ProblemDetails | internal_error |
/v1/documents/{document_id}/page-imagesList page images
文書内で JPEG 画像として取得できるページをページ番号昇順で返します。
Parameters
| Name | In | Required | Schema |
|---|---|---|---|
document_id | path | yes | string |
Responses
| Status | Description | Schema | Error codes |
|---|---|---|---|
200 | Successful Response | DocumentPageImagesResponse | - |
401 | Authentication failed. | ProblemDetails | authentication_requiredinvalid_api_key |
403 | The API key is valid but the account cannot access this API. | ProblemDetails | access_not_enabled |
404 | The requested document was not found. | ProblemDetails | not_found |
422 | Validation Error | HTTPValidationError | - |
429 | Rate limit or usage limit exceeded. | ProblemDetails | quota_exceededrate_limit_exceeded |
500 | Internal server error. | ProblemDetails | internal_error |
/v1/documents/{document_id}/originalsList original files
API から取得できる文書の元ファイルを列挙します。
Parameters
| Name | In | Required | Schema |
|---|---|---|---|
document_id | path | yes | string |
Responses
| Status | Description | Schema | Error codes |
|---|---|---|---|
200 | Successful Response | DocumentOriginalsResponse | - |
401 | Authentication failed. | ProblemDetails | authentication_requiredinvalid_api_key |
403 | The API key is valid but the account cannot access this API. | ProblemDetails | access_not_enabled |
404 | The requested document was not found. | ProblemDetails | not_found |
422 | Validation Error | HTTPValidationError | - |
429 | Rate limit or usage limit exceeded. | ProblemDetails | quota_exceededrate_limit_exceeded |
500 | Internal server error. | ProblemDetails | internal_error |
Credits
/v1/newsList news
一次情報への references[] を持つ news statement を一覧します。timeline_since / timeline_until は news observed_at 基準です。security_codes / macro_tags / timeline_since のいずれかが必須です。next_cursor が null でなければ、同じフィルタに cursor を付けて次ページを取得します。
Parameters
| Name | In | Required | Schema |
|---|---|---|---|
security_codes | query | no | string[] | null |
macro_tags | query | no | "Economic Indicators" | "Monetary Policy" | "Fiscal Policy" | "Regulatory Policy" | "Trade & Geopolitical Events" | "Financial Stability" | "External Shocks"[] | null |
timeline_since | query | no | string:date | null |
timeline_until | query | no | string:date | null |
limit | query | no | integer |
cursor | query | no | string | null |
Responses
| Status | Description | Schema | Error codes |
|---|---|---|---|
200 | Successful Response | NewsListResponse | - |
400 | The news list request is invalid. | ProblemDetails | invalid_cursorinvalid_date_rangeinvalid_macro_taginvalid_query_parametermissing_required_filter |
401 | Authentication failed. | ProblemDetails | authentication_requiredinvalid_api_key |
403 | The API key is valid but the account cannot access this API. | ProblemDetails | access_not_enabled |
422 | Validation Error | HTTPValidationError | - |
429 | Rate limit or usage limit exceeded. | ProblemDetails | quota_exceededrate_limit_exceeded |
500 | Internal server error. | ProblemDetails | internal_error |
/v1/documents/{document_id}/contentGet document content
文書本文を content という 1 つの文字列で返します。sections 指定時は sections_returned[] で返却セクションを確認でき、content_sections[] でセクション単位の本文も取得できます。
Parameters
| Name | In | Required | Schema |
|---|---|---|---|
document_id | path | yes | string |
sections | query | no | string[] | null |
Responses
| Status | Description | Schema | Error codes |
|---|---|---|---|
200 | Successful Response | DocumentContentResponse | - |
400 | The content request is invalid. | ProblemDetails | invalid_query_parameterinvalid_section |
401 | Authentication failed. | ProblemDetails | authentication_requiredinvalid_api_key |
403 | The API key is valid but the account cannot access this API. | ProblemDetails | access_not_enabled |
404 | The requested document was not found. | ProblemDetails | not_found |
409 | Document content is not available for delivery. | ProblemDetails | content_not_available |
422 | Validation Error | HTTPValidationError | - |
429 | Rate limit or usage limit exceeded. | ProblemDetails | quota_exceededrate_limit_exceeded |
500 | Internal server error. | ProblemDetails | internal_error |
/v1/documents/{document_id}/originals/{original_id}Get original file
元ファイル一覧に含まれるファイルを返します。
Parameters
| Name | In | Required | Schema |
|---|---|---|---|
document_id | path | yes | string |
original_id | path | yes | string |
Responses
| Status | Description | Schema | Error codes |
|---|---|---|---|
200 | Original document file | string:binary | - |
401 | Authentication failed. | ProblemDetails | authentication_requiredinvalid_api_key |
403 | The API key is valid but the account cannot access this API. | ProblemDetails | access_not_enabled |
404 | The requested document or original file was not found. | ProblemDetails | not_found |
409 | The requested original file cannot be delivered by the API. | ProblemDetails | content_not_available |
422 | Validation Error | HTTPValidationError | - |
429 | Rate limit or usage limit exceeded. | ProblemDetails | quota_exceededrate_limit_exceeded |
500 | Internal server error. | ProblemDetails | internal_error |
/v1/documents/{document_id}/pages/{page_number}/imageGet page image
指定ページの JPEG 画像を返します。取得可能なページは `GET /v1/documents/{document_id}/page-images` で確認してください。
Parameters
| Name | In | Required | Schema |
|---|---|---|---|
document_id | path | yes | string |
page_number | path | yes | integer |
Responses
| Status | Description | Schema | Error codes |
|---|---|---|---|
200 | JPEG page image | string:binary | - |
401 | Authentication failed. | ProblemDetails | authentication_requiredinvalid_api_key |
403 | The API key is valid but the account cannot access this API. | ProblemDetails | access_not_enabled |
404 | The requested document or page was not found. | ProblemDetails | not_found |
409 | The requested page image is not available for delivery. | ProblemDetails | image_not_available |
422 | Validation Error | HTTPValidationError | - |
429 | Rate limit or usage limit exceeded. | ProblemDetails | quota_exceededrate_limit_exceeded |
500 | Internal server error. | ProblemDetails | internal_error |
/v1/search/documentsSearch documents
文書本文を検索します。semantic 検索では、根拠候補を探す疑問文を使います。document_families は edinet_filing / timely_disclosure のみ指定できます。
Request body
| Field | Required | Schema | Default |
|---|---|---|---|
query | yes | string | - |
security_codes | no | string[] | - |
document_types | no | string[] | - |
timeline_since | no | string:date | null | - |
timeline_until | no | string:date | null | - |
match_type | no | "semantic" | "lexical" | semantic |
top_k | no | integer | 10 |
include_snippet | no | boolean | false |
document_families | no | "edinet_filing" | "timely_disclosure"[] | - |
Responses
| Status | Description | Schema | Error codes |
|---|---|---|---|
200 | Successful Response | DocumentSearchResponse | - |
400 | The document search request is invalid. | ProblemDetails | invalid_date_rangeinvalid_document_familyinvalid_query_parameter |
401 | Authentication failed. | ProblemDetails | authentication_requiredinvalid_api_key |
403 | The API key is valid but the account cannot access this API. | ProblemDetails | access_not_enabled |
422 | Validation Error | HTTPValidationError | - |
429 | Rate limit or usage limit exceeded. | ProblemDetails | quota_exceededrate_limit_exceeded |
500 | Internal server error. | ProblemDetails | internal_error |
504 | Search backend did not respond before the request deadline. | ProblemDetails | search_backend_timeout |
/v1/search/newsSearch news
news statement を検索します。semantic 検索では、探したい news / event を疑問文で指定します。match_type で semantic / lexical を選べます。macro_tags は public v1 のマクロ事象カテゴリのみ受け付けます。
Request body
| Field | Required | Schema | Default |
|---|---|---|---|
query | yes | string | - |
security_codes | no | string[] | - |
macro_tags | no | "Economic Indicators" | "Monetary Policy" | "Fiscal Policy" | "Regulatory Policy" | "Trade & Geopolitical Events" | "Financial Stability" | "External Shocks"[] | - |
timeline_since | no | string:date | null | - |
timeline_until | no | string:date | null | - |
match_type | no | "semantic" | "lexical" | semantic |
top_k | no | integer | 10 |
Responses
| Status | Description | Schema | Error codes |
|---|---|---|---|
200 | Successful Response | NewsSearchResponse | - |
400 | The news search request is invalid. | ProblemDetails | invalid_date_rangeinvalid_macro_taginvalid_query_parameter |
401 | Authentication failed. | ProblemDetails | authentication_requiredinvalid_api_key |
403 | The API key is valid but the account cannot access this API. | ProblemDetails | access_not_enabled |
422 | Validation Error | HTTPValidationError | - |
429 | Rate limit or usage limit exceeded. | ProblemDetails | quota_exceededrate_limit_exceeded |
500 | Internal server error. | ProblemDetails | internal_error |
504 | Search backend did not respond before the request deadline. | ProblemDetails | search_backend_timeout |