URL to Screenshot
https://api.peekshot.com/api/v1/screenshotsHeaders
| Name | Type | Description |
|---|---|---|
x-api-key* | string | Your unique API key for authentication |
Content-Type* | string | Must be application/json Example: |
Body Parameters
| Name | Type | Description |
|---|---|---|
project_id* | string | Unique project identifier Example: |
url* | string | The website URL to capture Example: |
width | string | Screenshot width (default: 1280) Example: |
height | string | Screenshot height (default: 1024) Example: |
inject_css | string | Custom CSS to apply |
inject_js | string | Custom JavaScript to apply |
file_type | string | jpeg or png (default "jpeg") Example: |
retina | string | ”true” for high-resolution screenshots Example: |
delay | string | Time (in seconds) to wait before capturing Example: |
full_page | string | ”true” to capture the entire page, “false” for viewport only |
disable_javascript | string | ”true” to disable JavaScript execution |
emulate_device | string | how your website appears on different devices Example: |
disable_animations | string | ”true” to disable animations |
proxy_url | string | HTTP proxy URL (supports authentication) Example: |
custom_header | string | Inject custom header into request |
element_selector | string | Target a specific element. Use CSS selector (e.g., “#header”) or XPath with “xpath=” prefix (e.g., “xpath=//div[@id=‘main’]“) |
curl --location 'https://api.peekshot.com/api/v1/screenshots' \
--header 'x-api-key: your-api-key' \
--header 'Content-Type: application/json' \
--data '{
"project_id": "1",
"url": "https://example.com",
"width": "1680",
"height": "867",
"file_type": "jpeg",
"retina": "true",
"delay": "0",
"full_page": "false",
"disable_javascript": "false"
}'Responses
{
"status": "success",
"message": "screenshot request added in queue",
"data": {
"url": "https://example.com",
"requestId": 1,
"creditRequired": 1,
"organizationId": 1
},
"statusCode": 201
}