Search documentation
GET
/v1/docs/search
curl -X GET "https://us1.platform.bird.com/v1/docs/search" \
-H "Authorization: Bearer $TOKEN" \
--url-query "limit=10" \
--url-query "contents=snippet"Search the Bird documentation and return the most relevant sections for a query. Each result links to the matching section heading.
Parametri di query
q
string
The text to search for.
locale
string
Documentation locale to search, as a language-region code such as en-us. Defaults to en-us when omitted or unavailable.
limit
integer
Maximum number of results to return (1–25).
contents
string
How much of each matching section to return. snippet (default) returns a short preview; highlights returns the passages that match the query. For the full text, fetch a result's markdown_url.
Payload di risposta
query
string
obbligatorio
The search query that produced these results.
locale
string
obbligatorio
The documentation locale the results were drawn from.
results
array of object
obbligatorio
Matching documentation sections, ordered by descending relevance.
Mostra attributi secondari
results.title
string
obbligatorio
Title of the documentation page this result belongs to.
results.section
string
obbligatorio
Heading of the matching section within the page.
results.url
string
obbligatorio
Relative path to the matching section, including the heading anchor.
results.doc_url
string
obbligatorio
Relative path to the page, without the section anchor. Results from the same page share it, so it can be used to group them.
results.markdown_url
string
obbligatorio
Absolute URL that returns the page's full content as Markdown. Fetch it to read the whole page.
results.snippet
string
Short excerpt of the matching content, with the query terms in context. Always returned.
results.highlights
array of string
The passages of the section that match the query, longer than the snippet. Returned only when contents is highlights.
results.token_estimate
integer
obbligatorio
Approximate token count of the full page returned by markdown_url, to budget reading it. Results from the same page share it.
results.score
number
obbligatorio
Relevance score. Higher is more relevant; results are ordered by descending score.