wiki

Search for Wikipedia context with natural language

Search on Wikipedia content with natural language. Find exactly relevant chunks, with contextual neighbor chunks, and the full articles they came from.

get/v1/wiki/search

Query parameters

querystring

Natural language query that can be any phrase, keyword, question, or paragraph.

Natural language query 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.

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. If 0, then no documents will be returned.

Number of documents to return. If 0, then no documents will be returned.

full_articlesboolean nullable

If true, then full articles will be returned. If false, then only chunks and their neighbors will be returned. Beware that returning full articles increases data size which increases token usage downstream.

If true, then full articles will be returned. If false, then only chunks and their neighbors will be returned. Beware that returning full articles increases data size which increases token usage downstream.

hybrid_searchboolean nullable

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

If true, then hybrid search will be used. If false, then only 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.

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.

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.

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.

Response

A string or a list of dictionaries

Changes

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