Generated from OpenAPI

API Reference

このページは momonga-search-api の FastAPI / Pydantic schema から生成した OpenAPI JSON を表示しています。

手書きのガイドは使い方を説明し、endpoint、request、response の詳細はコード由来の OpenAPI を正本にします。

API

GET/health

Health

stability: unspecifiedquota: unspecifiedunits: unspecified

Responses

StatusDescriptionSchema
200Successful ResponseHealthResponse
GET/health/ready

Ready

stability: unspecifiedquota: unspecifiedunits: unspecified

Responses

StatusDescriptionSchema
200Successful ResponseHealthResponse

Catalog

GET/v1/documents

List documents

公開対象の文書を discovery timeline の降順で一覧します。

stability: betaquota: catalogunits: 0

Parameters

NameInRequiredSchema
security_codesquerynostring[] | null
document_typesquerynostring[] | null
timeline_sincequerynostring:date | null
timeline_untilquerynostring:date | null
limitquerynointeger
cursorquerynostring | null

Responses

StatusDescriptionSchema
200Successful ResponseDocumentListResponse
422Validation ErrorHTTPValidationError
GET/v1/documents/{document_id}

Get document

文書のメタデータと取得可否を返します。

stability: betaquota: catalogunits: 0

Parameters

NameInRequiredSchema
document_idpathyesstring

Responses

StatusDescriptionSchema
200Successful ResponseDocumentSummary
422Validation ErrorHTTPValidationError
GET/v1/news

List news

一次情報への参照を持つ public news statement を一覧します。

stability: betaquota: catalogunits: 0

Parameters

NameInRequiredSchema
security_codesquerynostring[] | null
timeline_sincequerynostring:date | null
timeline_untilquerynostring:date | null
limitquerynointeger
cursorquerynostring | null

Responses

StatusDescriptionSchema
200Successful ResponseNewsListResponse
422Validation ErrorHTTPValidationError
GET/v1/news/{news_id}

Get news

news statement の詳細を返します。

stability: betaquota: catalogunits: 0

Parameters

NameInRequiredSchema
news_idpathyesstring

Responses

StatusDescriptionSchema
200Successful ResponseNewsSummary
422Validation ErrorHTTPValidationError
GET/v1/documents/{document_id}/toc

Get document TOC

文書の目次とセクション単位の token count を返します。

stability: betaquota: catalogunits: 0

Parameters

NameInRequiredSchema
document_idpathyesstring

Responses

StatusDescriptionSchema
200Successful ResponseDocumentTocResponse
422Validation ErrorHTTPValidationError
GET/v1/documents/{document_id}/page-images

List page images

文書内で JPEG 画像として取得できるページをページ番号昇順で返します。

stability: betaquota: catalogunits: 0

Parameters

NameInRequiredSchema
document_idpathyesstring

Responses

StatusDescriptionSchema
200Successful ResponseDocumentPageImagesResponse
422Validation ErrorHTTPValidationError

Delivery

GET/v1/documents/{document_id}/content

Get document content

文書本文、または指定セクションの本文を返します。

stability: betaquota: computeunits: token_count

Parameters

NameInRequiredSchema
document_idpathyesstring
sectionsquerynostring[] | null

Responses

StatusDescriptionSchema
200Successful ResponseDocumentContentResponse
422Validation ErrorHTTPValidationError
GET/v1/documents/{document_id}/pages/{page_number}/image

Get page image

指定ページの JPEG 画像を返します。取得可能なページは `GET /v1/documents/{document_id}/page-images` で確認してください。

stability: betaquota: computeunits: 1 per page

Parameters

NameInRequiredSchema
document_idpathyesstring
page_numberpathyesinteger

Responses

StatusDescriptionSchema
200JPEG page imagestring:binary
422Validation ErrorHTTPValidationError

Compute

POST/v1/search/documents

Search documents

文書本文を自然文クエリで検索します。

stability: betaquota: computeunits: 1

Request body

FieldRequiredSchemaDefault
queryyesstring-
security_codesnostring[]-
document_typesnostring[]-
timeline_sincenostring:date | null-
timeline_untilnostring:date | null-
match_typeno"semantic" | "lexical"semantic
top_knointeger10
include_snippetnobooleanfalse
document_familiesnostring[]-

Responses

StatusDescriptionSchema
200Successful ResponseDocumentSearchResponse
422Validation ErrorHTTPValidationError
POST/v1/search/news

Search news

news statement を自然文クエリで検索します。

stability: betaquota: computeunits: 1

Request body

FieldRequiredSchemaDefault
queryyesstring-
security_codesnostring[]-
timeline_sincenostring:date | null-
timeline_untilnostring:date | null-
top_knointeger10

Responses

StatusDescriptionSchema
200Successful ResponseNewsSearchResponse
422Validation ErrorHTTPValidationError