Search Keyword

広域 note テキスト検索(OpenSearch)

get/api/v1/data/search/keyword

Request

  • Base URL: https://dev.api-birdxplorer.code4japan.org (the document declares no server; this is the origin it was published from)
  • URL: https://dev.api-birdxplorer.code4japan.org/api/v1/data/search/keyword
  • Auth: none declared

Query parameters

note_includes_textstring[] required

指定した文字列を含む Note を検索して取得する。検索は Note のSummaryに対して行われる。

note_excludes_textstring nullable

指定した文字列を含む Note を検索して取得する。検索は Note のSummaryに対して行われる。

languagestring nullable

取得するコミュニティノートの言語。

ISO 639-1 に準拠した 2 文字の言語コードを指定することで、その言語のコミュニティノートのみを取得できる。

integer
OR
string
integer
OR
string
sort_field'note_created_at' | 'impression_count' | 'like_count' | 'repost_count'

Fields available for sorting search results

ソート対象のフィールド。note_created_at のほか、impression_count / like_count / repost_count(エンゲージメント降順で注目度順に取得)が指定可能。

sort_order'asc' | 'desc'

Sort direction

ソート順。asc (昇順) または desc (降順)。デフォルトは desc。

offsetinteger

取得する Post のリストの先頭からのオフセット。ページネーションに利用される。

ただし、レスポンスの meta.next や meta.prev で次のページや前のページのリクエスト用 URL が提供されるため、 そちらを利用したほうが良い場合もある。

limitinteger

取得する Post のリストの最大数。 0 ~ 1000 まで指定できる。ページネーションに利用される。

ただし、 meta.next や meta.prev で次のページや前のページのリクエスト用 URL が提供されるため、 そちらを利用したほうが良い場合もある。

include_totalboolean

レスポンスに検索結果の総件数 (meta.total) を含めるかどうか。

false にすると COUNT クエリをスキップしてレスポンスが高速化される。 件数が不要な場合や /search/count で非同期取得する場合に利用する。

note_search_mode'or' | 'and'

note_includes_text で指定した複数キーワードの結合方法。

値意味
orいずれかのキーワードを含むノートを取得
andすべてのキーワードを含むノートのみを取得

Response

Successful Response

Changes

No recorded changes to this operation across all 1 revision of this API.