Skip to content

Type an option name like full_page, an error code, or a topic.

Getting started

Take your first screenshot in about a minute. Send one request with a page address and get an image back.

Paste this into a terminal. Swap YOUR_ACCESS_KEY for your own access key.

Request
curl "https://curlshot.com/api/v1/screenshot?access_key=YOUR_ACCESS_KEY&url=https://example.com" \
  --output example.png

You get a file called example.png. It looks like this:

The example.com home page, captured at 1280 by 1024 pixels
The result: example.com at the default size, 1280 x 1024.

That is the whole idea of CurlShot. You send an address, you get back a screenshot of that page.

#Get your access key

An access key is a short code that tells us the request is yours. It is free to get one.

  1. Create an account. You do not need a card.
  2. Confirm your email address. The key does not work until you do.
  3. Open API keys in the dashboard and copy the access key.

The free plan comes with a monthly quota of screenshots, so you can try everything in these docs without paying.

#Take the screenshot from your code

The API is a normal web address, so anything that can fetch a URL can use it. Pick your language:

curl "https://curlshot.com/api/v1/screenshot?access_key=YOUR_ACCESS_KEY&url=https://example.com" \
  --output example.png

Each sample does the same three things: builds the address, fetches it, and saves the bytes to a file.

#Change what you get

Everything else is an option: one more name=value pair in the address. Add an option, get a different screenshot.

This request captures the whole page as a JPEG, sized like an iPhone, with any cookie banner removed:

Request
curl "https://curlshot.com/api/v1/screenshot?access_key=YOUR_ACCESS_KEY\
&url=https://en.wikipedia.org/wiki/Eiffel_Tower\
&viewport_device=iphone_15_pro\
&full_page=true\
&block_cookie_banners=true\
&format=jpeg" \
  --output eiffel.jpg
The Wikipedia article about the Eiffel Tower, rendered at phone width
The result: the same article, as an iPhone 15 Pro would show it.

Here is what each option did:

OptionWhat it changed
viewport_deviceThe page was drawn on a phone-sized screen.
full_pageThe capture runs to the bottom of the page, not just the first screen.
block_cookie_bannersA consent pop-up, if the page shows one, is hidden before the capture.
formatThe file is a JPEG instead of a PNG.

#When something goes wrong

A failed request never returns a broken image. It returns a short message in JSON, a text format for structured data, that says what happened.

This request leaves https:// off the page address:

Request
curl "https://curlshot.com/api/v1/screenshot?access_key=YOUR_ACCESS_KEY&url=example.com"
Response, status 400
{
  "error_code": "invalid_options",
  "error_message": "url: must be a full URL starting with http:// or https://",
  "documentation_url": "https://curlshot.com/docs/errors#invalid_options",
  "errors": [
    {
      "field": "url",
      "message": "must be a full URL starting with http:// or https://"
    }
  ]
}

error_code is a fixed word your code can check. error_message is written for you to read. The errors list comes with invalid_options only: it names each option that was refused.

Failed requests are not counted against your quota. The errors page lists every code with its cause and its fix.

#Where to go next