Integrations
ScrapeAtlas CLI
Call the ScrapeAtlas API from your terminal. Discover endpoints, retrieve public social data, and pipe complete JSON into your scripts.
Install
Requires Node.js 22 or newer and a ScrapeAtlas customer API key.
npm install -g @scrapeatlas/cli
scrapeatlas auth login
scrapeatlas bluesky profile --handle bsky.app --prettyYou can also explore commands without a global installation or an API key:
npx @scrapeatlas/cli listAuthenticate
Create a key in your API-key dashboard, then run scrapeatlas auth login. The hidden prompt verifies your key with the gateway before saving it.
scrapeatlas auth login
scrapeatlas auth status
scrapeatlas auth logoutFor scripts and CI, set SCRAPEATLAS_API_KEY in your environment. A request uses --api-key first, then the environment variable, then the stored login. Prefer the environment variable over a flag that could appear in shell history.
Stored keys live in ~/.config/scrapeatlas/config.json by default, protected by owner-only file permissions on POSIX. XDG_CONFIG_HOME and SCRAPEATLAS_CONFIG_DIR can change this location. Keys are stored in plaintext and used only for the gateway origin where they were verified. auth status reports the credential source without making a network request. Logout removes the stored key; it does not revoke it or clear environment variables.
The default gateway is https://api.scrapeatlas.com. For a custom gateway, use --base-url or SCRAPEATLAS_BASE_URL; HTTPS is required except for HTTP on loopback. See API authentication for key revocation and credit rules.
Find an endpoint
Each CLI release bundles an endpoint catalog. Use the commands below to see what your installed version supports; newly added API endpoints may require a later CLI release. Endpoint help lists parameters, and JSON discovery includes the full request schema and availability.
scrapeatlas list
scrapeatlas list bluesky
scrapeatlas bluesky profile --help
scrapeatlas list bluesky --json
scrapeatlas usage account-usage --helpUse scrapeatlas <platform> <action>, or call an operation by its stable ID:
scrapeatlas bluesky profile --handle bsky.app
scrapeatlas call blueskyProfile --input '{"handle":"bsky.app"}'Refer to the Bluesky profile endpoint for response fields. Catalog inclusion does not guarantee source availability: API failures and partial coverage remain explicit.
Pass parameters and paginate
Flags accept original API names and kebab-case aliases: --user_id and --user-id identify the same parameter. Use --input for arrays, nested objects, or a JSON file. Unknown options, duplicates, missing required parameters, and structural bounds are checked before the request; the gateway validates remaining endpoint rules.
scrapeatlas bluesky posts --handle bsky.app --limit 10
scrapeatlas bluesky posts --handle bsky.app --cursor '<returned-cursor>'
scrapeatlas reddit search --input @request.jsonUse the cursor returned by the previous response exactly as supplied. Each invocation retrieves one bounded response. A successful retrieval costs one credit, including usable partial results; account usage and authentication checks cost zero.
Use the JSON output
Data goes to stdout; diagnostic errors go to stderr. Nulls, ordering, pagination tokens, coverage warnings, and failure bodies are preserved.
scrapeatlas bluesky profile --handle bsky.app | jq '.followersCount'
scrapeatlas bluesky profile --handle bsky.app --pretty
scrapeatlas bluesky profile --handle bsky.app --output profile.json
scrapeatlas bluesky profile --handle bsky.app --envelope| Option | Result |
|---|---|
--pretty | Indent JSON; default output is compact JSON. |
--output <file> | Write a new JSON file and print its absolute path. Existing paths are rejected before a request. |
--envelope | Wrap the response as {httpStatus, body, requestId?, retryAfter?}. |
--input <json> | Supply a request object, or use @file.json to load it from a file. |
--timeout <ms> | Set a total deadline from 1 to 120000 milliseconds; default 90000. |
Handle failures and limits
| Exit code | Meaning |
|---|---|
0 | Usable response, including partial results; inspect status and coverage. |
1 | HTTP, network, timeout, or explicit API failure. Returned API JSON stays on stdout. |
2 | Invalid arguments, configuration, or file operation. |
130 | Login cancelled with Ctrl-C. |
No automatic retries or pagination. The CLI never follows redirects or downloads media. Inputs are capped at 64 KiB and responses at 16 MiB; the timeout includes reading the response body. HTTP 200 can still contain a failed or challenged result and exit 1. JSON export is available in this release.
See Errors & responses for API outcomes and the npm README for the complete command reference.