# Screenshot > Source: https://scrape.do/documentation/headless-browser/screenshot/ Capture visual snapshots of web pages Scrape.do can capture visual representations of target web pages, allowing you to verify page rendering, monitor visual changes, or archive page layouts. Screenshots are returned as base64-encoded strings in the API response, making them easy to save or process programmatically. > [!NOTE] > When you use any screenshot feature, our infrastructure automatically operates with `blockResources=false` and `render=true` to ensure contents are loaded completely and correctly. --- ## Normal Screenshot If you need to see what the target web page looks like, it's easy to do with Scrape.do. You can take a screenshot and download it simply by sending the `screenShot=true` parameter. The normal screenshot captures whatever is visible within the current viewport or display resolution (default 1920x1080). This means only the "above the fold" content will be captured - similar to what a user sees when first loading the page before scrolling. **cURL (API mode)** ```bash curl --location --request GET 'https://api.scrape.do/?token=YOUR_TOKEN&screenShot=true&render=true&returnJSON=true&url=http://example.com/' \ ``` **Python (API mode)** ```python import base64 import json import requests import urllib.parse token = "YOUR_TOKEN" raw_url = "http://example.com/" url = urllib.parse.quote(raw_url) req_url = f"https://api.scrape.do/?token={token}&url={url}&screenShot=true&render=true&returnJSON=true" resp = requests.get(req_url) if resp.status_code != requests.codes.ok: resp.raise_for_status() json_map = json.loads(resp.text) image_b64 = json_map["screenShots"][0]["image"] image_bytes = base64.b64decode(image_b64) file_path = "Example.png" with open(file_path, "wb") as file: file.write(image_bytes) ``` **Node.js (API mode)** ```javascript const axios = require('axios'); const fs = require('fs'); const token = 'YOUR_TOKEN'; const url = encodeURIComponent('http://example.com/'); const requestURL = `https://api.scrape.do/?token=${token}&url=${url}&screenShot=true&render=true&returnJSON=true`; axios.get(requestURL) .then(response => { if (response.status === 200) { const content = response.data; const imageB64 = content.screenShots[0].image; const filePath = 'Example.png'; fs.writeFile(filePath, Buffer.from(imageB64, 'base64'), err => { if (err) { console.error(err); } }); } else { console.log(response.status); } }) .catch(error => { console.error(error); }); ``` **cURL (Proxy mode)** ```bash curl -k -x "https://YOUR_TOKEN:screenShot=true&render=true&returnJSON=true@proxy.scrape.do:8080" 'http://example.com/' -v ``` **Python (Proxy mode)** ```python import urllib3 import requests import base64 import json import urllib.parse urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) url = "http://example.com/" token = "YOUR_TOKEN" proxyModeUrl = "http://{}:render=true&screenShot=true&returnJSON=true@proxy.scrape.do:8080".format( token) proxies = { "http": proxyModeUrl, "https": proxyModeUrl, } response = requests.request("GET", url, proxies=proxies, verify=False) if response.status_code == 200: json_map = json.loads(response.text) image_b64 = json_map["screenShots"][0]["image"] image_bytes = base64.b64decode(image_b64) file_path = "Example.png" with open(file_path, "wb") as file: file.write(image_bytes) else: print(response) ``` **Node.js (Proxy mode)** ```javascript const axios = require('axios'); const fs = require('fs'); const token = "YOUR_TOKEN"; const targetUrl = "http://example.com/"; axios({ method: "GET", url: targetUrl, proxy: { protocol: 'http', host: 'proxy.scrape.do', port: 8080, auth: { username: token, password: 'screenShot=true&render=true&returnJSON=true' } }, responseType: 'arraybuffer' }) .then(response => { const imageBuffer = response.data; const filePath = 'Example.png'; // Dosyayı kaydet fs.writeFile(filePath, imageBuffer, err => { if (err) { console.error(err); } else { console.log('SUCCESS ! ' + filePath); } }); }) .catch(error => { console.error(error.message); }); ``` *(Go, Ruby, Java, C#, PHP examples are also available on the HTML version.)* --- ## Full Page Screenshot By default, screenshots only capture the part of the web page that is visible on the screen. If you need a screenshot of the entire web page - including all content that would normally require scrolling - just pass `fullScreenShot=true`. The system will take a screenshot of the entire page for you, from top to bottom. This is particularly useful for capturing long-form content, full product listings, or complete article pages. **cURL (API mode)** ```bash curl --location --request GET 'https://api.scrape.do/?token=YOUR_TOKEN&render=true&fullScreenShot=true&returnJSON=true&url=http://example.com/' \ ``` **Python (API mode)** ```python import base64 import json import requests import urllib.parse token = "YOUR_TOKEN" raw_url = "http://example.com/" url = urllib.parse.quote(raw_url) req_url = f"https://api.scrape.do/?token={token}&url={url}&fullScreenShot=true&render=true&returnJSON=true" resp = requests.get(req_url) if resp.status_code != requests.codes.ok: resp.raise_for_status() json_map = json.loads(resp.text) image_b64 = json_map["screenShots"][0]["image"] image_bytes = base64.b64decode(image_b64) file_path = "Example.png" with open(file_path, "wb") as file: file.write(image_bytes) ``` **Node.js (API mode)** ```javascript const axios = require('axios'); const fs = require('fs'); const token = 'YOUR_TOKEN'; const url = encodeURIComponent('http://example.com/'); const requestURL = `https://api.scrape.do/?token=${token}&url=${url}&fullScreenShot=true&render=true&returnJSON=true`; axios.get(requestURL) .then(response => { if (response.status === 200) { const content = response.data; const imageB64 = content.screenShots[0].image; const filePath = 'Example.png'; fs.writeFile(filePath, Buffer.from(imageB64, 'base64'), err => { if (err) { console.error(err); } }); } else { console.log(response.status); } }) .catch(error => { console.error(error); }); ``` **cURL (Proxy mode)** ```bash curl -k -x "https://YOUR_TOKEN:render=true&screenShot=true&returnJSON=true@proxy.scrape.do:8080" 'http://example.com/' -v ``` **Python (Proxy mode)** ```python import urllib3 import requests import base64 import json import urllib.parse urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) url = "http://example.com/" token = "YOUR_TOKEN" proxyModeUrl = "http://{}:render=true&fullScreenShot=true&returnJSON=true@proxy.scrape.do:8080".format(token) proxies = { "http": proxyModeUrl, "https": proxyModeUrl, } response = requests.request("GET", url, proxies=proxies, verify=False) if response.status_code == 200: json_map = json.loads(response.text) image_b64 = json_map["screenShots"][0]["image"] image_bytes = base64.b64decode(image_b64) file_path = "Example.png" with open(file_path, "wb") as file: file.write(image_bytes) else: print(response) ``` **Node.js (Proxy mode)** ```javascript const axios = require('axios'); const fs = require('fs'); const token = "YOUR_TOKEN"; const targetUrl = "http://example.com/"; axios({ method: "GET", url: targetUrl, proxy: { protocol: 'http', host: 'proxy.scrape.do', port: 8080, auth: { username: token, password: 'fullScreenShot=true&render=true&returnJSON=true' } }, responseType: 'arraybuffer' }) .then(response => { const imageBuffer = response.data; const filePath = 'Example.png'; // Dosyayı kaydet fs.writeFile(filePath, imageBuffer, err => { if (err) { console.error(err); } else { console.log('SUCCESS ! ' + filePath); } }); }) .catch(error => { console.error(error.message); }); ``` *(Go, Ruby, Java, C#, PHP examples are also available on the HTML version.)* --- ## Partial Screenshot Sometimes you may want to take a screenshot of only a specific element loaded on the screen. In this scenario, our system will take a screenshot for the CSS selector you have provided. By passing the `particularScreenShot=#elementSelector` parameter, you can take a screenshot of the relevant element. This is useful for capturing specific components like product images, price tables, or review sections without the surrounding page content. > [!NOTE] > `particularScreenShot` property expects **url-encoded** value. --- ## Important Notes - The Partial Screenshot feature cannot be used without the `returnJSON=true` parameter! - You can use only one of the three screenshot features at the same time. - The **particularScreenShot** parameter and the **playWithBrowser** parameter cannot be used together. If you need to take more than one screenshot, you can add it as an action with [Browser Interactions](/documentation/headless-browser/browser-interactions). **cURL (API mode)** ```bash curl --location --request GET 'https://api.scrape.do/?token=YOUR_TOKEN&render=true&particularScreenShot=h1&returnJSON=true&url=http://example.com/' \ ``` **Python (API mode)** ```python import base64 import json import requests import urllib.parse token = "YOUR_TOKEN" raw_url = "http://example.com/" url = urllib.parse.quote(raw_url) selector = urllib.parse.quote("h1") req_url = f"https://api.scrape.do/?token={token}&url={url}&particularScreenShot={selector}&render=true&returnJSON=true" resp = requests.get(req_url) if resp.status_code != requests.codes.ok: resp.raise_for_status() json_map = json.loads(resp.text) image_b64 = json_map["screenShots"][0]["image"] image_bytes = base64.b64decode(image_b64) file_path = "Example.png" with open(file_path, "wb") as file: file.write(image_bytes) ``` **Node.js (API mode)** ```javascript const axios = require('axios'); const fs = require('fs'); const token = 'YOUR_TOKEN'; const url = encodeURIComponent('http://example.com/'); const selector = encodeURIComponent("h1"); const requestURL = `https://api.scrape.do/?token=${token}&url=${url}&particularScreenShot=${selector}&returnJSON=true&render=true`; axios.get(requestURL) .then(response => { if (response.status === 200) { const content = response.data; const imageB64 = content.screenShots[0].image; const filePath = 'Example.png'; fs.writeFile(filePath, Buffer.from(imageB64, 'base64'), err => { if (err) { console.error(err); } }); } else { console.log(response.status); } }) .catch(error => { console.error(error); }); ``` **cURL (Proxy mode)** ```bash curl -k -x "https://YOUR_TOKEN:render=true&particularScreenShot=h1&returnJSON=true@proxy.scrape.do:8080" 'http://example.com/' -v ``` **Python (Proxy mode)** ```python import urllib3 import requests import base64 import json import urllib.parse urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) url = "http://example.com/" token = "YOUR_TOKEN" proxyModeUrl = "http://{}:render=true&particularScreenShot=h1&returnJSON=true@proxy.scrape.do:8080".format(token) proxies = { "http": proxyModeUrl, "https": proxyModeUrl, } response = requests.request("GET", url, proxies=proxies, verify=False) if response.status_code == 200: json_map = json.loads(response.text) image_b64 = json_map["screenShots"][0]["image"] image_bytes = base64.b64decode(image_b64) file_path = "Example.png" with open(file_path, "wb") as file: file.write(image_bytes) else: print(response) ``` **Node.js (Proxy mode)** ```javascript const axios = require('axios'); const fs = require('fs'); const token = "YOUR_TOKEN"; const targetUrl = "http://example.com/"; axios({ method: "GET", url: targetUrl, proxy: { protocol: 'http', host: 'proxy.scrape.do', port: 8080, auth: { username: token, password: 'particularScreenShot=h1&render=true&returnJSON=true' } }, responseType: 'arraybuffer' }) .then(response => { const imageBuffer = response.data; const filePath = 'Example.png'; // Dosyayı kaydet fs.writeFile(filePath, imageBuffer, err => { if (err) { console.error(err); } else { console.log('SUCCESS ! ' + filePath); } }); }) .catch(error => { console.error(error.message); }); ``` *(Go, Ruby, Java, C#, PHP examples are also available on the HTML version.)*