ScreenshotAPI.net API Response Formats: PNG, JPEG, WebP, and PDF
Choose PNG, JPEG, WebP, or PDF for ScreenshotAPI.net, and learn how file format, response mode, quality, and PDF layout settings work together.
ScreenshotAPI.net documents PNG as its default screenshot file type. Choose PNG for lossless detail and transparency, JPEG/JPG when smaller compressed images matter, WebP for efficient web delivery, and PDF when you need a document with page layout. The file_type parameter selects the file; the separate output parameter selects whether the response contains the file itself or JSON with a URL and metadata.
1. Choose the format for the job
| Format | Good fit | Trade-off |
|---|---|---|
| PNG | Text-heavy pages, visual QA, sharp UI edges, or transparency needs | Lossless output can be larger, especially for photo-heavy pages. |
| JPEG/JPG | Previews, thumbnails, or transfers where a smaller file is useful | Lossy compression can soften small text and interface edges. |
| WebP | Web delivery and storage when the consuming tools support it | Some older tooling supports PNG and JPEG more universally. |
| Reports, print-ready exports, archiving, or multi-page document workflows | Pagination, paper size, and orientation affect the result; PDF is a document format, not another raster encoding. |
These are qualitative trade-offs, not measured ScreenshotAPI.net file-size or image-quality benchmarks. For a capture pipeline, check the actual output with your downstream renderer and storage constraints.
2. Set file type and response mode separately
ScreenshotAPI.net calls the format selector file_type. Its documented options include PNG, JPG/JPEG, WebP, and PDF, with PNG as the default. The output setting controls response shape:
output=imagereturns the generated file in the HTTP response body.output=jsonreturns a JSON response object containing a hosted URL and metadata.
JSON is not an image format. It is a way to receive information about the generated file instead of receiving the binary file directly. The vendor’s Playground example uses file_type=png&output=image and saves the response body as an image file.
Direct image response example
Use the vendor’s current API reference to confirm required authentication and parameter syntax before using this illustrative request. Replace the key and target URL with your own values:
curl -G 'https://shot.screenshotapi.net/screenshot' \
--data-urlencode 'token=YOUR_API_KEY' \
--data-urlencode 'url=https://example.com' \
--data-urlencode 'file_type=png' \
--data-urlencode 'output=image' \
-o capture.png
For a binary image response, write the response body to a file; do not try to parse it as JSON. For JSON output, parse the response as JSON and use the returned URL and metadata according to the current API reference.
3. Configure image quality, density, and background
JPEG quality
The documented image_quality setting accepts a value from 0 to 100 for JPG/JPEG, with 80 as the documented default. Lower values trade image detail for smaller files. The documentation says this setting does not affect PNG, WebP, or PDF. Confirm accepted values against the live docs before relying on exact behavior.
curl -G 'https://shot.screenshotapi.net/screenshot' \
--data-urlencode 'token=YOUR_API_KEY' \
--data-urlencode 'url=https://example.com' \
--data-urlencode 'file_type=jpg' \
--data-urlencode 'image_quality=80' \
--data-urlencode 'output=image' \
-o capture.jpg
Quality is a trade-off to validate with representative pages: inspect small labels, thin borders, and text at the display size your application uses.
Retina density
The retina option requests higher pixel density; the vendor describes it as 2×. Higher density can increase file size and processing time. Use it when sharpness at a scaled display size matters, and account for the extra bytes in storage and transfer planning.
Background omission
omit_background is documented for PNG when a simple white or solid background can be removed. It is not a universal transparency switch for every format, and the documented behavior does not promise removal of complex backgrounds.
4. Choose PDF layout deliberately
PDF requests have document layout settings, including paper format, portrait or landscape orientation, and page range. If paper format and dimensions are omitted, the PDF guide says the page can be rendered as one long page without page breaks. That can suit a full-page capture, but may not be what a printer or document viewer expects.
- Set a paper size when the result must fit a conventional page.
- Choose orientation based on the page’s content width.
- Set a page range when only selected pages are needed.
- Review page breaks and margins in the generated PDF, especially for long pages.
Consult the ScreenshotAPI.net documentation and its PDF guide for the current parameter names and accepted values; those settings can change.
5. Make a request and save the right kind of response
- Choose a file format based on fidelity, transparency, file size, compatibility, or document layout.
- Choose
output=imagefor a direct binary response oroutput=jsonfor the URL and metadata response. - Add format-specific settings only where they apply, such as JPEG quality or PDF layout.
- Save or parse the response according to its content type and verify the resulting file opens as expected.
ScreenshotAPI.net documents both GET and POST requests in its getting-started material. Its fresh=true option can request a current capture when a prior screenshot would otherwise be returned from cache. Verify the live endpoint reference for the request shape and supported settings.
6. Troubleshoot common response problems
| Symptom | Likely cause | What to check |
|---|---|---|
| The saved file is not an image | The response is JSON, an error body, or another non-image response saved with an image extension. | Check output, HTTP status, response headers, and body before saving it as a raster file. |
| JSON parsing fails | The request used direct image output, or the server returned an error response. | Use the JSON response mode and verify the status and content type before parsing. |
| JPEG looks soft around text | Lossy compression or a small capture displayed larger than its pixel dimensions. | Raise JPEG quality, use PNG for text-heavy captures, or consider higher pixel density. |
| PNG is larger than expected | Lossless imagery, photo-heavy content, large dimensions, or higher pixel density. | Consider JPEG or WebP if the receiving system supports it and the quality trade-off is acceptable. |
| Background remains visible | Background omission is documented only for PNG and simple white or solid backgrounds. | Confirm PNG is selected and the page background meets that limitation. |
| PDF has unexpected page breaks or one very long page | Paper dimensions or pagination settings are omitted or unsuitable for the page. | Set paper format, orientation, and page range as needed, then inspect the resulting document. |
| A consumer cannot open WebP | The downstream tool may not support WebP. | Use PNG or JPEG where compatibility is more important, or convert the image in a toolchain that supports WebP. |
7. Performance, reliability, and cost considerations
Format choice affects what your own application stores and transfers: PNG favors lossless detail, JPEG uses lossy compression, and WebP is intended for efficient web delivery. Retina captures can increase both file size and processing time according to the vendor. PDF adds page-layout considerations. The researched documentation does not establish independent quantitative benchmarks, so test representative pages rather than planning around unverified byte savings or capture-time claims.
For reliability, distinguish a direct image response from a JSON response and validate status and content type before consuming the body. If you need a current capture instead of a cached result, the getting-started documentation describes fresh=true; confirm the live API behavior before depending on it. Save useful request metadata alongside captures if your application needs to diagnose format or layout issues later.
8. Or skip the browser setup
If you need a screenshot API rather than managing capture infrastructure, ScreenshotNeo returns PNG, JPEG, WebP, or PDF from one GET request. It removes cookie and consent banners, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, and response headers identify the page verdict and billing status. Its MCP server lets AI agents use screenshot tools. The free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots. Every feature is on every plan.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo API documentation for request options. Sign up free for 1,000 screenshots a month, with no card required.
FAQ
Is JPG different from JPEG here?
JPG and JPEG are names for the same image format; use the spelling accepted by the current API reference.
Should I use PDF for a single screenshot?
Use PDF when the output needs document behavior, such as paper layout or page ranges. For a single image asset, choose a raster format.
Does changing output to JSON change the screenshot’s format?
No. file_type chooses the generated file format; output chooses how the API returns it.


