| Title: | Client for the 'Screenshotbase' API |
|---|---|
| Description: | Minimal R client for the 'Screenshotbase' API to render website screenshots and query account status. Provides functions to set the API key, call the status endpoint, and take a screenshot as a raw image response. |
| Authors: | Dominik Kukacka [aut, cre], EverAPI Team [cph] |
| Maintainer: | Dominik Kukacka <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-05-09 07:32:55 UTC |
| Source: | https://github.com/cran/screenshotbase |
Returns quota information for the authenticated account.
screenshotbase_status(apikey = NULL)screenshotbase_status(apikey = NULL)
apikey |
Optional API key to override the session key. |
A named list with status fields.
## Not run: set_api_key("YOUR-API-KEY") screenshotbase_status() ## End(Not run)## Not run: set_api_key("YOUR-API-KEY") screenshotbase_status() ## End(Not run)
Renders a website and returns raw image bytes.
screenshotbase_take( url, format = NULL, quality = NULL, full_page = NULL, viewport_width = NULL, viewport_height = NULL, apikey = NULL )screenshotbase_take( url, format = NULL, quality = NULL, full_page = NULL, viewport_width = NULL, viewport_height = NULL, apikey = NULL )
url |
URL of the website to render (required). |
format |
Image format: one of |
quality |
Integer quality for jpg/jpeg (defaults to 80 on server if not set). |
full_page |
Logical; capture full page. |
viewport_width, viewport_height
|
Integers for viewport size in pixels. |
apikey |
Optional API key to override the session key. |
A raw vector of the image content.
## Not run: set_api_key("YOUR-API-KEY") bytes <- screenshotbase_take("https://bbc.com", format = "png", full_page = TRUE) writeBin(bytes, "screenshot.png") ## End(Not run)## Not run: set_api_key("YOUR-API-KEY") bytes <- screenshotbase_take("https://bbc.com", format = "png", full_page = TRUE) writeBin(bytes, "screenshot.png") ## End(Not run)
Stores the API key in the R session via options, used by subsequent requests.
set_api_key(key)set_api_key(key)
key |
Character scalar, your Screenshotbase API key. |
You can also set environment variable SCREENSHOTBASE_API_KEY for automatic discovery.
Invisibly returns the key.