API

Recache

You can use the recache API to cache a URL for the first time or to recache a URL that has been cached previously. This POST request needs to be in JSON format or else it won't work.

The recache API is great for keeping your costs down, letting you set your cache freshness to a high value by using the recache API to supplement pages that change more often.

URL

https://api.prerender.io/recache

Params

{
	"prerenderToken": "YOUR_TOKEN",
	"url": "http://www.example.com/url/to/recache"
}

Example

curl -H "Content-Type: application/json" -d '{"prerenderToken": "YOUR_TOKEN", "url": "http://www.example.com/"}' https://api.prerender.io/recache

Recaching Multiple URLs

The recache API can take up to 1,000 URLs per request. Make sure to change the parameter to "urls" if you want to add more than 1 url per request.

Params

{ 	
	"prerenderToken": "YOUR_TOKEN", 	
	"urls": ["http://www.example.com/url/to/recache", "http://www.example.com/url/to/recache2" 
}

Example

curl -H "Content-Type: application/json" -d '{"prerenderToken": "YOUR_TOKEN", "urls": ["http://www.example.com/url/to/recache", "http://www.example.com/url/to/recache2"}' https://api.prerender.io/recache

Search

The search API lets you search for cached URLs within your account and see the cache status of them.

URL

https://api.prerender.io/search

Params

{
    "prerenderToken": "YOUR TOKEN",
    "query": "example.com/path",
    "start": 0
}
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.