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:

Where:

  • api-key should be replaced by your urlbox API key which you can get by registering for an account.
  • format can be either:
    • png
    • jpg or jpeg
    • avif
    • webp
    • pdf
    • svg
    • html
  • options should be replaced by a query string that contains all of the options you want to set.
    • e.g. 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> tag or <meta> tag and things should just work.

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:

Downloading image...

Was this page helpful?