Web

Capture a web page's network responses

Load a web page and return the JSON and other responses its own scripts fetch while it loads.

GET/v1/web/network
x-api-keystringheader

API key (`sfk_...`)

Parameters
5
urlstringrequiredquery

Web page URL to load.

min 1 chars · max 2083 chars

matchstringrequiredquery

Part of the request URL to keep, for example `/api/` or `/graphql`. Only fetch and XHR requests whose URL contains it are returned.

min 1 chars · max 200 chars

waitMsintegeroptionalquery

How long to keep listening after the page loads, in milliseconds (0–15000). Default 4000.

≥ 0 · ≤ 15000

proxystringoptionalquery

Most expensive proxy tier to use. The page is tried on `datacenter` first and moves up only if it is blocked, stopping at this tier. Default: every tier (`mobile`).

one of: datacenter, residential, mobile

maxCreditsintegeroptionalup to maxCreditsquery

Most credits this call may cost (1–25). Default 1, which loads about 1.6 MB on the datacenter proxy or 190 KB on residential or mobile. Raise it for heavy pages; you're charged only for what the page uses.

≥ 1 · ≤ 25

Response fields
19

Endpoint-specific response payload.

datalookupStatus
string

Whether page content could be extracted. Restricted means bot protection or similar access controls blocked automated fetching.

one of: found, restricted

dataurl
string

URL of the page after redirects.

datastatus
integernullable

HTTP status of the page, or null when unknown.

dataproxy
string

Proxy tier the page was loaded on: the tier that served it, or the last one tried when it was blocked.

one of: datacenter, residential, mobile

databudgetExceeded
boolean

Whether the page needed more data than `maxCredits` allows. Loading stopped early, so `requests` may be incomplete.

databytesTransferred
integer

Data the page loaded through the proxy, in bytes, across every tier tried.

≥ 0

Matching fetch and XHR requests, in the order their responses arrived (at most 20). Empty when nothing matched or the page was restricted.

datarequests[]url
string

Request URL.

datarequests[]method
string

HTTP method, for example `GET` or `POST`.

datarequests[]status
integer

HTTP status of the response.

datarequests[]contentType
stringnullable

Response `Content-Type` header, or null when absent.

datarequests[]body
nullableoptional

Response body: parsed JSON when the response is JSON, otherwise text. Null when the body is binary, unavailable or not kept.

datarequests[]bodyBytes
integer

Size of the full response body in bytes.

≥ 0

datarequests[]truncated
boolean

Whether `body` was cut short. Bodies over 512 KB, or past 2 MB across one call, are cut; a cut JSON body is returned as text.

Metadata describing the request and billing outcome.

metarequestId
string

Unique request identifier for tracing this API call.

min 1 chars

metacreditsCharged
integer

Credits charged for this request.

≥ 0

metaversion
string

Public API version that served the response.

one of: v1

Code example

curl "https://api.socialfetch.dev/v1/web/network?url=https://www.socialfetch.dev&match=/api/" \
  -H "x-api-key: YOUR_API_KEY"

Responses

Matching fetch and XHR responses.