Serverless AI Web Search
AI powered web search service that provides relevant summaries and sources based on user queries in multiple languages.
Endpoint
Web search with AI-powered summaries
POSThttps://api.xtartapp.com/text/web-search
*Authentication
You must use a Bearer token provided by the dashboard to use for authentication. Add the token to the Authorization header.
Request body
Name | Type | Required | Max | Description |
---|---|---|---|---|
ask | string | Yes | 500 | The search query to find relevant web content. |
Response
Name | Type | Description |
---|---|---|
data | object | The data of the web search response |
data.response | string | AI-generated summary answering the query based on web content |
data.sources | array | List of source URLs where the information was derived from |
metadata | object | Metadata about the web search process |
metadata.cost | number | The cost of the web search request |
Errors
{
"error": "string",
"code": "string"
}
HTTP Status | Error Code | Message |
---|---|---|
400 | INVALID_PAYLOAD | Occurs when the payload is invalid. |
400 | INVALID_REQUEST | Ex.: The request is invalid. |
400 | WEB_SEARCH_ERROR | Ex: could not perform web search | parsing error |
400 | HARM_CONTENT | Ex.: The content is harmful and cannot be processed. |
400 | INSUFFICIENT_BALANCE | The user has insufficient balance |
401 | UNAUTHORIZED | Ex.: The token is invalid. |
429 | TOO_MANY_REQUESTS | Ex.: The request limit has been reached. |