Page.REST

This is an HTTP API you can use to unfurl and extract content from any web page as JSON. You can get the title, description, open graph, embed content or any other information available at a given public URL (check examples below).

You can use this for building:

You will need an access token to use Page.REST API. An access token costs $5 and will be valid for one year.

Why use this?

You might be wondering why you should use Page.REST API rather than coding it yourself.

Here are some reasons:

How to use

Try the examples to see what API returns. You can edit the code to try different URLs. (alternatively, you can run it on Postman)

Basic

The default request grabs site’s title, description, logo, favicons, canonical URL, status code, and Twitter handle.

Selector queries

This is probably the most useful feature. You can use CSS selectors to retrieve content from matching elements. In the example, we use selectors to retrieve the businesses and their founders featured in IndieHackers. (You can use up to 10 selector queries.)

Pre-render content

Append &prerender=1 to the request URL to extract content from pages that render on client-side using JavaScript. In the example, we extract currently available engineering jobs from Tesla’s career page which is built using React. The selector won’t return anything if you drop the prerender parameter.

Embed content

Append &embed=1 to the request URL to get the oEmbed content for the page as part of the response (only if available).

Open Graph

Append &og=1 to the request URL to get the OpenGraph content for the page as part of the response (only if available).

Response headers

Get any HTTP headers defined in the response. In the example, we check security headers of github.com.

Start building!

Pay to get an access token (one-time fee of $5 and valid for one year).

🎉 Thanks for the payment

Here is your token (it was also emailed to you):