Skip to main content
POST
Web Search Basic
Run a web search and get a list of structured results with title, snippet, site, and URL. Ideal for agent applications that orchestrate their own search logic.
The string fields above are returned as empty strings when no data is available.Response Example
Common Response HeadersAll responses, including error responses, carry these two headers.
Billing: you are charged once per successful call (HTTP 200) that returns a non-empty search_results array; failed or empty-result calls are free. For pricing details, see WebSearch Pricing.

Authorizations

Authorization
string
header
required

The Authorization header expects a Bearer token. Use an MOONSHOT_API_KEY as the token. This is a server-side secret key. Generate one on the API keys page in your dashboard.

Body

application/json
text_query
string
required

Search query text. Must not be empty.

timeout_seconds
integer

Search timeout in seconds, from 1 to 60. If omitted, no per-request timeout is applied.

Required range: 1 <= x <= 60
limit
integer
default:5

Maximum number of results to return, from 1 to 20. Defaults to 5.

Required range: 1 <= x <= 20
include_content
boolean
default:false

Whether to return full page content in each result's text field. Defaults to false.

Response

Search results

search_results
object[]
required

List of search results; an empty array when nothing matches.