A simple extraction
The extract endpoint has two required parameters:urlsspecifies which URLs to target for data extraction.templatespecifies the output format for each item.
template is a dictionary or a string, FetchFox will establish a JSON schema for your output items. This schema will be returned in the artifacts section of the response.
Below is an example of calling the extract endpoint with a template.
Extracting multiple items per URL
By default, FetchFox extracts one item for each URL you pass in. Sometimes, a page contains multiple items. You can tell FetchFox to extract all of them by setting theper_page parameter to many.
Below is an example of extract multliple items from a single page.
divide artifact. FetchFox when you extract multiple items per page, FetchFox uses a CSS selector to divide the page into pieces. The CSS selector it used is included as the divide artifact, along with some AI chain of thought.