Screenshot API
thumbs_ready.php
Tells you whether a capture exists, as JSON. If it doesn't, it starts the render, just as thumbs.php does.
GEThttps://api.pagepeeker.com/v2/thumbs_ready.php?size=size&url=url&code=code
Parameters
| Parameter | Description |
|---|---|
urlrequired | The page, as you send it to thumbs.php. |
sizerequired |
|
coderequired | Your API key. Keep it on your server: anyone who sees it can spend your API calls. How accounts are identified covers the one case that goes without it. |
Response
| Field | Meaning |
|---|---|
| IsReady | 1 if a capture can be downloaded, otherwise 0. |
| Error | 1 if the capture failed or the request was refused, otherwise 0. |
| ErrorMessage | Why the request was refused. Only on refused requests; the same text is in the X-PP-Error-Message header. |
// Still rendering
{"IsReady":0,"Error":0}
// Ready to download
{"IsReady":1,"Error":0}
// The page could not be captured
{"IsReady":0,"Error":1}
// The request was refused
{"IsReady":0,"Error":1,"ErrorMessage":"Unknown code"}
Note
IsReady is 1 for any capture on file, including an expired one that is being rendered again. To know a new capture has arrived, read Getting a fresh capture.Each check counts as one API call, so leave a few seconds between them.