JSON 자동 파서
auto_parser=1을 설정하면 API가 페이지를 태그, 속성, 텍스트로 구성된 중첩 JSON 구조로 파싱합니다. JavaScript 렌더링 사용 여부와 관계없이 작동합니다.
Endpoint
섹션 제목: “Endpoint” GET https://scrape.shifter.io/v1?api_key=YOUR_API_KEY&url=<TARGET_URL>&auto_parser=1
Parameters
섹션 제목: “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
api_key | string | yes | Web Scraping API 키 |
url | string | yes | 가져올 대상 URL |
auto_parser | integer | no | 0(기본값) 또는 1. 1인 경우 응답이 파싱된 JSON으로 반환됩니다. |
Example request
섹션 제목: “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
섹션 제목: “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..." } } } } }}