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

JavaScriptのレンダリング

初回のHTML読み込み後にコンテンツをハイドレートするシングルページアプリケーションやサイトは、完全にレンダリングするために実際のブラウザを必要とします。render_js=1 を渡すことで、スクレイプをヘッドレスブラウザ経由で実行し、完全にレンダリングされたHTMLを受け取ることができます。

GET https://scrape.shifter.io/v1?api_key=YOUR_API_KEY&url=<TARGET_URL>&render_js=1
パラメータ必須説明
api_keystringはいWeb Scraping APIキー
urlstringはい取得対象のURL
render_jsintegerいいえ0(デフォルト)または 1。ヘッドレスブラウザでレンダリングするには 1 を設定します。
Terminal window
curl "https://scrape.shifter.io/v1?api_key=YOUR_API_KEY&url=https://example.com&render_js=1"
<!doctype html>
<html>
<head>
<title>Example Domain</title>
</head>
<body>
<div>
<h1>Example Domain</h1>
<p>This domain is for use in illustrative examples in documents.</p>
<p><a href="https://www.iana.org/domains/example">More information...</a></p>
</div>
</body>
</html>