Skip to content

Response Format

By default, the API will return the HTML of the page you are scraping, however, you can do more than that.

JSON Response

You can get the response in JSON format by adding the json_response=true parameter to your request. This is useful for integrating our API with third-party tools or analyzing XHR, Fetch, or AJAX responses. It returns a JSON object with detailed page and request information.

Refer to the Response for more details on the response format returned by the API.

sh
curl -G "https://api.bitfetcher.io/v1/" \
  -d api_key=YOUR_API_KEY \
  -d url=YOUR_URL \
  -d json_response=true

The following response will be returned:

json
{
  // The content of the page
  "body": "<html>parsed content</html>",
  // The headers sent by the server
  "headers": {
    "Content-Type": [
      "text/html; charset=utf-8"
    ],
    "Date": [
      "Tue, 15 Apr 2025 20:48:43 GMT"
    ]
  },
  // The cookies set by the server
  "cookies": [
    {
      "name": "cookie_name",
      "value": "cookie_value",
      "domain": "bitfetcher.io",
      // ...
    },
    // ...
  ],
  // Type of the response "html" or "json" etc.
  "type": "html",
  // status code of the server
  "status_code": 200,
  // base 64 encoded screenshot of the page if screenshot=true is used
  "screenshot": "b....",
  // debug information for each instruction (if js_scenario=true and debug mode is enabled)
  "js_scenario_debug": [...]
}

Download files

Coming soon.