Skip to content
shotsmith
Features Docs Guides Pricing Changelog Sign inStart free

Proxies

shotsmith renders pages from servers in a data centre. Most sites don’t mind, but some bot protection (Akamai, DataDome, PerimeterX and stricter Cloudflare setups) blocks data-centre addresses however real the browser looks. For those sites, send your own proxy and shotsmith loads the page through it.

You also need a proxy to see a page as visitors in another country do: prices, cookie banners, language and content that changes by location.

Send your own proxy

Pass the proxy address in the proxy option. Turn on stealth mode as well: the proxy fixes where the visit comes from, and stealth makes the browser look like a normal one.

// npm install @shotsmith/sdk
import { Shotsmith, TakeOptions } from '@shotsmith/sdk';
import { writeFile } from 'node:fs/promises';

const shotsmith = new Shotsmith({
  accessKey: 'YOUR_ACCESS_KEY',
});

const options = TakeOptions.url('https://www.example.com')
  .stealth()
  .proxy('http://USERNAME:PASSWORD@proxy.example.net:8000')
  .blockCookieBanners();

await writeFile('capture.jpg', await shotsmith.take(options));
<?php

// composer require shotsmith/shotsmith-php
require 'vendor/autoload.php';

use Shotsmith\Client;
use Shotsmith\Options\TakeOptions;

$shotsmith = new Client('YOUR_ACCESS_KEY');

$options = TakeOptions::url('https://www.example.com')
    ->stealth()
    ->proxy('http://USERNAME:PASSWORD@proxy.example.net:8000')
    ->blockCookieBanners();

file_put_contents('capture.jpg', $shotsmith->take($options));

// In Laravel: Shotsmith::take($options) with SHOTSMITH_ACCESS_KEY in .env
curl -G "https://shotsmith.dev/v1/take" \
  --data-urlencode "access_key=YOUR_ACCESS_KEY" \
  --data-urlencode "url=https://www.example.com" \
  --data-urlencode "stealth=true" \
  --data-urlencode "proxy=http://USERNAME:PASSWORD@proxy.example.net:8000" \
  --data-urlencode "block_cookie_banners=true" \
  -o capture.jpg
import { writeFile } from 'node:fs/promises';

const params = new URLSearchParams({
  access_key: 'YOUR_ACCESS_KEY',
  url: 'https://www.example.com',
  stealth: 'true',
  proxy: 'http://USERNAME:PASSWORD@proxy.example.net:8000',
  block_cookie_banners: 'true',
});

const res = await fetch(`https://shotsmith.dev/v1/take?${params}`);
if (!res.ok) throw new Error((await res.json()).error_message);

await writeFile('capture.jpg', Buffer.from(await res.arrayBuffer()));
import urllib.request
from urllib.parse import urlencode

params = {
    "access_key": "YOUR_ACCESS_KEY",
    "url": "https://www.example.com",
    "stealth": "true",
    "proxy": "http://USERNAME:PASSWORD@proxy.example.net:8000",
    "block_cookie_banners": "true"
}

url = "https://shotsmith.dev/v1/take?" + urlencode(params, doseq=True)

# Raises urllib.error.HTTPError on a 4xx/5xx response
with urllib.request.urlopen(url, timeout=120) as res, open("capture.jpg", "wb") as f:
    f.write(res.read())
<?php

$query = http_build_query([
    'access_key' => 'YOUR_ACCESS_KEY',
    'url' => 'https://www.example.com',
    'stealth' => 'true',
    'proxy' => 'http://USERNAME:PASSWORD@proxy.example.net:8000',
    'block_cookie_banners' => 'true',
], '', '&', PHP_QUERY_RFC3986);

$ch = curl_init('https://shotsmith.dev/v1/take?' . $query);
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 120,
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

if ($status !== 200) {
    throw new RuntimeException(json_decode($body, true)['error_message'] ?? "HTTP {$status}");
}

file_put_contents('capture.jpg', $body);
package main

import (
	"io"
	"net/http"
	"os"
)

func main() {
	res, err := http.Get("https://shotsmith.dev/v1/take?access_key=YOUR_ACCESS_KEY&url=https%3A%2F%2Fwww.example.com&stealth=true&proxy=http%3A%2F%2FUSERNAME%3APASSWORD%40proxy.example.net%3A8000&block_cookie_banners=true")
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()

	if res.StatusCode != http.StatusOK {
		body, _ := io.ReadAll(res.Body)
		panic(string(body))
	}

	out, err := os.Create("capture.jpg")
	if err != nil {
		panic(err)
	}
	defer out.Close()
	io.Copy(out, res.Body)
}
require "net/http"
require "uri"

uri = URI("https://shotsmith.dev/v1/take")
uri.query = URI.encode_www_form([
  ["access_key", "YOUR_ACCESS_KEY"],
  ["url", "https://www.example.com"],
  ["stealth", "true"],
  ["proxy", "http://USERNAME:PASSWORD@proxy.example.net:8000"],
  ["block_cookie_banners", "true"]
])

