Search
API functions for the Search resource.
For AI agents: https://bytekit.com/llms.txt — every docs page is available as markdown by appending .md
Search
Functions for interacting with the search API resource. Each operation ships in four forms — sync / sync_detailed and their async counterparts.
Create Search
Search the web
Runs a web search for query and returns ranked organic results with
contiguous position values from 1.
Use limit (1–100, default 10) to request more results in a single
call. Results are fetched in pages of 10, so a call consumes
ceil(limit / 10) credits (capped at 10) from the account's monthly
credits bucket — for example limit=10 costs 1 credit and limit=35
costs 4. Credits are charged for every page fetched regardless of how
many results a page returns. The credit count is reported as
credits_used in the response.
Parameters
body (CreateSearchBody)query—str— The search query, up to 2048 characters.type_—CreateSearchBodyType | Unset— Which search index to query.web(default) returns ranked organic results;newsreturns news articles in the sameresultsarray, additionally populatingsourceandimageon each item;imagesreturns image results, populatingsource,domain, and a fullerimageobject (full- image dimensions plus a thumbnail URL and dimensions) while omittingsnippetanddate. Billing is identical for all three.limit—int | Unset— Maximum number of organic results to return. Results are fetched in pages of 10, so the call costsceil(limit / 10)credits (capped at 10).country—str | Unset— Two-letter country code to localize results (e.g.us,de), normalized to lowercase. Defaults tous.language—str | Unset— Two-letter ISO-639-1 language code for results (e.g.en,fr), normalized to lowercase. Defaults toen.date_range—CreateSearchBodyDateRange | Unset— Restrict results to a recency window:any(default, no time filter),hour(past hour),day(past 24 hours),week(past week),month(past month), oryear(past year). Applies identically to everytype; billing is unchanged.
Call styles
sync_detailed(client=client, body=body) -> Response[CreateSearchResponse200 | CreateSearchResponse503 | Error | Error]
sync(client=client, body=body) -> CreateSearchResponse200 | CreateSearchResponse503 | Error | Error | None
await asyncio_detailed(client=client, body=body) -> Response[CreateSearchResponse200 | CreateSearchResponse503 | Error | Error]
await asyncio(client=client, body=body) -> CreateSearchResponse200 | CreateSearchResponse503 | Error | Error | None