Elements
POST

ElementEntity
ExamplesThere is two types of request modes you can use with Tedi Browser Elements API:
- Elements mode: Directly specify the element selectors you want to extract from the web pages.
- Prompt mode: Provide a natural language prompt to guide the extraction process.
Elements mode, then you have to specify the elements field with an array of element selectors.
When using Prompt mode, then you have to specify the prompt field with a natural language instruction. In this mode, it is required to also provide the output schema to define the expected structure of the extracted data.
Request
An array of URLs to extract elements from.
- Minimum of
1 URLper request. - Maximum of
10 URLsper request.
An array of element selectors to extract from the specified URLs.See ElementEntity for detailed configuration options.
An optional prompt to guide the extraction process. When provided, Tedi will use this prompt to determine which elements to extract based on the context of the web pages.
Optional JSON Schema (Draft 7) that defines the expected structure of the response.
This allows you to specify how you want the extracted information to be organized and formatted.
An optional object to configure caching behavior for the request. By default, caching is enabled with a TTL of 120 seconds. You can customize these settings by providing the
cache object.Response
The response will contain the extracted elements for each URL specified in the request.Indicates whether the response was served from cache.
The time in seconds until the cached response expires. Default is 7200
seconds (2 hours).
A mapping of each URL to its extracted elements. Each URL maps to another object where keys are element selectors and values are arrays of extracted content.
An object containing token usage information for the request.
This will be returned if you use Agentic features with Tedi Browser Elements.