wiki

Search for Wikipedia context with natural language

Changed on

Search for wikipedia documents

get/v1/wiki/search

Request

Query parameters

querystring

Query string that can be any phrase, keyword, question, or paragraph.

neighbor_chunksinteger nullable

Number of neighbor chunks to attach and return. If 0, then no neighbor chunks will be returned.

n_documentsinteger nullable

Number of documents to return.

full_articlesboolean nullable

If true, then full articles will be returned. If false, then only chunks and their neighbors will be returned. Beware that asking for full articles returns more data, and therefore is more token intense downstream.

hybrid_searchboolean nullable

If true, then hybrid search will be used. If false, then only Sparse vector search will be used.

string_guaranteestring[] nullable

List of strings that must be present in the results. If empty, then no string guarantee will be applied.

diversifynumber nullable

Diversity factor for MMR re-ranking. 0.0 means no diversity (pure relevance), 1.0 means full diversity.

include_main_sectionboolean nullable

If true, then the main section of the article will be included at the start of each chunk's content. If false, then only the chunk content will be returned. Useful because the main section often contains important context.

has_wikidataboolean nullable

Filter results by whether the article has Wikidata. If true, only articles with Wikidata are returned. If false, articles without Wikidata are returned (including points where the field is absent). If not set, no filtering is applied.

Response

Wikipedia search results

Changes

    • breaking

      the response property //// became optional for the status

    • breaking

      the response property //// became optional for the status

    • breaking

      the response property //// became optional for the status

    • breaking

      the response property //// became optional for the status

    • breaking

      the response property //// became optional for the status

    • breaking

      response property documents/items/cirrus_metadata/anyOf[subschema #1: CirrusMetadata]/create_timestamp list-of-types was widened by adding types null to media type application/json of response 200

    • breaking

      response property documents/items/cirrus_metadata/anyOf[subschema #1: CirrusMetadata]/popularity_score list-of-types was widened by adding types null to media type application/json of response 200

    • breaking

      response property documents/items/cirrus_metadata/anyOf[subschema #1: CirrusMetadata]/text_bytes list-of-types was widened by adding types null to media type application/json of response 200

    • breaking

      response property documents/items/cirrus_metadata/anyOf[subschema #1: CirrusMetadata]/version list-of-types was widened by adding types null to media type application/json of response 200

    • breaking

      response property documents/items/cirrus_metadata/anyOf[subschema #1: CirrusMetadata]/wikibase_item list-of-types was widened by adding types null to media type application/json of response 200

    • info

      added the new optional query request parameter has_wikidata

    • info

      added the optional property //// to the response with the status

    • info

      added the optional property //// to the response with the status

    • info

      added the optional property //// to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status