Web 爬取網頁(渲染後的 HTML) API
API 健康狀態
健康 可用 受限 多數不可用 無資料
正在載入健康狀態...
取得網頁爬取資料,包括回傳完整的原始渲染 HTML 內容,快速且成本效益高,並針對靜態頁面爬取進行最佳化,適用於抓取、元資料提取和頁面結構分析。
標籤: 網頁爬取
請求參數
| 名稱 | 必填 | 類型 | 預設值 | 說明 |
|---|---|---|---|---|
url | 是 | string | 要爬取的網頁完整 URL(例如 'https://www.example.com')。 |
複製請求
bash
curl -X GET "https://api.justserpapi.com/api/v1/web/rendered-html?url=YOUR_VALUE" \
-H "X-API-Key: YOUR_API_KEY"js
const res = await fetch("https://api.justserpapi.com/api/v1/web/rendered-html?url=YOUR_VALUE", {
headers: { "X-API-Key": "YOUR_API_KEY" }
});
const data = await res.json();
console.log(data);python
import requests
url = "https://api.justserpapi.com/api/v1/web/rendered-html"
headers = { "X-API-Key": "YOUR_API_KEY" }
params = {
"url": "YOUR_VALUE"
}
response = requests.get(url, headers=headers, params=params)
print(response.json())php
<?php
$url = "https://api.justserpapi.com/api/v1/web/rendered-html?url=YOUR_VALUE";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"X-API-Key: YOUR_API_KEY"
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;go
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
client := &http.Client{}
req, _ := http.NewRequest("GET", "https://api.justserpapi.com/api/v1/web/rendered-html?url=YOUR_VALUE", nil)
req.Header.Set("X-API-Key", "YOUR_API_KEY")
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}回應
正在載入最新回應範例...
