Endpoints
Screenshot
Description
This endpoint captures a screenshot of a specified URL, with options to customize the viewport, block cookie banners, set a wait time before capturing, and more.
Endpoint
Headers
- Content-Type:
application/json
- Authorization: Bearer
<API_KEY>
(required)
Request Body
Responses
Success (200)
Returns the screenshot data and related information.
- Content-Type: application/json
- X-RateLimit-Limit: The rate limit for the user.
- X-RateLimit-Remaining: The remaining number of requests for the user.
Bad Request (400)
Returned if the request is invalid.
Internal Server Error (500)
Returned if there’s an error during the screenshot process.
Example Request
Example Response
Notes
- The
viewport
width must be less than or equal to 3840 pixels, and the height must be less than or equal to 10240 pixels. - The maximum
wait
time is 5000 milliseconds (5 seconds). - Credit usage:
- Base cost: 2 credits
- Additional 1 credit if
autoScroll
is true - Additional 1 credit if
wait
is set (any non-zero value)
- If the URL doesn’t include a protocol,
https://
will be used by default. - The
clipRectangle
option can only be used whenfullPage
is set to false. - Usage is recorded with detailed parameters for each request.
- Events may be logged to PostHog for analytics purposes if enabled.
Rate Limiting
Rate limit headers (X-RateLimit-Limit
and X-RateLimit-Remaining
) are included in the response to indicate the user’s current rate limit status.