Type: | Package |
Title: | Client for the 'Screenshotbase' API |
Version: | 0.1.0 |
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. |
License: | MIT + file LICENSE |
URL: | https://screenshotbase.com, https://github.com/everapihq |
Encoding: | UTF-8 |
RoxygenNote: | 7.3.2 |
Depends: | R (≥ 3.5) |
Imports: | httr2 (≥ 1.0.0) |
Suggests: | testthat (≥ 3.1.0) |
Config/testthat/edition: | 3 |
NeedsCompilation: | no |
Packaged: | 2025-09-16 08:40:30 UTC; andreasaltheimer |
Author: | Dominik Kukacka [aut, cre], EverAPI Team [cph] |
Maintainer: | Dominik Kukacka <dominik@everapi.com> |
Repository: | CRAN |
Date/Publication: | 2025-09-22 07:50:03 UTC |
Get Screenshotbase status
Description
Returns quota information for the authenticated account.
Usage
screenshotbase_status(apikey = NULL)
Arguments
apikey |
Optional API key to override the session key. |
Value
A named list with status fields.
Examples
## Not run:
set_api_key("YOUR-API-KEY")
screenshotbase_status()
## End(Not run)
Take a website screenshot
Description
Renders a website and returns raw image bytes.
Usage
screenshotbase_take(
url,
format = NULL,
quality = NULL,
full_page = NULL,
viewport_width = NULL,
viewport_height = NULL,
apikey = NULL
)
Arguments
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. |
Value
A raw vector of the image content.
Examples
## 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)
Set Screenshotbase API key
Description
Stores the API key in the R session via options, used by subsequent requests.
Usage
set_api_key(key)
Arguments
key |
Character scalar, your Screenshotbase API key. |
Details
You can also set environment variable SCREENSHOTBASE_API_KEY
for automatic discovery.
Value
Invisibly returns the key.