跳转到主要内容

步骤 1:检查网络

查看哪些代理节点可用:
curl -H "X-API-Key: YOUR_API_KEY" \
  https://scraping-api.55-tech.com/network/status
{
  "total_nodes": 80,
  "total_countries": 12,
  "nodes_by_country": {
    "AT": 22,
    "DE": 20,
    "US": 7,
    "IT": 5,
    "UK": 4,
    "AU": 3,
    "GR": 3,
    "ES": 2,
    "FR": 2,
    "BG": 1,
    "BR": 1,
    "PL": 1
  }
}

步骤 2:发送 HTTP GET 请求

使用 X-Target-URL 请求头通过代理网络抓取一个 URL:
curl -H "X-API-Key: YOUR_API_KEY" \
  -H "X-Target-URL: https://httpbin.org/headers" \
  https://scraping-api.55-tech.com/fetch
{
  "meta": {
    "status": 200,
    "final_url": "https://httpbin.org/headers",
    "http_version": "HTTP/2",
    "elapsed_ms": 312,
    "blocked": false,
    "headers": { "content-type": "application/json" },
    "agent": { "id": "scraping-de5" },
    "bytes": 128
  },
  "raw": null,
  "raw_json": {
    "headers": {
      "Accept": "*/*",
      "Host": "httpbin.org"
    }
  }
}
JSON 响应会自动解析到 raw_json 中。

步骤 3:发送带自定义请求体和请求头的 POST 请求

使用 POST /fetch 配合 JSON 请求体向目标发送自定义请求头、请求体和方法:
curl -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "X-Target-URL: https://httpbin.org/post" \
  -H "Content-Type: application/json" \
  -d '{
    "headers": {
      "Authorization": "Bearer my-token",
      "Accept": "application/json"
    },
    "body": "{\"key\": \"value\"}",
    "timeout": 30
  }' \
  https://scraping-api.55-tech.com/fetch
POST 请求体字段:
FieldRequiredDefaultDescription
methodNoMatches request method覆盖 HTTP 方法
headersNo{}发送到目标源站的自定义请求头
bodyNo""发送到目标的请求体
timeoutNo30请求超时时间(秒)
allow_redirectsNotrue是否跟随重定向

步骤 4:指定目标国家

使用 X-Geo 通过特定国家的代理节点进行路由:
curl -H "X-API-Key: YOUR_API_KEY" \
  -H "X-Target-URL: https://httpbin.org/headers" \
  -H "X-Geo: US" \
  https://scraping-api.55-tech.com/fetch
使用 X-Agent 固定到特定代理节点:
curl -H "X-API-Key: YOUR_API_KEY" \
  -H "X-Target-URL: https://httpbin.org/headers" \
  -H "X-Agent: de1" \
  https://scraping-api.55-tech.com/fetch
或从一组代理节点中随机选择:
curl -H "X-API-Key: YOUR_API_KEY" \
  -H "X-Target-URL: https://httpbin.org/headers" \
  -H "X-Agent: de1,at5,us3" \
  https://scraping-api.55-tech.com/fetch

步骤 5:检查域名健康状态

查看哪些代理节点可以访问特定域名:
curl -H "X-API-Key: YOUR_API_KEY" \
  https://scraping-api.55-tech.com/network/health/example.com
{
  "domain": "example.com",
  "nodes_checked": 62,
  "available": 58,
  "limited": 2,
  "unavailable": 2,
  "details": [
    {
      "node_id": "scraping-de1",
      "slug": "de1",
      "state": "available",
      "rtt_ms": 145,
      "last_check": "2026-03-13T22:15:00Z"
    }
  ]
}

步骤 6:预览代理节点选择

在不实际发送请求的情况下,调试将选择哪个代理节点:
curl -H "X-API-Key: YOUR_API_KEY" \
  -H "X-Geo: US" \
  "https://scraping-api.55-tech.com/debug/pick?url=https://example.com"
{
  "node_id": "scraping-us3",
  "node_slug": "us3",
  "country": "US",
  "valid_until_epoch_ms": 1710374100000
}

步骤 7:查看使用情况

curl -H "X-API-Key: YOUR_API_KEY" \
  https://scraping-api.55-tech.com/usage
{
  "api_key": "YOUR_KEY",
  "total": 15243,
  "success": 14821,
  "fail": 422,
  "success_rate": 97.2,
  "bytes_transferred": 1847362541,
  "rate_limit": {
    "rps": 10.0,
    "burst": 10,
    "remaining": 9.3
  },
  "by_protocol": {
    "fetch": 14200,
    "ws": 923,
    "amqp": 120
  },
  "top_domains": [
    { "domain": "example.com", "requests": 4521 }
  ]
}

后续步骤

Browser

使用真实浏览器渲染 JavaScript 页面。

WebSocket & AMQP

中继 WebSocket 连接和消费 AMQP 流。

Error handling

状态码、封锁检测和重试策略。