Web hub

Web Network API

For data a page loads with JavaScript after it opens. Pass a URL and a piece of the request URL; get each matching response back, JSON already parsed.

GET /v1/web/network

1 credit +24 credits for maxCredits Max 25 credits You're only charged for what's returned

About this endpoint

GET /v1/web/network loads a public page in a headless browser, like a normal visitor, and returns the fetch and XHR responses the page made while it loaded whose request URL contains match. Each item has the request url, method, status, contentType and body: parsed JSON when the response is JSON, otherwise text. Nothing is replayed or forged; you get what the page itself received.

Use it when the numbers you need aren't in the page HTML because the page fetches them after it opens, for example prices, stock levels or search results. waitMs (default 4000, up to 15000) sets how long to keep listening after the page loads.

A call costs 1 credit, which loads about 1.6 MB on the standard proxy. The page loads on a datacenter proxy first and moves up to residential or mobile only if the site blocks it; those use the budget about nine times faster, and proxy caps how far it goes. A page that needs more stops early (budgetExceeded: true) unless you raise maxCredits (up to 25); then you're charged only for the data it uses. Read meta.creditsCharged on every response.

Web Network API FAQ

What does the Web Network API return?

lookupStatus (found or restricted), the page url after redirects, its HTTP status, the proxy tier used, budgetExceeded, bytesTransferred, and requests: up to 20 matching fetch or XHR responses with url, method, status, contentType, body, bodyBytes and truncated. JSON bodies come back parsed.

How do I call it?

Send GET /v1/web/network with x-api-key, a public url, and match, a piece of the request URL you want, such as /api/ or /graphql. Optional: waitMs, proxy and maxCredits.

How much does it cost?

1 credit per call by default, which loads about 1.6 MB on the standard proxy. A page that needs more stops early (budgetExceeded: true) unless you raise maxCredits (up to 25); then you're charged only for the data it uses. Blocked sites move up to residential or mobile proxies automatically; those use the budget about nine times faster. meta.creditsCharged is the billing source of truth.

Why is requests empty?

The page made no fetch or XHR request whose URL contains match. Check the substring against your browser's network tab, or raise waitMs if the page loads its data late. Images, fonts, media and analytics requests are never loaded, so they can't be captured.

What does lookupStatus restricted mean?

Bot protection blocked the page on every proxy tier allowed. requests is empty. It bills like the other web routes. If you set proxy=datacenter, try without it.

When should I use this instead of HTML or markdown?

Use GET /v1/web/html or GET /v1/web/markdown when the data is in the page itself. Use GET /v1/web/network when the page shows data its scripts load afterwards, so the HTML doesn't contain it.

Can it read pages behind a login?

No. The browser has no cookies or session, so only public pages and the public requests they make are available.