JSON auto parser
Set auto_parser=1 to have the API parse the page into a nested JSON structure of tags, attributes, and text. Works with or without JavaScript rendering.
Endpoint
Section titled “Endpoint” GET https://scrape.shifter.io/v1?api_key=YOUR_API_KEY&url=<TARGET_URL>&auto_parser=1
Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
api_key | string | yes | Your Web Scraping API key |
url | string | yes | Target URL to fetch |
auto_parser | integer | no | 0 (default) or 1. When 1, the response is parsed JSON. |
Example request
Section titled “Example request”curl "https://scrape.shifter.io/v1?api_key=YOUR_API_KEY&url=https://example.com&auto_parser=1"import requests
r = requests.get("https://scrape.shifter.io/v1", params={ "api_key": "YOUR_API_KEY", "url": "https://example.com", "auto_parser": 1,})print(r.json())import fetch from 'node-fetch';
const url = 'https://scrape.shifter.io/v1?' + new URLSearchParams({ api_key: 'YOUR_API_KEY', url: 'https://example.com', auto_parser: '1',});const res = await fetch(url);console.log(await res.json());Example response
Section titled “Example response”{ "0": { "tagName": "div", "children": { "0": { "tagName": "h1", "text": "Example Domain" }, "1": { "tagName": "p", "text": "This domain is for use in illustrative examples in documents." }, "2": { "tagName": "p", "text": "More information...", "children": { "0": { "tagName": "a", "attributes": { "href": "https://www.iana.org/domains/example" }, "text": "More information..." } } } } }}