Serverless AI Web Content Search
AI powered web scraping and search service that extracts and finds the most relevant content from a webpage based on a search query.
Endpoint
Extract and search through web content using AI-powered semantic search
POSThttps://api.xtartapp.com/data/web
*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 |
---|---|---|---|---|
query | string | Yes | 500 | The search query to find relevant content on the webpage |
url | string | Yes | 500 | The URL of the webpage to scrape and search |
Response
Name | Type | Description |
---|---|---|
data | object | The data returned from the web content search |
data.response | string | The summary of the content that answers the USER INPUT |
data.threshold | number | The threshold of the content that answers the USER INPUT |
metadata | object | Metadata about the web search process |
metadata.cost | number | The cost of the web search request (fixed at $0.002 per request) |
metadata.tokens | number | Number of tokens used in the operation |
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 | DATA_WEB_ERROR | Ex: could not load web content | 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. |