Capturing XHR without Rendering

is_xhr Param

Introduction the is_xhr parameter is a boolean option designed to capture internal API calls without requiring page rendering. While the network capture feature requires that rendering is enabled, is_xhr provides a workaround by allowing data collection from internal APIs that do not depend on rendering.

This feature is particularly useful for efficiently gathering data from sources where rendering is not needed (internal API is accessible directly) , optimizing performance and reducing resource usage during the scraping process.

  • When enabled, the browser sends different headers for XHR against DOC requests

  • The target URL in this case would be the XHR/AJAX URL

Example Request

curl -X POST 'https://api.webit.live/api/v1/realtime/web' \
--header 'Authorization: Basic <credential string>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "url": "https://www.lowes.com/purchase/api/items/1003130714/additionalServices?storeNumber=1792&quantity=1&stateCode=FL&userType=REGULAR&isSDV2Enabled=true",
    "country": "US",
    "is_xhr": true
}'

Last updated