Skip to main content

socialscrape-cli

socialscrape: social media data on the command line, as JSON for scripts and agents or a table for people. Python 3.10+, one dependency (httpx).

pip install socialscrape-cli        # or: pipx install socialscrape-cli
socialscrape login                  # paste your key once (saved to ~/.config/socialscrape/config.json, mode 600)

socialscrape github user torvalds
socialscrape transcript "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
socialscrape search threads "open source" -o table
socialscrape threads profile-posts zuck --pages 3
socialscrape ad-libraries facebook-search nike --region US --all --max-credits 5
socialscrape credits

The CLI reads the same endpoint catalog as the socialscrape-mcp server, so a platform appears here in the release after its endpoints are built. It uses plain httpx and needs no other SocialScrape package.

Commands

socialscrape <platform> <resource> [value] [--param value] Any endpoint. socialscrape github --help lists a platform's resources, socialscrape github user --help the parameters. Resource names use hyphens: profile.posts is profile-posts (dots and underscores also work).
transcript URL Transcript of a video or post on any supported platform.
profile, post, comments, search PLATFORM VALUE The same job on any platform that has it (search takes --kind). Shortcuts for <platform> <resource>.
credits, usage [daily|routes], job ID Balance, request history, an async job. All free.
batch FILE|- Up to 100 requests in one call from JSON: [{"endpoint": "github.user", "params": {"handle": "torvalds"}}].
monitors list|create|delete|test|deliveries|events|redeliver Webhook monitors.
endpoints [PLATFORM] What can be called.
login, logout, config Save, remove, show (masked) the key.

The positional value is the resource's main parameter; the form is detected (a URL goes to url, anything else to handle, id or query). Every parameter is also a flag (--handle, --url, --sort, --limit, --region, ...), with the API's aliases (--username).

Output

  • stdout is data only: pretty JSON on a terminal, compact JSON in a pipe. -o table and -o ndjson (one item per line) change the format; --envelope prints the whole response (data, credits_charged, cursor, ...); --raw asks for the platform's original object (raw=true) and prints the whole response.
  • stderr carries the price: credits charged: 1 | remaining: 4999. -q silences it.
  • --dry-run prints the request and what it would cost and sends nothing (no key needed).

Paging

--pages N follows the cursor up to N pages; --all follows it to the end (cap --max-pages, default 50). Each page costs credits, so bound it: --max-items N, --max-credits N. The merged result is one list with every item; if a later page fails you still get the earlier ones.

Exit codes

0 ok, 1 API error (not found, private, invalid parameters, ...), 2 usage error (nothing was sent, nothing charged), 3 key or credits (unauthorized, forbidden, insufficient_credits), 4 retryable (rate limited, upstream blocked or timed out, network). Failures are free.

Key and server

The key comes from --key, then $SOCIALSCRAPE_API_KEY, then the saved config. login checks the key against the API before it saves anything. --api-url or $SOCIALSCRAPE_API_URL points at another server (default https://api.socialscrape.dev).

Metadata

Release files for socialscrape-cli 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for socialscrape-cli 0.1.0
File Size Uploaded Provenance Actions
socialscrape_cli-0.1.0.tar.gz 58.6 kB Without provenance Details for socialscrape_cli-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for socialscrape-cli 0.1.0
File Interpreter ABI Platform Actions
socialscrape_cli-0.1.0-py3-none-any.whl Python 3 none any Details for socialscrape_cli-0.1.0-py3-none-any.whl

Total release size: 118.8 kB

Release files / socialscrape_cli-0.1.0.tar.gz

Download URL socialscrape_cli-0.1.0.tar.gz
Size 58.6 kB
Tags Source
SHA-256 checksum
How to use checksums
4edad75c54ba8516e9e9abc1f0f0d031fc6ba7845fd19b7d1afddff38b1f7dfd
BLAKE2b-256 checksum
How to use checksums
05bc41f2f6ce841f8047423663dbd9ab54045318a626c6252d5d39d7e89d10d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / socialscrape_cli-0.1.0-py3-none-any.whl

Download URL socialscrape_cli-0.1.0-py3-none-any.whl
Size 60.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f74bc296902c92066889a2951dc3e27551b7eb69e1fc30cc8a658900d0eb66dc
BLAKE2b-256 checksum
How to use checksums
e725a6a9b385820c6348464b8f78a9da986764b3ca1fa2d6bd4ae60aaa7523b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for socialscrape-cli 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page