res = Net::HTTP.get_response(uri)
raise res.body unless res.is_a?(Net::HTTPSuccess)

File.binwrite("capture.jpg", res.body)
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;

public class Capture {
    public static void main(String[] args) throws Exception {
        var client = HttpClient.newHttpClient();
        var request = HttpRequest.newBuilder(URI.create(
            "https://shotsmith.dev/v1/take?access_key=YOUR_ACCESS_KEY&url=https%3A%2F%2Fwww.example.com&stealth=true&proxy=http%3A%2F%2FUSERNAME%3APASSWORD%40proxy.example.net%3A8000&block_cookie_banners=true"
        )).build();

        var res = client.send(request, HttpResponse.BodyHandlers.ofFile(Path.of("capture.jpg")));
        if (res.statusCode() != 200) {
            throw new RuntimeException("HTTP " + res.statusCode());
        }
    }
}
using System;
using System.IO;
using System.Net.Http;

using var http = new HttpClient { Timeout = TimeSpan.FromSeconds(120) };

// Throws HttpRequestException on a 4xx/5xx response
var bytes = await http.GetByteArrayAsync(
    "https://shotsmith.dev/v1/take?access_key=YOUR_ACCESS_KEY&url=https%3A%2F%2Fwww.example.com&stealth=true&proxy=http%3A%2F%2FUSERNAME%3APASSWORD%40proxy.example.net%3A8000&block_cookie_banners=true"
);

await File.WriteAllBytesAsync("capture.jpg", bytes);
Response 200 OK
Content-Type: image/jpeg
X-Capture-Id: 01m8kvpk6jsmeykdfs0wy6awbn
X-Cache: MISS
X-Render-Time: 1796
X-Quota-Limit: 15000
X-Quota-Remaining: 14998
X-RateLimit-Limit: 80
X-RateLimit-Remaining: 79
(the JPEG image)
  • Format: http://user:pass@host:port or https://user:pass@host:port. Special characters in the username or password must be URL-encoded (for example @ becomes %40).
  • SOCKS5 works only without a username and password (socks5://host:port), because Chrome can’t sign in to SOCKS proxies. Most providers offer an HTTP endpoint as well; use that.
  • Your password is safe: it’s used for that render only. Saved captures, the dashboard and webhooks show the proxy with the credentials replaced by ••••.
  • proxy_bypass_hosts lists hosts that skip the proxy, such as fonts.gstatic.com. That saves proxy bandwidth, but keep the site itself on the proxy or it may still block you.
  • It works on every plan, with screenshots, PDFs, videos, Markdown, monitors, bulk and the MCP server.

Which kind of proxy

TypeGood forNotes
ResidentialSites with strong bot protection, and choosing a countryTraffic leaves through home connections, so it looks like a normal visitor. Usually billed per GB.
ISP (static residential)The same, with one fixed addressResidential addresses hosted in a data centre: fast and stable. Billed per address.
MobileThe hardest sitesMobile network addresses are rarely blocked, because thousands of people share each one. The most expensive option.
Data centreChoosing a country on sites without bot protectionCheap and fast, but bot protection blocks these as readily as ours.

For a site that blocked shotsmith, start with residential.

Settings that matter

  • Use a sticky session. Loading one page makes dozens of requests. If each one comes from a different address, bot protection notices. Providers call this “sticky”, “session” or “static” mode: one address for a few minutes. Rotate between captures, not within one.
  • Pick the country in the proxy, not in shotsmith. Most providers choose the country through the username or a dedicated port, and their dashboard builds the exact address. Copy it into proxy as it is.
  • Save bandwidth. Residential proxies charge for every byte. block_ads=true, block_trackers=true and, where you don’t need them, block_resources=media cut most of a page’s weight. A typical news homepage is a few megabytes with them on.
  • Leave time for slow proxies. Residential connections are slower than ours. If renders time out, send async=true for up to 600 seconds instead of the 18-second synchronous limit.

Providers to consider

Any provider that gives you an HTTP proxy address works. These are well-established options with residential addresses, sticky sessions and country targeting. We have no commercial relationship with any of them.

ProviderWhy you might choose it
Bright DataThe largest network, city and carrier targeting, residential, ISP and mobile. Best for difficult sites at volume.
OxylabsLarge residential and ISP pools with strong reliability. Business-focused.
Decodo (formerly Smartproxy)A good balance of price, pool size and an easy dashboard. Small plans available.
IPRoyalPay as you go. Residential traffic you buy doesn’t expire, which suits occasional use.
WebshareLow-cost data centre and residential proxies, with a free tier to test with.

Most offer a trial. Test the exact page you need before you buy: success rates vary by site and by country.

If it still doesn’t work

  • The error stays blocked_by_bot_protection and isn’t billed. Try a sticky session, another country, or an ISP or mobile proxy.
  • network_error usually means the proxy itself refused the connection. Check the address and credentials, and that your plan with the provider still has traffic.
  • Some sites block every automated visitor. Use proxies only for pages you’re allowed to capture, as the acceptable use policy describes.