Full Page Screenshots
By default, DomShot captures only the visible viewport area. Use thefullPage parameter to capture the entire scrollable page.
Basic full page screenshot
bash
curl "https://api.domshot.com/shot?key=YOUR_API_KEY&url=https://example.com&fullPage=true" \
--output fullpage.png
const params = new URLSearchParams({
key: 'YOUR_API_KEY',
url: 'https://example.com',
fullPage: 'true'
});
await fetch(`https://api.domshot.com/shot?${params}`)
.then(res => res.blob())
.then(blob => fs.writeFile('fullpage.png', blob));
$params = [
'key' => 'YOUR_API_KEY',
'url' => 'https://example.com',
'fullPage' => 'true'
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.domshot.com/shot?' . http_build_query($params));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$result = curl_exec($ch);
file_put_contents('fullpage.png', $result);
curl_close($ch);
package main
import (
"net/http"
"net/url"
)
func main() {
params := url.Values{}
params.Set("key", "YOUR_API_KEY")
params.Set("url", "https://example.com")
params.Set("fullPage", "true")
resp, _ := http.Get("https://api.domshot.com/shot?" + params.Encode())
defer resp.Body.Close()
// Save response to file
}
Full page with viewport preset
bash
curl "https://api.domshot.com/shot?key=YOUR_API_KEY&url=https://example.com&fullPage=true&viewportType=mobile" \
--output fullpage-mobile.png
const params = new URLSearchParams({
key: 'YOUR_API_KEY',
url: 'https://example.com',
fullPage: 'true',
viewportType: 'mobile'
});
await fetch(`https://api.domshot.com/shot?${params}`)
.then(res => res.blob())
.then(blob => fs.writeFile('fullpage-mobile.png', blob));
$params = [
'key' => 'YOUR_API_KEY',
'url' => 'https://example.com',
'fullPage' => 'true',
'viewportType' => 'mobile'
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.domshot.com/shot?' . http_build_query($params));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$result = curl_exec($ch);
file_put_contents('fullpage-mobile.png', $result);
curl_close($ch);
package main
import (
"net/http"
"net/url"
)
func main() {
params := url.Values{}
params.Set("key", "YOUR_API_KEY")
params.Set("url", "https://example.com")
params.Set("fullPage", "true")
params.Set("viewportType", "mobile")
resp, _ := http.Get("https://api.domshot.com/shot?" + params.Encode())
defer resp.Body.Close()
// Save response to file
}
Full page with custom format
bash
curl "https://api.domshot.com/shot?key=YOUR_API_KEY&url=https://example.com&fullPage=true&format=jpeg&quality=80" \
--output fullpage.jpg
const params = new URLSearchParams({
key: 'YOUR_API_KEY',
url: 'https://example.com',
fullPage: 'true',
format: 'jpeg',
quality: '80'
});
await fetch(`https://api.domshot.com/shot?${params}`)
.then(res => res.blob())
.then(blob => fs.writeFile('fullpage.jpg', blob));
$params = [
'key' => 'YOUR_API_KEY',
'url' => 'https://example.com',
'fullPage' => 'true',
'format' => 'jpeg',
'quality' => '80'
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.domshot.com/shot?' . http_build_query($params));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$result = curl_exec($ch);
file_put_contents('fullpage.jpg', $result);
curl_close($ch);
package main
import (
"net/http"
"net/url"
)
func main() {
params := url.Values{}
params.Set("key", "YOUR_API_KEY")
params.Set("url", "https://example.com")
params.Set("fullPage", "true")
params.Set("format", "jpeg")
params.Set("quality", "80")
resp, _ := http.Get("https://api.domshot.com/shot?" + params.Encode())
defer resp.Body.Close()
// Save response to file
}
Viewport vs Full Page
| Feature | Viewport (default) | Full Page |
|---|---|---|
| Capture area | Visible area only | Entire scrollable page |
| Processing time | Fast | Slower (depends on page length) |
| File size | Consistent | Varies with page length |
| Best for | Hero sections, previews | Documentation, archiving |
Performance considerations
Full page screenshots have longer processing times and larger file sizes. Consider these factors:
- Very long pages may exceed processing timeout
- File size increases with page length
- Higher quality settings multiply file size
- Use JPEG or WebP format for long pages to reduce file size
- Set quality to 80-90 for good balance of size and clarity
- Consider breaking very long pages into sections
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
fullPage | boolean | false | Capture the full scrollable page instead of viewport |
See also
- Viewport Presets - Device sizes and dimensions
- Image Formats - PNG, JPEG, WebP options