Skip to content

Rest API Documentation (v1)

Navid Kabir edited this page Sep 12, 2020 · 5 revisions

Intro

The Rest API documentation is relatively straight-forward. It has the name of the endpoint, URL, method, and the parameters required to call it. Every endpoint should have an example and response that should be provided by the endpoint.

Endpoints

Capture

Renders a website into an image and then sends the client the file stream.

URL /api/v1/capture?url=x&size=1280x720&variousOptions=x
Method GET

Params
None

Query Params
url: String - Url starting with http:// or https://.

size: String - The size at which the page should be rendered at. Format: WidthxHeight Example: 1920x1080

ttl: Number - Optional. In Seconds. Set the expiration date of the image in seconds. The default is 84600 seconds (1 day). The maximum is 604800 seconds (1 week).

nocache: Boolean - Optional. Set true if you don't want caching. (Not caching will incur costs upon repeatedly calling the same endpoint!)

many options - There are many options not shown here for brevity. If you want to read more on the various features available, check out pageres

Example
GET /api/v1/capture?url=https://google.com&sizes=400x800&crop=true

Response

'application/octet-stream' file download
Clone this wiki locally