An online page preview service.

Give us the URL to a web page, we fetch it, parse it and return the JSON data you need to create a page preview.

Try it:

Why use this?

You can't generate these previews yourself on the client side due to cross site scripting security restrictions. Javascript code fetched from one domain will not be allowed by the browser to fetch html from a different domain unless that domain responds with the headers specifically allowing this.

To make this work, typically you have to create a server side service that fetches pages, parses them and returns the data.

We return the right headers so this should work for anyone.

The dirty details:

You can do this either as a GET or a POST request to the following API entry point:

You can request the URL to preview using URL parameters like this:

Or you can pass in the parameter as a application/x-www-form-urlencoded request body:

That's all there is to it.