Search

アドバンスドサーチでデータを取得するエンドポイント

get/api/v1/data/search

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
  • Auth: none declared

Query parameters

note_includes_textstring[] nullable

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

note_excludes_textstring nullable

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

post_includes_textstring[] nullable

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

post_excludes_textstring nullable

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

languagestring nullable

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

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

topic_idsinteger[] nullable

取得するコミュニティノートが紐づいているトピックの ID。

GET /api/v1/data/topics で取得できるトピックの ID を指定することで、そのトピックに紐づいたコミュニティノートを取得できる。

複数指定した場合は、 いずれかのトピックに紐づいたコミュニティノート を取得する。 (AND 検索ではなく OR 検索になる)

note_statusstring[] nullable

取得するコミュニティノートのステータス。

X 上の表示current_statusに指定する値
さらに評価が必要NEEDS_MORE_RATINGS
現在のところ「役に立った」と評価されていますCURRENTLY_RATED_HELPFUL
現在のところ「役に立たなかった」と評価されていますCURRENTLY_RATED_NOT_HELPFUL
integer
OR
string
integer
OR
string
x_user_namesstring[] nullable

Xのユーザー名

x_user_followers_count_frominteger nullable

Xのユーザーのフォロワー数。

x_user_follow_count_frominteger nullable

Xのユーザーのフォロー数。

post_like_count_frominteger nullable

Postのお気に入り数。

post_repost_count_frominteger nullable

Postのリポスト数。

post_impression_count_frominteger nullable

Postのインプレッション数。

post_includes_mediaboolean nullable

メディア情報を含んでいるか。

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すべてのキーワードを含むノートのみを取得
post_search_mode'or' | 'and'

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

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

Response

Successful Response

Changes

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