# Output & Response > Source: https://scrape.do/documentation/api-response/response-output/ Customize response Here we present the parameters where the responses returned by our system can be customized. ## Output Format Scrape.do does support markdown output for LLM data training or other necessary purposes. You can use the `output=markdown` parameter to obtain the output in markdown format when the response content-type is `text/html`. **cURL (API mode)** ```bash curl --location --request GET 'https://api.scrape.do/?token=YOUR_TOKEN&url=https://httpbin.co/&output=markdown' ``` **Python (API mode)** ```python import requests import urllib.parse token = "YOUR_TOKEN" targetUrl = urllib.parse.quote("https://httpbin.co/") url = "http://api.scrape.do/?token={}&url={}&output=markdown".format(token, targetUrl) response = requests.request("GET", url) print(response.text) ``` **Node.js (API mode)** ```javascript const axios = require('axios'); const token = "YOUR_TOKEN"; const targetUrl = encodeURIComponent("https://httpbin.co/"); const config = { 'method': 'GET', 'url': `https://api.scrape.do/?token=${token}&url=${targetUrl}&output=markdown`, 'headers': {} }; axios(config) .then(function (response) { console.log(response.data); }) .catch(function (error) { console.log(error); }); ``` **cURL (Proxy mode)** ```bash curl -k -x "http://YOUR_TOKEN:output=markdown@proxy.scrape.do:8080" 'https://httpbin.co/' -v ``` **Python (Proxy mode)** ```python import requests import urllib3 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) url = "https://httpbin.co/" token = "YOUR_TOKEN" proxyModeUrl = "http://{}:output=markdown@proxy.scrape.do:8080".format(token) proxies = { "http": proxyModeUrl, "https": proxyModeUrl, } response = requests.request("GET", url, proxies=proxies, verify=False) print(response.text) ``` **Node.js (Proxy mode)** ```javascript const axios = require('axios'); const token = "YOUR_TOKEN"; const targetUrl = "https://httpbin.co/"; axios({ method:"GET", url:targetUrl, proxy: { protocol:'http', host: 'proxy.scrape.do', port: 8080, auth: { username: token, password: 'output=markdown' } } }) .then(response => { console.log(response.data); }) .catch(error => { console.error(error.message); }); ``` *(Go, Ruby, Java, C#, PHP examples are also available on the HTML version.)* ## Downloading Pictures & Files You don't need any extra configuration to download pictures or files. Just send a request with the target URL and get the result. > [!NOTE] > There is a 4MB response body limit per request in our system. With super proxies, this limit is 2MB. **cURL (API mode)** ```bash curl --location --request GET 'http://api.scrape.do/?token=YOUR_TOKEN&url=https://httpbin.co/image' ``` **Python (API mode)** ```python import requests import urllib.parse token = "YOUR_TOKEN" targetUrl = urllib.parse.quote("https://httpbin.co/image") url = "http://api.scrape.do/?token={}&url={}".format(token, targetUrl) response = requests.request("GET", url) print(response.text) ``` **Node.js (API mode)** ```javascript const axios = require('axios'); const token = "YOUR_TOKEN"; const targetUrl = encodeURIComponent("https://httpbin.co/image"); const config = { 'method': 'GET', 'url': `https://api.scrape.do/?token=${token}&url=${targetUrl}`, 'headers': {} }; axios(config) .then(function (response) { console.log(response.data); }) .catch(function (error) { console.log(error); }); ``` **cURL (Proxy mode)** ```bash curl -k -x "http://YOUR_TOKEN:@proxy.scrape.do:8080" 'https://httpbin.co/image' -v ``` **Python (Proxy mode)** ```python import requests import urllib3 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) url = "https://httpbin.co/image" token = "YOUR_TOKEN" proxyModeUrl = "http://{}:@proxy.scrape.do:8080".format(token) proxies = { "http": proxyModeUrl, "https": proxyModeUrl, } response = requests.request("GET", url, proxies=proxies, verify=False) print(response.text) ``` **Node.js (Proxy mode)** ```javascript const axios = require('axios'); const token = "YOUR_TOKEN"; const targetUrl = "https://httpbin.co/image"; axios({ method:"GET", url:targetUrl, proxy: { protocol:'http', host: 'proxy.scrape.do', port: 8080, auth: { username: token, password: '' } } }) .then(response => { console.log(response.data); }) .catch(error => { console.error(error.message); }); ``` *(Go, Ruby, Java, C#, PHP examples are also available on the HTML version.)* ## Transparent Response By default, Scrape.do returns status codes specified by our system. However, in some cases, you may want to use the exact status codes that the target web page returns. In such cases, simply pass the `transparentResponse=true` parameter. **cURL (API mode)** ```bash curl --location --request GET 'https://api.scrape.do/?token=YOUR_TOKEN&url=https://httpbin.co/anything&transparentResponse=true' ``` **Python (API mode)** ```python import requests import urllib.parse token = "YOUR_TOKEN" targetUrl = urllib.parse.quote("https://httpbin.co/anything") transparentResponse = "true" url = "http://api.scrape.do/?token={}&url={}&transparentResponse={}".format(token, targetUrl,transparentResponse) response = requests.request("GET", url) print(response.text) ``` **Node.js (API mode)** ```javascript const axios = require('axios'); const token = "YOUR_TOKEN"; const targetUrl = encodeURIComponent("https://httpbin.co/anything"); const transparentResponse = "true" const config = { 'method': 'GET', 'url': `https://api.scrape.do/?token=${token}&url=${targetUrl}&transparentResponse=${transparentResponse}`, 'headers': {} }; axios(config) .then(function (response) { console.log(response.data); }) .catch(function (error) { console.log(error); }); ``` **cURL (Proxy mode)** ```bash curl -k -x "http://YOUR_TOKEN:transparentResponse=true@proxy.scrape.do:8080" 'https://httpbin.co/anything' -v ``` **Python (Proxy mode)** ```python import requests import urllib3 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) url = "https://httpbin.co/anything" token = "YOUR_TOKEN" proxyModeUrl = "http://{}:transparentResponse=true@proxy.scrape.do:8080".format(token) proxies = { "http": proxyModeUrl, "https": proxyModeUrl, } response = requests.request("GET", url, proxies=proxies, verify=False) print(response.text) ``` **Node.js (Proxy mode)** ```javascript const axios = require('axios'); const token = "YOUR_TOKEN"; const targetUrl = "https://httpbin.co/anything"; axios({ method:"GET", url:targetUrl, proxy: { protocol:'http', host: 'proxy.scrape.do', port: 8080, auth: { username: token, password: 'transparentResponse=true' } } }) .then(response => { console.log(response.data); }) .catch(error => { console.error(error.message); }); ``` *(Go, Ruby, Java, C#, PHP examples are also available on the HTML version.)* ## Response Headers By default, Scrape.do will return all the header information it receives from the target website. Our system also aims to make your work easier by adding the following header parameters to the response. | Header | Description | | ------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------- | | Scrape.do-Cookies | All cookie information returned from the target web page, joined with `';'` and returned in one header | | Scrape.do-Remaining-Credits | Total credits remaining in your subscription | | Scrape.do-Request-Cost | Credits consumed by this specific request. **This can differ from the base 1 / 5 / 10 / 25 table because some target domains have `super` and/or `render` applied by default server-side**. See [Request Costs](/documentation/request-costs) for the per-domain pricing table. | | Scrape.do-Resolved-Url | The final URL after following redirects. Useful for tracking where requests end up | | Scrape.do-Target-Url | The original URL of the target web page you requested | | Scrape.do-Initial-Status-Code | The first response status code received from the target website. In responses with redirects, this will show the initial 30X code | | Scrape.do-Target-Redirected-Location | When `disableRedirection=true`, this shows the `Location` header from the target website's redirect response | > [!NOTE] > **Reading `Scrape.do-Request-Cost`.** This header is the authoritative source for what a call actually cost. Always read it on each response if you're tracking spend programmatically, since the cost may differ from the baseline of the parameters you sent (Scrape.do applies default `super` / `render` profiles on certain target domains, see [Request Costs](/documentation/request-costs#per-domain-pricing) for the full list). ## Pure Cookies When scraping websites, you may need to process cookies in their original format. By default, Scrape.do returns cookies in a special header called `Scrape.do-Cookies`. However, if you need to access the original `Set-Cookie` headers returned by the target website, you can enable the `pureCookies` parameter. When set to `pureCookies=true`, this parameter returns the original `Set-Cookie` headers from the target website instead of the processed `Scrape.do-Cookies` format. **cURL (API mode)** ```bash curl --location --request GET 'https://api.scrape.do/?token=YOUR_TOKEN&url=https://www.instagram.com/api/v1/users/web_profile_info/?username=google&pureCookies=true' ``` **Python (API mode)** ```python import requests import urllib.parse token = "YOUR_TOKEN" targetUrl = urllib.parse.quote("https://www.instagram.com/api/v1/users/web_profile_info/?username=google") url = "http://api.scrape.do/?token={}&url={}&pureCookies=true".format(token, targetUrl) response = requests.request("GET", url) for key, value in response.headers.items(): print(f"{key}: {value}") ``` **Node.js (API mode)** ```javascript const axios = require('axios'); const token = "YOUR_TOKEN"; const targetUrl = encodeURIComponent("https://www.instagram.com/api/v1/users/web_profile_info/?username=google"); const config = { 'method': 'GET', 'url': `https://api.scrape.do/?token=${token}&url=${targetUrl}&pureCookies=true`, 'headers': {} }; axios(config) .then(function (response) { console.log("HEADERS:", JSON.stringify(response.headers, null, 2)); }) .catch(function (error) { console.log(error); }); ``` **cURL (Proxy mode)** ```bash curl -k -x "http://YOUR_TOKEN:pureCookies=true@proxy.scrape.do:8080" 'https://www.instagram.com/api/v1/users/web_profile_info/?username=google' -v ``` **Python (Proxy mode)** ```python import requests import urllib3 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) url = "https://www.instagram.com/api/v1/users/web_profile_info/?username=google" token = "YOUR_TOKEN" proxyModeUrl = "http://{}:pureCookies=true&customHeaders=false@proxy.scrape.do:8080".format(token) proxies = { "http": proxyModeUrl, "https": proxyModeUrl, } response = requests.request("GET", url, proxies=proxies, verify=False) for key, value in response.headers.items(): print(f"{key}: {value}") ``` **Node.js (Proxy mode)** ```javascript const axios = require('axios'); const token = "YOUR_TOKEN"; const targetUrl = "https://www.instagram.com/api/v1/users/web_profile_info/?username=google"; axios({ method:"GET", url:targetUrl, proxy: { protocol:'http', host: 'proxy.scrape.do', port: 8080, auth: { username: token, password: 'pureCookies=true&customHeaders=false' } } }) .then(response => { console.log("HEADERS:", JSON.stringify(response.headers, null, 2)); }) .catch(error => { console.error(error.message); }); ``` *(Go, Ruby, Java, C#, PHP examples are also available on the HTML version.)* ### Example Result ![Pure Cookies Response](/images/docs/pure-cookies-response.png)