Scrape an HTML snippet
Reads the selected elements from the HTML passed in html.
Input
{
"selectors": [
{
"selector": "#__next > div > div > main > div > div > div > a",
"attribute": "href",
"keyField": "url"
}
],
"url": "https://1001fx.com/blog",
"html": "<div><a href='https://1001fx.com'>1001fx</a></div>"
}Output · HTTP 200
{
"statusCode": 200
}Show curl command
curl -X POST 'https://api.1001fx.com/data/scrapehtml' \
-H 'X-API-KEY: YOURSECRETAPIKEY' \
-H 'Content-Type: application/json' \
-d '{"selectors":[{"selector":"#__next > div > div > main > div > div > div > a","attribute":"href","keyField":"url"}],"url":"https://1001fx.com/blog","html":"<div><a href='\''https://1001fx.com'\''>1001fx</a></div>"}'