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

NameTypeRequiredMaxDescription
askstringYes500The search query to find relevant web content.

Response

NameTypeDescription
dataobjectThe data of the web search response
data.responsestringAI-generated summary answering the query based on web content
data.sourcesarrayList of source URLs where the information was derived from
metadataobjectMetadata about the web search process
metadata.costnumberThe cost of the web search request

Errors

{
   "error": "string", 
   "code": "string"
}
HTTP StatusError CodeMessage
400INVALID_PAYLOADOccurs when the payload is invalid.
400INVALID_REQUESTEx.: The request is invalid.
400WEB_SEARCH_ERROREx: could not perform web search | parsing error
400HARM_CONTENTEx.: The content is harmful and cannot be processed.
400INSUFFICIENT_BALANCEThe user has insufficient balance
401UNAUTHORIZEDEx.: The token is invalid.
429TOO_MANY_REQUESTSEx.: The request limit has been reached.