コンテンツにスキップ
ログイン サインアップ

JSON自動パーサー

auto_parser=1 を設定すると、APIがページをタグ、属性、テキストのネストされたJSON構造に解析します。JavaScriptレンダリングの有無にかかわらず動作します。

GET https://scrape.shifter.io/v1?api_key=YOUR_API_KEY&url=<TARGET_URL>&auto_parser=1
ParameterTypeRequiredDescription
api_keystringyesあなたのWeb Scraping APIキー
urlstringyes取得対象のURL
auto_parserintegerno0(デフォルト)または 11の場合、レスポンスは解析済みのJSONになります。
Terminal window
curl "https://scrape.shifter.io/v1?api_key=YOUR_API_KEY&url=https://example.com&auto_parser=1"
{
"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..."
}
}
}
}
}
}