Getting Started

The quickest way to get started with Urlbox is to use the synchronous GET API.

Request Format

To generate your first render, send a GET request to the following URL:

https://api.urlbox.io/v1/api-key/format?options

Where:

  • api-key is replaced with your Urlbox API key, which you can get by registering for an account

  • format is one of:

    • png
    • jpg or jpeg
    • avif
    • webp
    • pdf
    • svg
    • html
  • options is replaced by a query string that contains all of the options you want to set - for example:

    • url=example.com&full_page=true&width=300

Response Format

When you send a GET request in this way, the Urlbox API will return binary data as the response, with the Content-Type header set to the relevant MIME type for the format requested. For example, if you requested png format, the Content-Type will be image/png and response body will be the actual PNG binary data.

This means that you can insert the request URL directly into an <img> or <meta> tag, and things should just work.

Let's say you want to render a png screenshot of google.com thumbnailed down to 300px wide - you could set an <img> tag's src attribute like so:

<img
  src="https://api.urlbox.io/v1/api-key/png?url=google.com&thumb_width=300"
  alt="Urlbox API thumbnail screenshot of google.com"
/>

and the result would be:

Was this page helpful?