This article presents possible use cases and corresponding sample flows. These can be a helpful jumping off point as you plan your implementation.
A developer is building an AI coding assistant that answers questions about Wix APIs. When a user asks how to do something, the assistant searches the docs and uses the results as context to generate an accurate answer.
Your app must be authorized to call the Docs Search API.
Use this flow when you want to pass search results directly to an LLM without additional processing.
When the user asks a question, extract a search term from it. For example, from "how do I create a product in Wix Stores?" extract "create a product".
Call Search Documents Markdown with the search term and the relevant document_type. You can use GET (query params) or POST (JSON body):
GET:
POST:
Pass the returned content string directly as context to your LLM alongside the user's question.
If the LLM needs more detail about a specific method or article, use the "read more" URL from the hint appended to the truncated result to fetch the full content.
Note: Use lines_in_each_result to keep results concise and stay within your LLM's context window. The endpoint interleaves results in a method, method, article, article repeating pattern so the LLM always receives both reference and conceptual content, regardless of individual relevance scores.
Use this flow when you need programmatic control over which results to use — for example, to filter, re-rank, or display results in a UI.
Call Search Documents with the search term. You can use GET (query params) or POST (JSON body):
GET:
POST:
Iterate over the returned results array. Each entry includes:
title — display name of the doc entrycontent — truncated or full content depending on lines_in_each_resulturl — link to the full documentation pagerelevance_score — use this to filter out low-confidence results (e.g. below 0.5)kb_name — identifies the source knowledge base (e.g. SDK_METHODS_KB_ID)Filter results by relevance_score or kb_name as needed for your use case.
Pass the selected results as context to your LLM or display them in your UI.
Last updated: 23 August 2026