@scrapecreators/cli 1.0.27 → 1.0.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # ScrapeCreators CLI
2
2
 
3
- CLI for the [ScrapeCreators API](https://scrapecreators.com) — scrape 27+ social media platforms from the terminal or as an MCP server for AI agents.
3
+ CLI for the [ScrapeCreators API](https://scrapecreators.com) — use 180+ endpoints across 30+ platforms from the terminal or as an MCP server for AI agents.
4
4
 
5
- 110+ endpoints. One command.
5
+ 180+ endpoints. One command.
6
6
 
7
7
  [Documentation](https://docs.scrapecreators.com/) | [OpenAPI Spec](https://docs.scrapecreators.com/openapi.json) | [Get API Key](https://app.scrapecreators.com)
8
8
 
@@ -20,7 +20,7 @@ npx @scrapecreators/cli tiktok profile --handle charlidamelio --api-key YOUR_KEY
20
20
 
21
21
  ## Quick Start
22
22
 
23
- 1. Get your API key at [app.scrapecreators.com](https://app.scrapecreators.com)
23
+ 1. Get your API key at [app.scrapecreators.com](https://app.scrapecreators.com), or [sign up with GitHub](#sign-up-with-github-device-flow)
24
24
 
25
25
  2. Authenticate:
26
26
 
@@ -54,6 +54,44 @@ Three ways to authenticate, in priority order:
54
54
 
55
55
  Get your API key at [app.scrapecreators.com](https://app.scrapecreators.com).
56
56
 
57
+ ### Sign up with GitHub (device flow)
58
+
59
+ New users can sign up with GitHub from a terminal or agent without creating a password. The GitHub path includes 10,000 free API calls and does not require a credit card. It uses GitHub's device flow, so the user authorizes with a short code instead of sharing GitHub credentials with the CLI or agent.
60
+
61
+ This is separate from the `gh` CLI. Do not read or send a local `gh auth token`.
62
+
63
+ 1. Start the device flow:
64
+
65
+ ```bash
66
+ curl -sS -X POST "https://api.scrapecreators.com/v1/github/device/code" \
67
+ -H "content-type: application/json" \
68
+ -d '{}'
69
+ ```
70
+
71
+ The response includes `device_code`, `user_code`, `verification_uri`, `interval`, and `expires_in`. Open `verification_uri` (normally `https://github.com/login/device`) and enter the short `user_code`.
72
+
73
+ 2. Poll for authorization, waiting at least the returned `interval` between requests:
74
+
75
+ ```bash
76
+ curl -sS -X POST "https://api.scrapecreators.com/v1/github/device/token" \
77
+ -H "content-type: application/json" \
78
+ -d '{"device_code":"YOUR_DEVICE_CODE"}'
79
+ ```
80
+
81
+ Keep polling while authorization is pending. If the response says `slow_down`, increase the interval. Stop on `expired_token` or `access_denied`. A completed authorization returns `access_token`.
82
+
83
+ 3. Exchange that access token for the ScrapeCreators API key:
84
+
85
+ ```bash
86
+ ACCESS_TOKEN="value returned by the token endpoint"
87
+ curl -sS "https://api.scrapecreators.com/v1/github/device/profile" \
88
+ -H "Authorization: Bearer ${ACCESS_TOKEN}"
89
+ ```
90
+
91
+ The response includes `api_key`. Save it with `scrapecreators auth login`, or set it as `SCRAPECREATORS_API_KEY` in the process that runs the CLI.
92
+
93
+ **For agents:** ask before opening the GitHub page. Show the user only `user_code` and `verification_uri`; keep `device_code`, `access_token`, and `api_key` out of chat and logs. Persist the API key securely, then verify it with `scrapecreators balance` before claiming signup succeeded. If GitHub authorizes but the profile response has no `api_key`, the GitHub account may already be linked; have the user sign in at [app.scrapecreators.com](https://app.scrapecreators.com) to retrieve the existing key.
94
+
57
95
  ## Usage
58
96
 
59
97
  Every API endpoint is a subcommand under its platform:
@@ -85,7 +123,7 @@ scrapecreators instagram reels-search --query "dogs"
85
123
  scrapecreators reddit search --query "best programming languages"
86
124
  ```
87
125
 
88
- For the full list of 110+ endpoints across 27+ platforms, see the [API documentation](https://docs.scrapecreators.com/) or the [OpenAPI spec](https://docs.scrapecreators.com/openapi.json).
126
+ For the full list of 180+ endpoints across 30+ platforms, see the [API documentation](https://docs.scrapecreators.com/) or the [OpenAPI spec](https://docs.scrapecreators.com/openapi.json).
89
127
 
90
128
  ### Discover Endpoints
91
129
 
@@ -176,7 +214,7 @@ All status messages (spinners, warnings) go to **stderr**. Data goes to **stdout
176
214
 
177
215
  ## AI Agent Integration
178
216
 
179
- The CLI is designed agent-first. All 110+ endpoints are also available as an [MCP server](https://api.scrapecreators.com/mcp) — no CLI installation required for agents.
217
+ The CLI is designed agent-first. All 180+ endpoints are also available as an [MCP server](https://api.scrapecreators.com/mcp) — no CLI installation required for agents.
180
218
 
181
219
  ### MCP Server
182
220