creatorriver 0.6.1 → 0.8.0
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 +17 -3
- package/dist/creatorriver.js +472 -47
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -22,21 +22,35 @@ Behind a proxy, set `HTTPS_PROXY` (and `NO_PROXY` for hosts to reach directly).
|
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
24
|
creatorriver account
|
|
25
|
+
creatorriver pricing --charged-only
|
|
26
|
+
creatorriver credits --days 30
|
|
25
27
|
creatorriver campaigns create --brief "Skincare brand looking for US beauty creators" --status active
|
|
26
28
|
creatorriver creators search --query "US beauty creators reviewing skincare" --platforms youtube,tiktok --campaign-id <campaign-id>
|
|
27
29
|
creatorriver searches expand --search-id <search-id> --limit 40
|
|
28
30
|
creatorriver creators browse --platforms youtube --markets us --offset 20 --limit 20
|
|
31
|
+
creatorriver creators browse --campaign-id <campaign-id> --limit 20
|
|
32
|
+
creatorriver creators find --reference "Marques Brownlee"
|
|
29
33
|
creatorriver trends videos --platform tiktok --window 24h
|
|
30
34
|
creatorriver trends hashtags --platform tiktok
|
|
35
|
+
creatorriver lists create --name "Q4 Skincare Shortlist"
|
|
36
|
+
creatorriver lists add --list-id <list-id> --creator-ids <first-id>,<second-id>
|
|
37
|
+
creatorriver exports preview --list-id <list-id>
|
|
38
|
+
creatorriver exports prepare --creator-ids <first-id>,<second-id>
|
|
39
|
+
creatorriver lists export --list-id <list-id>
|
|
40
|
+
creatorriver campaigns export --campaign-id <campaign-id> --no-include-email
|
|
31
41
|
creatorriver contacts reveal --campaign-id <campaign-id> --creator-id <creator-id>
|
|
32
|
-
creatorriver contacts reveal-batch --campaign-id <campaign-id> --creator-ids <first-id>,<second-id>
|
|
42
|
+
creatorriver contacts reveal-batch --campaign-id <campaign-id> --creator-ids <first-id>,<second-id> --dry-run
|
|
33
43
|
creatorriver emails send --campaign-id <campaign-id> --creator-id <creator-id> --subject "Partnership" --body "Hi! ..."
|
|
34
44
|
creatorriver conversations get --campaign-id <campaign-id> --creator-id <creator-id>
|
|
35
45
|
creatorriver campaigns status --campaign-id <campaign-id>
|
|
36
46
|
```
|
|
37
47
|
|
|
38
|
-
|
|
48
|
+
Call `creatorriver pricing` to inspect unit credit prices, plans, daily limits and the structured cost of every operation before spending; call `creatorriver credits` to review recent spend and bounce refunds. Every credit-spending command (`creators unlock`, `campaigns add`, `contacts reveal`, `contacts reveal-batch`, `exports prepare`, `emails send`) returns a `credits` receipt (`charged`, `balance`, `breakdown`) and supports `--dry-run` to preview the request and estimated maximum credit cost without calling the API.
|
|
39
49
|
|
|
40
|
-
|
|
50
|
+
Saving creators to custom lists (`lists create`, `lists add`, `creators save`) is free; handles, profile links and emails stay hidden until unlocked or revealed. Use `exports preview` to inspect exact unlock and email costs, `exports prepare` (up to 10 creators per call) to unlock profiles and optionally reveal emails, and `searches export`, `lists export` or `campaigns export` to download CSV (pass `--no-include-email` on any export or prepare command to omit emails and unlock profiles only).
|
|
51
|
+
|
|
52
|
+
To find new prospects, pass `--exclude-contacted` to `creators search`, `creators browse` or `creators similar`. Use `--exclude-exported` or `--exclude-uploaded` to also omit past exports or the list uploaded on the website, and `--has-recent-viral` to narrow `creators search` or `creators browse` to creators with a 10x+ breakout video in the last 30 days. Filtered browsing counts toward the search allowance shown by `account` (paging the same filtered list that day with `--offset`, or expanding a same-day search with `searches expand`, uses no extra allowance). Unpaid accounts with less than 0.5 credits drop to 5 searches a day until any purchase. Free and one-time credit-pack accounts can send up to 100 free outreach emails/day; active Pro subscriptions allow up to 200/day (emails 101-200 cost 0.1 credits each). For a follow-up in an existing conversation you can omit `--subject`. Boolean flags also accept `--no-<flag>` (e.g. `--no-include-email`, `--no-archived`).
|
|
53
|
+
|
|
54
|
+
Every command prints one line of JSON: `{"ok":true,"data":...}` on stdout, or `{"ok":false,"error":{"code","message","requestId"}}` on stderr with an exit code per error: 1 internal, 2 invalid_input, 3 unauthorized, 4 not_found, 5 conflict, 6 insufficient_credits, 7 rate_limited, 8 network_error, 9 login_pending. Each command's `--help` lists its flags, what it costs and what it needs first. `--input-json '{...}'` passes the whole input as JSON, and `--dry-run` previews the request and upper-bound credit cost locally.
|
|
41
55
|
|
|
42
56
|
The same operations are available as an MCP server at `https://www.creatorriver.com/api/mcp` and as a REST API at `https://www.creatorriver.com/api/v1`, both with `Authorization: Bearer <key>`.
|
package/dist/creatorriver.js
CHANGED
|
@@ -78,6 +78,21 @@ import { z as z2 } from "zod";
|
|
|
78
78
|
function defineOperation(spec) {
|
|
79
79
|
return spec;
|
|
80
80
|
}
|
|
81
|
+
function estimateMaxOperationCredits(operation, input = {}) {
|
|
82
|
+
const { cost } = operation;
|
|
83
|
+
if (cost.model === "free" || cost.model === "quota") {
|
|
84
|
+
return 0;
|
|
85
|
+
}
|
|
86
|
+
const perUnit = operation.name === "prepare_export" && input.includeEmail === false ? 0.5 : cost.maxCreditsPerUnit ?? 0;
|
|
87
|
+
if (perUnit <= 0) {
|
|
88
|
+
return 0;
|
|
89
|
+
}
|
|
90
|
+
const count2 = Array.isArray(input.creatorIds) ? new Set(
|
|
91
|
+
input.creatorIds.filter((item) => typeof item === "string").map((item) => item.trim()).filter(Boolean)
|
|
92
|
+
).size : 1;
|
|
93
|
+
const boundedCount = cost.maxUnitsPerCall ? Math.min(count2, cost.maxUnitsPerCall) : count2;
|
|
94
|
+
return Math.round(perUnit * boundedCount * 10) / 10;
|
|
95
|
+
}
|
|
81
96
|
|
|
82
97
|
// ../contract/src/path.ts
|
|
83
98
|
var PARAM = /^\{(\w+)\}$/;
|
|
@@ -102,11 +117,98 @@ function fillPath(template, input) {
|
|
|
102
117
|
|
|
103
118
|
// ../contract/src/operations.ts
|
|
104
119
|
import { z as z3 } from "zod";
|
|
120
|
+
var FREE_COST = {
|
|
121
|
+
model: "free",
|
|
122
|
+
label: "Free"
|
|
123
|
+
};
|
|
124
|
+
var SEARCH_QUOTA_COST = {
|
|
125
|
+
model: "quota",
|
|
126
|
+
label: "Free (daily search quota)",
|
|
127
|
+
quota: "daily_search",
|
|
128
|
+
note: "0 credits; counts toward the daily search allowance (20/day unpaid, 5/day unpaid with < 0.5 credits, 500/day after any purchase). Same-day repeat queries use no extra allowance."
|
|
129
|
+
};
|
|
130
|
+
var BROWSE_QUOTA_COST = {
|
|
131
|
+
model: "quota",
|
|
132
|
+
label: "Free (filtered lists use daily search quota)",
|
|
133
|
+
quota: "daily_search",
|
|
134
|
+
note: "0 credits; default unfiltered browse and same-day paging use no allowance. Filtered lists count once per day against the daily search allowance."
|
|
135
|
+
};
|
|
136
|
+
var EXPAND_QUOTA_COST = {
|
|
137
|
+
model: "quota",
|
|
138
|
+
label: "Free (older searches use daily search quota)",
|
|
139
|
+
quota: "daily_search",
|
|
140
|
+
note: "0 credits; expanding a search from today uses no extra allowance, while expanding an older search counts as one daily search."
|
|
141
|
+
};
|
|
142
|
+
var UNLOCK_COST = {
|
|
143
|
+
model: "per_item",
|
|
144
|
+
label: "0.5 credits (first time)",
|
|
145
|
+
actions: ["creator_unlock"],
|
|
146
|
+
unit: "creator",
|
|
147
|
+
maxCreditsPerUnit: 0.5,
|
|
148
|
+
maxUnitsPerCall: 1,
|
|
149
|
+
idempotent: true,
|
|
150
|
+
note: "Charged once per account and creator; repeat unlocks are free."
|
|
151
|
+
};
|
|
152
|
+
var ADD_CREATOR_COST = {
|
|
153
|
+
model: "per_item",
|
|
154
|
+
label: "0.5 credits (first unlock)",
|
|
155
|
+
actions: ["creator_unlock"],
|
|
156
|
+
unit: "creator",
|
|
157
|
+
maxCreditsPerUnit: 0.5,
|
|
158
|
+
maxUnitsPerCall: 1,
|
|
159
|
+
idempotent: true,
|
|
160
|
+
note: "Unlocks the creator if not yet unlocked (0 credits if already unlocked). Use add_to_list to shortlist for free."
|
|
161
|
+
};
|
|
162
|
+
var REVEAL_CONTACT_COST = {
|
|
163
|
+
model: "per_item",
|
|
164
|
+
label: "Up to 0.7 credits (0.5 unlock + 0.2 email)",
|
|
165
|
+
actions: ["creator_unlock", "contact_reveal"],
|
|
166
|
+
unit: "creator",
|
|
167
|
+
maxCreditsPerUnit: 0.7,
|
|
168
|
+
maxUnitsPerCall: 1,
|
|
169
|
+
idempotent: true,
|
|
170
|
+
note: "0.5 first unlock + 0.2 first email reveal (0 if already paid; skipped with 0 charge when no email exists). Bounced or dropped emails refund 0.2 credits."
|
|
171
|
+
};
|
|
172
|
+
var REVEAL_CONTACTS_COST = {
|
|
173
|
+
model: "per_item",
|
|
174
|
+
label: "Up to 0.7 credits/creator (max 10)",
|
|
175
|
+
actions: ["creator_unlock", "contact_reveal"],
|
|
176
|
+
unit: "creator",
|
|
177
|
+
maxCreditsPerUnit: 0.7,
|
|
178
|
+
maxUnitsPerCall: 10,
|
|
179
|
+
idempotent: true,
|
|
180
|
+
note: "Per available creator: 0.5 first unlock + 0.2 first email reveal. Creators with no email are skipped before charging. Call preview_export with creatorIds first for an exact quote."
|
|
181
|
+
};
|
|
182
|
+
var PREPARE_EXPORT_COST = {
|
|
183
|
+
model: "per_item",
|
|
184
|
+
label: "Up to 0.7 credits/creator (0.5 without email; max 10)",
|
|
185
|
+
actions: ["creator_unlock", "contact_reveal"],
|
|
186
|
+
unit: "creator",
|
|
187
|
+
maxCreditsPerUnit: 0.7,
|
|
188
|
+
maxUnitsPerCall: 10,
|
|
189
|
+
idempotent: true,
|
|
190
|
+
note: "0.5 first unlock + optional 0.2 first email reveal when includeEmail is true (default). Call preview_export first for an exact quote."
|
|
191
|
+
};
|
|
192
|
+
var SEND_EMAIL_COST = {
|
|
193
|
+
model: "overage",
|
|
194
|
+
label: "First 100/day free, then 0.1 credits/email",
|
|
195
|
+
actions: ["outreach_email"],
|
|
196
|
+
unit: "email",
|
|
197
|
+
maxCreditsPerUnit: 0.1,
|
|
198
|
+
maxUnitsPerCall: 1,
|
|
199
|
+
idempotent: true,
|
|
200
|
+
quota: "daily_outreach",
|
|
201
|
+
note: "First 100 emails/day free (free and credit-pack accounts cap at 100/day; active Pro subscriptions allow up to 200/day at 0.1 credits each past 100). Failed or bounced emails refund usage and credits."
|
|
202
|
+
};
|
|
105
203
|
var searchId = z3.string().trim().min(1).describe(
|
|
106
204
|
"Search id, from search_creators, find_similar_creators or list_searches"
|
|
107
205
|
);
|
|
108
206
|
var creatorId = z3.string().trim().min(1).describe("Creator id, from search_creators results");
|
|
109
207
|
var campaignId = z3.string().trim().min(1).describe("Campaign id, from list_campaigns or create_campaign");
|
|
208
|
+
var listId = z3.string().trim().min(1).describe("List id, from list_lists or create_list");
|
|
209
|
+
var includeEmailColumn = z3.boolean().optional().describe(
|
|
210
|
+
"Include the Email column (default true). Pass false to omit emails"
|
|
211
|
+
);
|
|
110
212
|
var limit = (max, fallback) => z3.number().int().min(1).max(max).optional().describe(`How many to return, 1-${max} (default ${fallback})`);
|
|
111
213
|
var count = (what) => z3.number().int().min(0).optional().describe(what);
|
|
112
214
|
var PLATFORMS = ["youtube", "instagram", "tiktok"];
|
|
@@ -149,10 +251,44 @@ var getAccount = defineOperation({
|
|
|
149
251
|
method: "GET",
|
|
150
252
|
path: "/account",
|
|
151
253
|
kind: "read",
|
|
254
|
+
cost: FREE_COST,
|
|
152
255
|
summary: "Show the credit balance, prices and today\u2019s usage",
|
|
153
|
-
description: "Returns the credit balance,
|
|
256
|
+
description: "Returns the credit balance, unit prices, a summary of all credit-spending and quota-limited operations, the plan, paid status, the maximum results per search, and today\u2019s usage against daily limits (unpaid accounts with less than 0.5 credits drop to 5 searches a day until any purchase; free and one-time credit-pack accounts cap at 100 outreach emails/day while active Pro subscriptions allow up to 200/day). Free. Call it first to confirm the API key works, and call get_pricing for the full per-operation catalog and plans.",
|
|
154
257
|
input: z3.object({})
|
|
155
258
|
});
|
|
259
|
+
var getPricing = defineOperation({
|
|
260
|
+
name: "get_pricing",
|
|
261
|
+
command: ["pricing"],
|
|
262
|
+
method: "GET",
|
|
263
|
+
path: "/pricing",
|
|
264
|
+
kind: "read",
|
|
265
|
+
cost: FREE_COST,
|
|
266
|
+
summary: "List prices, plans, limits and per-operation costs",
|
|
267
|
+
description: "Returns the complete Creator River pricing catalog so an agent can plan strategy and budget without trial calls: unit credit prices, credit packs and subscriptions (matching the SaaS pricing page), daily limits by tier (free, one-time credit pack, active Pro subscription), refund policies, and the structured cost of every operation across REST, MCP and CLI. Free. Pass chargedOnly: true to list only credit-spending or quota-limited operations, or group to narrow to one command group.",
|
|
268
|
+
input: z3.object({
|
|
269
|
+
chargedOnly: z3.boolean().optional().describe(
|
|
270
|
+
"Only include operations that charge credits or consume a daily quota (default false, returns all operations)"
|
|
271
|
+
),
|
|
272
|
+
group: z3.string().trim().min(1).max(40).optional().describe(
|
|
273
|
+
"Only include operations in this command group, e.g. creators, contacts, exports, emails, campaigns, lists, searches, trends"
|
|
274
|
+
)
|
|
275
|
+
})
|
|
276
|
+
});
|
|
277
|
+
var getCreditHistory = defineOperation({
|
|
278
|
+
name: "get_credit_history",
|
|
279
|
+
command: ["credits"],
|
|
280
|
+
method: "GET",
|
|
281
|
+
path: "/account/credits",
|
|
282
|
+
kind: "read",
|
|
283
|
+
cost: FREE_COST,
|
|
284
|
+
summary: "Show credit spending summary and transaction history",
|
|
285
|
+
description: "Returns the current credit balance, an aggregated spending and refund summary by action over the requested day window, and recent credit transactions (unlocks, email reveals, outreach overages, bounce refunds, signup gift and purchases). Free.",
|
|
286
|
+
input: z3.object({
|
|
287
|
+
days: z3.number().int().min(1).max(90).optional().describe("Recent UTC days to summarize and list, 1-90 (default 30)"),
|
|
288
|
+
limit: limit(100, 50),
|
|
289
|
+
offset: z3.number().int().min(0).optional().describe("Skip this many transactions for paging (default 0)")
|
|
290
|
+
})
|
|
291
|
+
});
|
|
156
292
|
var accountExclusionFilters = {
|
|
157
293
|
excludeContacted: z3.boolean().optional().describe(
|
|
158
294
|
"Exclude this account\u2019s contacted or do-not-contact creators across all campaigns"
|
|
@@ -203,6 +339,7 @@ var searchCreators = defineOperation({
|
|
|
203
339
|
method: "POST",
|
|
204
340
|
path: "/searches",
|
|
205
341
|
kind: "read",
|
|
342
|
+
cost: SEARCH_QUOTA_COST,
|
|
206
343
|
summary: "Find creators by description and filters",
|
|
207
344
|
description: "Searches the creator database by meaning: describe the creators you want in plain words (niche, content, audience), and optionally narrow by platform, niche, creator country, audience country, language, size, engagement rate and how recently they posted. To find creators like ones the user already knows, pass their handles or profile links as exampleCreators. A new search counts toward the daily search allowance and costs no credits. Repeating the same successful search that day uses no extra allowance (see get_account). Results show each creator\u2019s name and account state (identityUnlocked, emailUnlocked, isSaved, campaignMemberships), but no handle or profile link, plus pagination; call expand_search to load more unseen results into the same search. Pass campaignId to rank against that campaign\u2019s brief and record the search in it.",
|
|
208
345
|
input: z3.object({
|
|
@@ -223,10 +360,14 @@ var browseCreators = defineOperation({
|
|
|
223
360
|
method: "GET",
|
|
224
361
|
path: "/creators/browse",
|
|
225
362
|
kind: "read",
|
|
226
|
-
|
|
227
|
-
|
|
363
|
+
cost: BROWSE_QUOTA_COST,
|
|
364
|
+
summary: "List creators by filters or campaign taste",
|
|
365
|
+
description: "Lists the creators that match the filters with no description to match, as the dashboard\u2019s Discover list does before a search. Without campaignId, results are ordered most followed first; with campaignId, results are ranked by that campaign\u2019s taste profile (brief, saved, added, revealed and excluded creators) and fall back to most-followed when no signals exist yet, indicated by ranking (campaign_taste or top_followed). An offset already at the account limit returns an empty page with ranking set to null. Browsing costs no credits and respects maxSearchResults (50 unpaid, 100 paid). Pass offset (from pagination.nextOffset) to read further pages. A filtered list uses the daily search allowance; paging through the same filtered list that day, or reading the default unfiltered list, uses no extra allowance. Browse lists stay out of search history. Use it for asks like the biggest beauty creators in the US or fresh picks for an active campaign; use search_creators when the user describes what the content should be about. Results show names and account state (identityUnlocked, emailUnlocked, isSaved, campaignMemberships), but no handles.",
|
|
228
366
|
input: z3.object({
|
|
229
367
|
...creatorFilters,
|
|
368
|
+
campaignId: campaignId.optional().describe(
|
|
369
|
+
"Rank by this campaign\u2019s taste profile instead of pure follower count; falls back to most-followed when no signals exist yet"
|
|
370
|
+
),
|
|
230
371
|
offset: z3.number().int().min(0).optional().describe(
|
|
231
372
|
"Skip this many top results to read the next page (default 0). Use pagination.nextOffset from the previous call"
|
|
232
373
|
),
|
|
@@ -239,11 +380,12 @@ var findCreator = defineOperation({
|
|
|
239
380
|
method: "GET",
|
|
240
381
|
path: "/creators/lookup",
|
|
241
382
|
kind: "read",
|
|
242
|
-
|
|
243
|
-
|
|
383
|
+
cost: FREE_COST,
|
|
384
|
+
summary: "Find a creator by handle, profile link or name",
|
|
385
|
+
description: "Looks up a creator the user names by @handle, profile link or display name. An explicit @handle or profile link returns exact matches across platforms ordered by followers descending; a plain name returns up to 8 matching candidates. Returns creatorId, followers and account state (isSaved, identityUnlocked, emailUnlocked, campaignMemberships) for get_creator, find_similar_creators, add_creator or reveal_contact. Free. An empty list means no creator matched that reference.",
|
|
244
386
|
input: z3.object({
|
|
245
387
|
reference: z3.string().trim().min(1).max(300).describe(
|
|
246
|
-
"An @handle
|
|
388
|
+
"An @handle, profile link, or creator name, e.g. @mkbhd, https://www.youtube.com/@mkbhd, or Marques Brownlee"
|
|
247
389
|
)
|
|
248
390
|
})
|
|
249
391
|
});
|
|
@@ -253,8 +395,9 @@ var findSimilarCreators = defineOperation({
|
|
|
253
395
|
method: "POST",
|
|
254
396
|
path: "/creators/{creatorId}/similar",
|
|
255
397
|
kind: "read",
|
|
398
|
+
cost: SEARCH_QUOTA_COST,
|
|
256
399
|
summary: "Find creators like one or more you already have",
|
|
257
|
-
description: "Finds creators whose content and audience are closest to one seed creator \u2014 or up to five fused seeds via additionalCreatorIds \u2014 defaulting to the seed platform(s) unless platforms is set. Pass the creatorId of a search result, no handle or unlock needed. A new similar search counts toward the daily search allowance and costs no credits (see get_account); paging the same seeds and filters that day uses no extra allowance. With campaignId, creators already in that campaign or excluded from it are left out. Results
|
|
400
|
+
description: "Finds creators whose content and audience are closest to one seed creator \u2014 or up to five fused seeds via additionalCreatorIds \u2014 defaulting to the seed platform(s) unless platforms is set. Pass the creatorId of a search or find_creator result, no handle or unlock needed. A new similar search counts toward the daily search allowance and costs no credits (see get_account); paging the same seeds and filters that day uses no extra allowance. With campaignId, creators already in that campaign or excluded from it are left out. Results include seeds, pagination, names and account state (isSaved, identityUnlocked, emailUnlocked, campaignMemberships) but no handles, each with a matchScore from 0 to 1; the search is kept, so expand_search can load more unseen matches and list_searches or get_search can read it again.",
|
|
258
401
|
input: z3.object({
|
|
259
402
|
creatorId: creatorId.describe(
|
|
260
403
|
"The primary creator to find more like, from search_creators or another result"
|
|
@@ -273,6 +416,7 @@ var listSearches = defineOperation({
|
|
|
273
416
|
method: "GET",
|
|
274
417
|
path: "/searches",
|
|
275
418
|
kind: "read",
|
|
419
|
+
cost: FREE_COST,
|
|
276
420
|
summary: "List past searches",
|
|
277
421
|
description: "Lists the searches run before, newest first, with their query, filters and how many results they had, including find_similar_creators ones. Free, and does not count against the daily search limit. To see a search\u2019s results again, call get_search instead of searching again.",
|
|
278
422
|
input: z3.object({
|
|
@@ -288,6 +432,7 @@ var getSearch = defineOperation({
|
|
|
288
432
|
method: "GET",
|
|
289
433
|
path: "/searches/{searchId}",
|
|
290
434
|
kind: "read",
|
|
435
|
+
cost: FREE_COST,
|
|
291
436
|
summary: "Read a past search\u2019s results again",
|
|
292
437
|
description: "Returns a past search, its results in rank order with account state (identityUnlocked, emailUnlocked, isSaved, campaignMemberships), and pagination. Free, and does not count against the daily search limit. Call expand_search to append more unseen results.",
|
|
293
438
|
input: z3.object({ searchId })
|
|
@@ -298,6 +443,7 @@ var expandSearch = defineOperation({
|
|
|
298
443
|
method: "POST",
|
|
299
444
|
path: "/searches/{searchId}/more",
|
|
300
445
|
kind: "write",
|
|
446
|
+
cost: EXPAND_QUOTA_COST,
|
|
301
447
|
summary: "Load more results for a past search",
|
|
302
448
|
description: "Appends unseen creators to a saved search_creators or find_similar_creators search in its original history entry and keeps existing rows in order. Pass limit as the desired total result count, up to maxSearchResults from get_account (50 unpaid, 100 paid). Returns only the newly added results with account state, totalCount and pagination. Expanding a search from today uses no extra daily allowance; expanding an older search counts as one search. Free (no credits). Similar searches saved before reference creators were recorded can be reopened with get_search. Start a new similar search to load more matches for those older searches.",
|
|
303
449
|
input: z3.object({
|
|
@@ -313,6 +459,7 @@ var getSearchFilters = defineOperation({
|
|
|
313
459
|
method: "GET",
|
|
314
460
|
path: "/searches/filters",
|
|
315
461
|
kind: "read",
|
|
462
|
+
cost: FREE_COST,
|
|
316
463
|
summary: "List the values the search filters take",
|
|
317
464
|
description: "Returns the values the search and browse filters accept: platforms, creator countries and languages present in the database, niches and activity windows. Free.",
|
|
318
465
|
input: z3.object({})
|
|
@@ -323,6 +470,7 @@ var updateSearch = defineOperation({
|
|
|
323
470
|
method: "PATCH",
|
|
324
471
|
path: "/searches/{searchId}",
|
|
325
472
|
kind: "write",
|
|
473
|
+
cost: FREE_COST,
|
|
326
474
|
summary: "Rename or archive a past search",
|
|
327
475
|
description: "Names a past search, or archives it so list_searches leaves it out (archived: false brings it back). Free.",
|
|
328
476
|
input: z3.object({
|
|
@@ -337,11 +485,13 @@ var exportSearch = defineOperation({
|
|
|
337
485
|
method: "GET",
|
|
338
486
|
path: "/searches/{searchId}/export",
|
|
339
487
|
kind: "write",
|
|
488
|
+
cost: FREE_COST,
|
|
340
489
|
summary: "Export a search\u2019s results as CSV",
|
|
341
|
-
description: "Returns a search\u2019s results as CSV text, one row per creator in rank order, as the dashboard\u2019s export does: handles and profile links only for unlocked creators, and
|
|
490
|
+
description: "Returns a search\u2019s results as CSV text, one row per creator in rank order, as the dashboard\u2019s export does: handles and profile links only for unlocked creators, and the Email column (unless includeEmail is false) only for ones already revealed. Exporting costs no credits; call preview_export and prepare_export first if you want to unlock missing profiles or reveal emails before downloading. Records the returned creators as exported for this account so later searches can omit them with excludeExported. Save csv to a file named filename.",
|
|
342
491
|
input: z3.object({
|
|
343
492
|
searchId,
|
|
344
|
-
scope: z3.enum(["all", "added"]).optional().describe("all results (default), or only the ones added to a campaign")
|
|
493
|
+
scope: z3.enum(["all", "added"]).optional().describe("all results (default), or only the ones added to a campaign"),
|
|
494
|
+
includeEmail: includeEmailColumn
|
|
345
495
|
})
|
|
346
496
|
});
|
|
347
497
|
var getCreator = defineOperation({
|
|
@@ -350,8 +500,9 @@ var getCreator = defineOperation({
|
|
|
350
500
|
method: "GET",
|
|
351
501
|
path: "/creators/{creatorId}",
|
|
352
502
|
kind: "read",
|
|
503
|
+
cost: FREE_COST,
|
|
353
504
|
summary: "Show a creator\u2019s profile",
|
|
354
|
-
description: "Returns a creator\u2019s profile: platform, country, language, followers, views, engagement, topics, weighted hashtags, audience, recent content, estimated price, active campaign memberships
|
|
505
|
+
description: "Returns a creator\u2019s profile: platform, country, language, followers, views, engagement, topics, weighted hashtags, audience, recent content, estimated price, active campaign memberships, saved listIds, whether an email is available, and detailUrl (their Creator River web page). Free. Until you unlock the creator, the handle, profile link and recent video titles and links are hidden. Pass campaignId to also see where the creator stands in that campaign.",
|
|
355
506
|
input: z3.object({
|
|
356
507
|
creatorId,
|
|
357
508
|
campaignId: campaignId.optional().describe("Also show this campaign\u2019s progress with the creator")
|
|
@@ -363,8 +514,9 @@ var unlockCreator = defineOperation({
|
|
|
363
514
|
method: "POST",
|
|
364
515
|
path: "/creators/{creatorId}/unlock",
|
|
365
516
|
kind: "spend",
|
|
517
|
+
cost: UNLOCK_COST,
|
|
366
518
|
summary: "Unlock a creator\u2019s handle and profile link",
|
|
367
|
-
description: "Unlocks the creator and returns the full profile with handle, profile link
|
|
519
|
+
description: "Unlocks the creator and returns the full profile with handle, profile link, recent video titles and links, saved listIds, detailUrl (their Creator River web page) and a credits receipt (charged and remaining balance). Costs 0.5 credits the first time for each creator; unlocking again is free. It does not reveal the email address; use reveal_contact or prepare_export for that.",
|
|
368
520
|
input: z3.object({ creatorId })
|
|
369
521
|
});
|
|
370
522
|
var saveCreator = defineOperation({
|
|
@@ -372,11 +524,13 @@ var saveCreator = defineOperation({
|
|
|
372
524
|
command: ["creators", "save"],
|
|
373
525
|
method: "POST",
|
|
374
526
|
path: "/creators/{creatorId}/save",
|
|
375
|
-
kind: "
|
|
376
|
-
|
|
377
|
-
|
|
527
|
+
kind: "write",
|
|
528
|
+
cost: FREE_COST,
|
|
529
|
+
summary: "Save a creator to a list",
|
|
530
|
+
description: "Saves a creator to a creator list (the account\u2019s default \u201CMy Favorites\u201D list when listId is omitted). Free; handles, profile links and emails remain locked until unlocked or revealed. Pass searchId to remember where they were found. Use add_to_list to add up to 100 creators at once.",
|
|
378
531
|
input: z3.object({
|
|
379
532
|
creatorId,
|
|
533
|
+
listId: listId.optional().describe("Target list id (defaults to the account\u2019s default list)"),
|
|
380
534
|
searchId: z3.string().trim().min(1).optional().describe("The search the creator was found in")
|
|
381
535
|
})
|
|
382
536
|
});
|
|
@@ -386,8 +540,9 @@ var unsaveCreator = defineOperation({
|
|
|
386
540
|
method: "DELETE",
|
|
387
541
|
path: "/creators/{creatorId}/save",
|
|
388
542
|
kind: "write",
|
|
389
|
-
|
|
390
|
-
|
|
543
|
+
cost: FREE_COST,
|
|
544
|
+
summary: "Remove a creator from all saved lists",
|
|
545
|
+
description: "Removes a creator from every creator list on this account. Free; the creator stays unlocked and in any campaign. Use remove_from_list to remove from a single list instead.",
|
|
391
546
|
input: z3.object({ creatorId })
|
|
392
547
|
});
|
|
393
548
|
var listSavedCreators = defineOperation({
|
|
@@ -396,19 +551,176 @@ var listSavedCreators = defineOperation({
|
|
|
396
551
|
method: "GET",
|
|
397
552
|
path: "/creators/saved",
|
|
398
553
|
kind: "read",
|
|
399
|
-
|
|
400
|
-
|
|
554
|
+
cost: FREE_COST,
|
|
555
|
+
summary: "List saved creators across all lists",
|
|
556
|
+
description: "Lists all creators saved to any list on this account, most recently saved first. Free. Use list_lists and get_list to inspect individual lists.",
|
|
401
557
|
input: z3.object({
|
|
402
558
|
page: z3.number().int().min(1).optional().describe("Page number, from 1"),
|
|
403
559
|
limit: limit(100, 20)
|
|
404
560
|
})
|
|
405
561
|
});
|
|
562
|
+
var listLists = defineOperation({
|
|
563
|
+
name: "list_lists",
|
|
564
|
+
command: ["lists", "list"],
|
|
565
|
+
method: "GET",
|
|
566
|
+
path: "/lists",
|
|
567
|
+
kind: "read",
|
|
568
|
+
cost: FREE_COST,
|
|
569
|
+
summary: "List creator lists",
|
|
570
|
+
description: "Lists your creator lists (including the default \u201CMy Favorites\u201D list) with each list\u2019s id, name, isDefault flag and creator count. Free.",
|
|
571
|
+
input: z3.object({})
|
|
572
|
+
});
|
|
573
|
+
var createList = defineOperation({
|
|
574
|
+
name: "create_list",
|
|
575
|
+
command: ["lists", "create"],
|
|
576
|
+
method: "POST",
|
|
577
|
+
path: "/lists",
|
|
578
|
+
kind: "write",
|
|
579
|
+
cost: FREE_COST,
|
|
580
|
+
summary: "Create a creator list",
|
|
581
|
+
description: "Creates a custom creator list (up to 50 lists per account) to organize prospects outside or before campaigns. Free.",
|
|
582
|
+
input: z3.object({
|
|
583
|
+
name: z3.string().trim().min(1).max(80).describe("List name, up to 80 characters")
|
|
584
|
+
})
|
|
585
|
+
});
|
|
586
|
+
var updateList = defineOperation({
|
|
587
|
+
name: "update_list",
|
|
588
|
+
command: ["lists", "update"],
|
|
589
|
+
method: "PATCH",
|
|
590
|
+
path: "/lists/{listId}",
|
|
591
|
+
kind: "write",
|
|
592
|
+
cost: FREE_COST,
|
|
593
|
+
summary: "Rename a creator list",
|
|
594
|
+
description: "Renames one of your creator lists. Free.",
|
|
595
|
+
input: z3.object({
|
|
596
|
+
listId,
|
|
597
|
+
name: z3.string().trim().min(1).max(80).describe("New list name, up to 80 characters")
|
|
598
|
+
})
|
|
599
|
+
});
|
|
600
|
+
var deleteList = defineOperation({
|
|
601
|
+
name: "delete_list",
|
|
602
|
+
command: ["lists", "delete"],
|
|
603
|
+
method: "DELETE",
|
|
604
|
+
path: "/lists/{listId}",
|
|
605
|
+
kind: "write",
|
|
606
|
+
cost: FREE_COST,
|
|
607
|
+
summary: "Delete a custom creator list",
|
|
608
|
+
description: "Deletes a custom creator list. Free. The default list cannot be deleted. Creators saved in other lists stay saved there, and unlocked creators or campaigns are unchanged.",
|
|
609
|
+
input: z3.object({ listId })
|
|
610
|
+
});
|
|
611
|
+
var getList = defineOperation({
|
|
612
|
+
name: "get_list",
|
|
613
|
+
command: ["lists", "get"],
|
|
614
|
+
method: "GET",
|
|
615
|
+
path: "/lists/{listId}",
|
|
616
|
+
kind: "read",
|
|
617
|
+
cost: FREE_COST,
|
|
618
|
+
summary: "List creators in a creator list",
|
|
619
|
+
description: "Lists the creators in one creator list, most recently added first, with platform counts and account state (identityUnlocked, emailUnlocked, campaignMemberships). Free; handles, profile links and emails remain hidden until unlocked or revealed.",
|
|
620
|
+
input: z3.object({
|
|
621
|
+
listId,
|
|
622
|
+
platform: z3.enum(PLATFORMS).optional().describe("Only creators on this platform"),
|
|
623
|
+
page: z3.number().int().min(1).optional().describe("Page number, from 1"),
|
|
624
|
+
limit: limit(100, 20)
|
|
625
|
+
})
|
|
626
|
+
});
|
|
627
|
+
var addToList = defineOperation({
|
|
628
|
+
name: "add_to_list",
|
|
629
|
+
command: ["lists", "add"],
|
|
630
|
+
method: "POST",
|
|
631
|
+
path: "/lists/{listId}/creators",
|
|
632
|
+
kind: "write",
|
|
633
|
+
cost: FREE_COST,
|
|
634
|
+
summary: "Add creators to a creator list",
|
|
635
|
+
description: "Adds 1 to 100 creators to a creator list in one call. Free; handles, profile links and emails remain locked until unlocked or revealed. Pass searchId to record which search they came from.",
|
|
636
|
+
input: z3.object({
|
|
637
|
+
listId,
|
|
638
|
+
creatorIds: z3.array(creatorId).min(1).max(100).describe("1 to 100 creator IDs to add"),
|
|
639
|
+
searchId: searchId.optional().describe("The search the creators were found in")
|
|
640
|
+
})
|
|
641
|
+
});
|
|
642
|
+
var removeFromList = defineOperation({
|
|
643
|
+
name: "remove_from_list",
|
|
644
|
+
command: ["lists", "remove"],
|
|
645
|
+
method: "DELETE",
|
|
646
|
+
path: "/lists/{listId}/creators/{creatorId}",
|
|
647
|
+
kind: "write",
|
|
648
|
+
cost: FREE_COST,
|
|
649
|
+
summary: "Remove a creator from a creator list",
|
|
650
|
+
description: "Removes one creator from a specific creator list. Free; memberships in other lists, unlocked state and campaigns are unchanged.",
|
|
651
|
+
input: z3.object({ listId, creatorId })
|
|
652
|
+
});
|
|
653
|
+
var exportList = defineOperation({
|
|
654
|
+
name: "export_list",
|
|
655
|
+
command: ["lists", "export"],
|
|
656
|
+
method: "GET",
|
|
657
|
+
path: "/lists/{listId}/export",
|
|
658
|
+
kind: "write",
|
|
659
|
+
cost: FREE_COST,
|
|
660
|
+
summary: "Export a creator list as CSV",
|
|
661
|
+
description: "Returns a creator list (optionally filtered by platform or creatorIds) as CSV text: handles and profile links only for unlocked creators, and the Email column (unless includeEmail is false) only for ones already revealed. Exporting costs no credits; call preview_export and prepare_export first if you want to unlock missing profiles or reveal emails before downloading. Records the returned creators as exported for excludeExported. Save csv to a file named filename.",
|
|
662
|
+
input: z3.object({
|
|
663
|
+
listId,
|
|
664
|
+
platform: z3.enum(PLATFORMS).optional().describe("Only creators on this platform"),
|
|
665
|
+
creatorIds: z3.array(creatorId).min(1).max(100).optional().describe(
|
|
666
|
+
"Optional subset of 1 to 100 creator IDs in this list, in desired order"
|
|
667
|
+
),
|
|
668
|
+
includeEmail: includeEmailColumn
|
|
669
|
+
})
|
|
670
|
+
});
|
|
671
|
+
var previewExport = defineOperation({
|
|
672
|
+
name: "preview_export",
|
|
673
|
+
command: ["exports", "preview"],
|
|
674
|
+
method: "POST",
|
|
675
|
+
path: "/exports/preview",
|
|
676
|
+
kind: "read",
|
|
677
|
+
cost: FREE_COST,
|
|
678
|
+
summary: "Preview credit cost before exporting CSV",
|
|
679
|
+
description: "Computes the exact credit cost to unlock missing profiles (0.5 credits each) and, when includeEmail is true, reveal missing business emails (0.2 credits each) before exporting a search, campaign, creator list or explicit list of creatorIds. Free and read-only. Returns counts, unlockCostCredits, emailCostCredits, totalCostCredits, balanceCredits, canAfford and pendingCreatorIds to pass to prepare_export in chunks of up to 10.",
|
|
680
|
+
input: z3.object({
|
|
681
|
+
searchId: searchId.optional().describe("Preview exporting this search"),
|
|
682
|
+
campaignId: campaignId.optional().describe("Preview exporting this campaign"),
|
|
683
|
+
listId: listId.optional().describe("Preview exporting this creator list"),
|
|
684
|
+
creatorIds: z3.array(creatorId).min(1).max(100).optional().describe(
|
|
685
|
+
"1 to 100 creator IDs directly, or a subset of campaignId or listId"
|
|
686
|
+
),
|
|
687
|
+
scope: z3.enum(["all", "added"]).optional().describe(
|
|
688
|
+
"With searchId: all results (default), or only ones added to a campaign"
|
|
689
|
+
),
|
|
690
|
+
platform: z3.enum(PLATFORMS).optional().describe("With listId: only creators on this platform"),
|
|
691
|
+
includeEmail: z3.boolean().optional().describe(
|
|
692
|
+
"Include email reveal charges in the cost preview (default true). Pass false to preview profile unlock costs only"
|
|
693
|
+
)
|
|
694
|
+
})
|
|
695
|
+
});
|
|
696
|
+
var prepareExport = defineOperation({
|
|
697
|
+
name: "prepare_export",
|
|
698
|
+
command: ["exports", "prepare"],
|
|
699
|
+
method: "POST",
|
|
700
|
+
path: "/exports/prepare",
|
|
701
|
+
kind: "spend",
|
|
702
|
+
cost: PREPARE_EXPORT_COST,
|
|
703
|
+
summary: "Unlock profiles and emails for CSV export",
|
|
704
|
+
description: "Unlocks up to 10 selected creators (0.5 credits each, first time only) and, when includeEmail is true (default), reveals their business emails (0.2 credits each, first time only) without adding them to a campaign, returning per-item results and a credits receipt (charged and remaining balance). Call preview_export first to quote the total cost and get approval, then pass pendingCreatorIds here in chunks of up to 10 before calling export_search, export_campaign or export_list. Safe to retry: already unlocked creators and revealed emails are never charged again.",
|
|
705
|
+
input: z3.object({
|
|
706
|
+
creatorIds: z3.array(creatorId).min(1).max(10).describe(
|
|
707
|
+
"1 to 10 creator IDs to unlock and optionally reveal emails for"
|
|
708
|
+
),
|
|
709
|
+
includeEmail: z3.boolean().optional().describe(
|
|
710
|
+
"Also reveal business emails at 0.2 credits each (default true). Pass false to unlock handles and profile links at 0.5 credits only"
|
|
711
|
+
),
|
|
712
|
+
campaignId: campaignId.optional().describe(
|
|
713
|
+
"For a campaign export, prepare only creators in this campaign and associate newly revealed emails with it"
|
|
714
|
+
)
|
|
715
|
+
})
|
|
716
|
+
});
|
|
406
717
|
var listCampaigns = defineOperation({
|
|
407
718
|
name: "list_campaigns",
|
|
408
719
|
command: ["campaigns", "list"],
|
|
409
720
|
method: "GET",
|
|
410
721
|
path: "/campaigns",
|
|
411
722
|
kind: "read",
|
|
723
|
+
cost: FREE_COST,
|
|
412
724
|
summary: "List campaigns",
|
|
413
725
|
description: "Lists your campaigns with their brief, status and how many creators are at each stage. Free. Every account has a default \u201CGeneral Outreach\u201D campaign you can use when no specific campaign fits.",
|
|
414
726
|
input: z3.object({
|
|
@@ -423,6 +735,7 @@ var createCampaign = defineOperation({
|
|
|
423
735
|
method: "POST",
|
|
424
736
|
path: "/campaigns",
|
|
425
737
|
kind: "write",
|
|
738
|
+
cost: FREE_COST,
|
|
426
739
|
summary: "Create a campaign",
|
|
427
740
|
description: "Creates a campaign from a brief: the product, the goal and the creators you want. Free. Campaigns group the creators you contact; pass the campaign id to search_creators to rank results for the brief.",
|
|
428
741
|
input: z3.object({
|
|
@@ -437,6 +750,7 @@ var updateCampaign = defineOperation({
|
|
|
437
750
|
method: "PATCH",
|
|
438
751
|
path: "/campaigns/{campaignId}",
|
|
439
752
|
kind: "write",
|
|
753
|
+
cost: FREE_COST,
|
|
440
754
|
summary: "Change a campaign\u2019s name, brief or status",
|
|
441
755
|
description: "Changes a campaign: its name, its brief, its status, or whether it is archived. Pass only what changes. Free. A new brief is kept as the next revision, and searches with this campaignId rank against it from then on; creators already in the campaign stay.",
|
|
442
756
|
input: z3.object({
|
|
@@ -453,6 +767,7 @@ var getCampaignStatus = defineOperation({
|
|
|
453
767
|
method: "GET",
|
|
454
768
|
path: "/campaigns/{campaignId}/status",
|
|
455
769
|
kind: "read",
|
|
770
|
+
cost: FREE_COST,
|
|
456
771
|
summary: "Show a campaign\u2019s pipeline",
|
|
457
772
|
description: "Shows where a campaign stands: the searches run for it, and its creators by stage (outreach, negotiation, collaboration), each with the next action and who the conversation is waiting on. Free. Counts cover the whole campaign; each stage lists its most recently active items first. To go through every creator at one stage, pass stage and read page 1, 2, \u2026 until you have count items. Use it to decide what to do next across a campaign.",
|
|
458
773
|
input: z3.object({
|
|
@@ -472,8 +787,9 @@ var revealContact = defineOperation({
|
|
|
472
787
|
method: "POST",
|
|
473
788
|
path: "/campaigns/{campaignId}/creators/{creatorId}/contact",
|
|
474
789
|
kind: "spend",
|
|
790
|
+
cost: REVEAL_CONTACT_COST,
|
|
475
791
|
summary: "Reveal a creator\u2019s email for a campaign",
|
|
476
|
-
description: "Returns the creator\u2019s email address so you can contact them in this campaign, adding the creator to the campaign first if needed. Adding unlocks the creator, which costs 0.5 credits the first time for each creator. Revealing costs 0.2 credits the first time for each creator; revealing again, in any campaign, is free. Use this or reveal_contacts before send_email.",
|
|
792
|
+
description: "Returns the creator\u2019s email address and a credits receipt (charged and remaining balance) so you can contact them in this campaign, adding the creator to the campaign first if needed. Adding unlocks the creator, which costs 0.5 credits the first time for each creator. Revealing costs 0.2 credits the first time for each creator; revealing again, in any campaign, is free. Creators without a revealable email fail before unlocking and cost 0 credits. Bounced or dropped emails refund 0.2 credits automatically. Use this or reveal_contacts before send_email.",
|
|
477
793
|
input: z3.object({ campaignId, creatorId })
|
|
478
794
|
});
|
|
479
795
|
var revealContacts = defineOperation({
|
|
@@ -482,8 +798,9 @@ var revealContacts = defineOperation({
|
|
|
482
798
|
method: "POST",
|
|
483
799
|
path: "/campaigns/{campaignId}/contacts/reveal",
|
|
484
800
|
kind: "spend",
|
|
801
|
+
cost: REVEAL_CONTACTS_COST,
|
|
485
802
|
summary: "Reveal selected creators\u2019 emails for a campaign",
|
|
486
|
-
description: "Reveals emails for up to 10 selected creators in this campaign. Each available contact is added to the campaign. The first unlock costs 0.5 credits and the first email reveal costs 0.2 credits per creator across the account.
|
|
803
|
+
description: "Reveals emails for up to 10 selected creators in this campaign and returns a credits receipt (charged and remaining balance). Each available contact is added to the campaign; creators without an email are skipped before charging. The first unlock costs 0.5 credits and the first email reveal costs 0.2 credits per creator across the account. Call preview_export with creatorIds first to get an exact account-scoped quote before spending. Read items for each unique creator in input order: successful items include revealedContact, and other items report why the reveal failed. Earlier successes are kept. Retrying reuses previous charges.",
|
|
487
804
|
input: z3.object({
|
|
488
805
|
campaignId,
|
|
489
806
|
creatorIds: z3.array(creatorId).min(1).max(10).describe("1 to 10 selected creator IDs"),
|
|
@@ -496,8 +813,9 @@ var sendEmail = defineOperation({
|
|
|
496
813
|
method: "POST",
|
|
497
814
|
path: "/campaigns/{campaignId}/creators/{creatorId}/emails",
|
|
498
815
|
kind: "send",
|
|
816
|
+
cost: SEND_EMAIL_COST,
|
|
499
817
|
summary: "Email a creator",
|
|
500
|
-
description: 'Sends a plain-text email to the creator\u2019s revealed address (call reveal_contact first). Replies arrive in the conversation (see get_conversation). A later email to the same creator in the same campaign is a follow-up: it joins the creator\u2019s existing email thread, keeps the conversation\u2019s stage, and copies whoever last replied for the creator (a manager, say); leave subject out to reply as "Re: <subject>". Subject and body can carry variables, filled in for this creator when it is sent, so one draft fits every creator: {name} (how to address them, cleaned from the channel name), {handle} (@handle), {platform}, {followers} (e.g. 75K) and {country}. A misspelled variable, or one this creator has no value for, fails the send with a message naming it. The first 100 emails each day are free
|
|
818
|
+
description: 'Sends a plain-text email to the creator\u2019s revealed address (call reveal_contact first) and returns a credits receipt (charged, remaining balance and remaining free daily emails). Replies arrive in the conversation (see get_conversation). A later email to the same creator in the same campaign is a follow-up: it joins the creator\u2019s existing email thread, keeps the conversation\u2019s stage, and copies whoever last replied for the creator (a manager, say); leave subject out to reply as "Re: <subject>". Subject and body can carry variables, filled in for this creator when it is sent, so one draft fits every creator: {name} (how to address them, cleaned from the channel name), {handle} (@handle), {platform}, {followers} (e.g. 75K) and {country}. A misspelled variable, or one this creator has no value for, fails the send with a message naming it. The first 100 emails each day are free: free and one-time credit-pack accounts cap at 100/day, while active Pro subscriptions allow up to 200/day with emails 101-200 costing 0.1 credits each (see get_account or get_pricing). Failed, bounced or dropped emails refund daily quota and any overage charge. Sending the same subject and body to the same creator in the same campaign again returns the first send instead of emailing twice; pass a new idempotencyKey to send it again on purpose, for example after a send that failed.',
|
|
501
819
|
input: z3.object({
|
|
502
820
|
campaignId,
|
|
503
821
|
creatorId,
|
|
@@ -516,6 +834,7 @@ var getConversation = defineOperation({
|
|
|
516
834
|
method: "GET",
|
|
517
835
|
path: "/campaigns/{campaignId}/creators/{creatorId}/conversation",
|
|
518
836
|
kind: "read",
|
|
837
|
+
cost: FREE_COST,
|
|
519
838
|
summary: "Read the email conversation with a creator",
|
|
520
839
|
description: "Returns the email thread with a creator in a campaign: its stage, who it is waiting on, the next action and agreed facts, plus every message and event, oldest first. Free. Check it for replies after send_email. An out-of-office or other automatic answer appears as an auto_reply event and leaves the thread waiting on the creator. The thread is null until the first email is sent.",
|
|
521
840
|
input: z3.object({ campaignId, creatorId })
|
|
@@ -528,6 +847,7 @@ var recordReply = defineOperation({
|
|
|
528
847
|
method: "POST",
|
|
529
848
|
path: "/campaigns/{campaignId}/creators/{creatorId}/replies",
|
|
530
849
|
kind: "write",
|
|
850
|
+
cost: FREE_COST,
|
|
531
851
|
summary: "Record a reply the creator sent outside Creator River",
|
|
532
852
|
description: "Records a reply that reached the user some other way (a DM, another inbox, a call) and how it went. positive or neutral moves the creator to negotiation (a confirmed collaboration stays), waiting on the user; negative records that they declined and closes the conversation. Free. Replies to emails sent with send_email arrive on their own (see get_conversation), so never record those. Needs an email sent first. Recording the same reply again changes nothing.",
|
|
533
853
|
input: z3.object({
|
|
@@ -547,6 +867,7 @@ var confirmCollaboration = defineOperation({
|
|
|
547
867
|
method: "POST",
|
|
548
868
|
path: "/campaigns/{campaignId}/creators/{creatorId}/collaboration",
|
|
549
869
|
kind: "write",
|
|
870
|
+
cost: FREE_COST,
|
|
550
871
|
summary: "Record that a creator agreed to collaborate",
|
|
551
872
|
description: "Records that the creator agreed to work with the user, with the agreed terms, and moves them to the collaboration stage, waiting on the user to prepare it. Free. Call it only once the creator has clearly said yes to the terms; it sends nothing to the creator. Needs an email sent first. Confirming the same terms again changes nothing.",
|
|
552
873
|
input: z3.object({
|
|
@@ -564,8 +885,9 @@ var addCreator = defineOperation({
|
|
|
564
885
|
method: "POST",
|
|
565
886
|
path: "/campaigns/{campaignId}/creators/{creatorId}",
|
|
566
887
|
kind: "spend",
|
|
567
|
-
|
|
568
|
-
|
|
888
|
+
cost: ADD_CREATOR_COST,
|
|
889
|
+
summary: "Add and unlock a creator in a campaign",
|
|
890
|
+
description: "Adds a creator to a campaign, at the outreach stage, without revealing the email, and returns a credits receipt (charged and remaining balance). Adding unlocks the creator, which costs 0.5 credits the first time for each creator; adding again or adding an already unlocked creator is free. Use add_to_list instead if you only want to shortlist creators for free without unlocking (reveal_contact adds the creator too). Pass searchId to mark the creator as added in that search.",
|
|
569
891
|
input: z3.object({
|
|
570
892
|
campaignId,
|
|
571
893
|
creatorId,
|
|
@@ -578,20 +900,39 @@ var excludeCreator = defineOperation({
|
|
|
578
900
|
method: "POST",
|
|
579
901
|
path: "/campaigns/{campaignId}/creators/{creatorId}/exclusion",
|
|
580
902
|
kind: "write",
|
|
581
|
-
|
|
582
|
-
|
|
903
|
+
cost: FREE_COST,
|
|
904
|
+
summary: "Hide a creator from discovery for a campaign",
|
|
905
|
+
description: "Marks a creator as Not Fit for discovery in this campaign. Searches, recommendations and similar-creator results omit them. Pass searchId to hide them in that search as well. Free.",
|
|
583
906
|
input: z3.object({
|
|
584
907
|
campaignId,
|
|
585
908
|
creatorId,
|
|
586
909
|
searchId: z3.string().trim().min(1).optional().describe("A search to drop the creator from as well")
|
|
587
910
|
})
|
|
588
911
|
});
|
|
912
|
+
var exportCampaign = defineOperation({
|
|
913
|
+
name: "export_campaign",
|
|
914
|
+
command: ["campaigns", "export"],
|
|
915
|
+
method: "GET",
|
|
916
|
+
path: "/campaigns/{campaignId}/export",
|
|
917
|
+
kind: "write",
|
|
918
|
+
cost: FREE_COST,
|
|
919
|
+
summary: "Export a campaign\u2019s creators as CSV",
|
|
920
|
+
description: "Returns a campaign\u2019s active creators (or a selected subset via creatorIds) as CSV text: handles and profile links only for unlocked creators, and the Email column (unless includeEmail is false) only for ones already revealed. Exporting costs no credits; call preview_export and prepare_export first if you want to unlock missing profiles or reveal emails before downloading. Records the returned creators as exported for excludeExported. Save csv to a file named filename.",
|
|
921
|
+
input: z3.object({
|
|
922
|
+
campaignId,
|
|
923
|
+
creatorIds: z3.array(creatorId).min(1).max(100).optional().describe(
|
|
924
|
+
"Optional subset of 1 to 100 creator IDs in this campaign, in desired order"
|
|
925
|
+
),
|
|
926
|
+
includeEmail: includeEmailColumn
|
|
927
|
+
})
|
|
928
|
+
});
|
|
589
929
|
var listTrendingVideos = defineOperation({
|
|
590
930
|
name: "list_trending_videos",
|
|
591
931
|
command: ["trends", "videos"],
|
|
592
932
|
method: "GET",
|
|
593
933
|
path: "/trends/videos",
|
|
594
934
|
kind: "read",
|
|
935
|
+
cost: FREE_COST,
|
|
595
936
|
summary: "List recent viral videos across platforms",
|
|
596
937
|
description: "Lists quality-gated viral videos (10x+ above each creator\u2019s baseline views) across YouTube, Instagram and TikTok, deduplicated to one top video per creator by default. Free. Returns video metrics, hashtags, creatorId, creatorName, hasEmail and account access states (identityUnlocked, emailUnlocked, isSaved, campaignMemberships). Source video IDs, creator handles and playback links stay hidden until the creator is unlocked (unlock_creator, add_creator or reveal_contact).",
|
|
597
938
|
input: z3.object({
|
|
@@ -616,6 +957,7 @@ var listTrendingHashtags = defineOperation({
|
|
|
616
957
|
method: "GET",
|
|
617
958
|
path: "/trends/hashtags",
|
|
618
959
|
kind: "read",
|
|
960
|
+
cost: FREE_COST,
|
|
619
961
|
summary: "List rising and popular hashtags across platforms",
|
|
620
962
|
description: "Lists trending hashtags across YouTube, Instagram and TikTok using Creator River\u2019s dual-track trend engine: steady 7-day momentum baselines by default, or live viral-video aggregations when filtering by country, time window, sponsored status or business email availability. Free. Returns each tag, state, creator count, total views, delta, related tags and sample creators with creatorId and hasEmail (no handles until unlocked).",
|
|
621
963
|
input: z3.object({
|
|
@@ -635,6 +977,8 @@ var listTrendingHashtags = defineOperation({
|
|
|
635
977
|
});
|
|
636
978
|
var operations = [
|
|
637
979
|
getAccount,
|
|
980
|
+
getPricing,
|
|
981
|
+
getCreditHistory,
|
|
638
982
|
searchCreators,
|
|
639
983
|
browseCreators,
|
|
640
984
|
findCreator,
|
|
@@ -652,11 +996,22 @@ var operations = [
|
|
|
652
996
|
saveCreator,
|
|
653
997
|
unsaveCreator,
|
|
654
998
|
listSavedCreators,
|
|
999
|
+
listLists,
|
|
1000
|
+
createList,
|
|
1001
|
+
updateList,
|
|
1002
|
+
deleteList,
|
|
1003
|
+
getList,
|
|
1004
|
+
addToList,
|
|
1005
|
+
removeFromList,
|
|
1006
|
+
exportList,
|
|
1007
|
+
previewExport,
|
|
1008
|
+
prepareExport,
|
|
655
1009
|
listCampaigns,
|
|
656
1010
|
createCampaign,
|
|
657
1011
|
updateCampaign,
|
|
658
1012
|
getCampaignStatus,
|
|
659
1013
|
addCreator,
|
|
1014
|
+
exportCampaign,
|
|
660
1015
|
revealContact,
|
|
661
1016
|
revealContacts,
|
|
662
1017
|
sendEmail,
|
|
@@ -667,10 +1022,10 @@ var operations = [
|
|
|
667
1022
|
];
|
|
668
1023
|
|
|
669
1024
|
// src/cli.ts
|
|
670
|
-
import { Command, CommanderError } from "commander";
|
|
1025
|
+
import { Command, CommanderError, Option } from "commander";
|
|
671
1026
|
|
|
672
1027
|
// package.json
|
|
673
|
-
var version = "0.
|
|
1028
|
+
var version = "0.8.0";
|
|
674
1029
|
|
|
675
1030
|
// src/http.ts
|
|
676
1031
|
var DEFAULT_API_URL = "https://www.creatorriver.com";
|
|
@@ -734,19 +1089,12 @@ async function send(endpoint2, url, init) {
|
|
|
734
1089
|
`Unexpected response from ${url.origin} (HTTP ${response.status})`
|
|
735
1090
|
);
|
|
736
1091
|
}
|
|
737
|
-
|
|
1092
|
+
function buildOperationRequest(operation, input, endpoint2) {
|
|
738
1093
|
const params = new Set(pathParamNames(operation.path));
|
|
739
1094
|
const fields = Object.entries(input).filter(
|
|
740
1095
|
([name, value]) => !params.has(name) && value !== void 0
|
|
741
1096
|
);
|
|
742
|
-
const url = apiUrl(
|
|
743
|
-
const headers = {
|
|
744
|
-
authorization: `Bearer ${connection.apiKey}`
|
|
745
|
-
};
|
|
746
|
-
const init = {
|
|
747
|
-
method: operation.method,
|
|
748
|
-
headers
|
|
749
|
-
};
|
|
1097
|
+
const url = apiUrl(endpoint2, `/api/v1${fillPath(operation.path, input)}`);
|
|
750
1098
|
if (operation.method === "GET") {
|
|
751
1099
|
for (const [name, value] of fields) {
|
|
752
1100
|
url.searchParams.set(
|
|
@@ -754,11 +1102,28 @@ async function callOperation(operation, input, connection) {
|
|
|
754
1102
|
Array.isArray(value) ? value.join(",") : String(value)
|
|
755
1103
|
);
|
|
756
1104
|
}
|
|
757
|
-
|
|
1105
|
+
return { method: operation.method, url };
|
|
1106
|
+
}
|
|
1107
|
+
return {
|
|
1108
|
+
method: operation.method,
|
|
1109
|
+
url,
|
|
1110
|
+
body: Object.fromEntries(fields)
|
|
1111
|
+
};
|
|
1112
|
+
}
|
|
1113
|
+
async function callOperation(operation, input, connection) {
|
|
1114
|
+
const built = buildOperationRequest(operation, input, connection);
|
|
1115
|
+
const headers = {
|
|
1116
|
+
authorization: `Bearer ${connection.apiKey}`
|
|
1117
|
+
};
|
|
1118
|
+
const init = {
|
|
1119
|
+
method: built.method,
|
|
1120
|
+
headers
|
|
1121
|
+
};
|
|
1122
|
+
if (built.body !== void 0) {
|
|
758
1123
|
headers["content-type"] = "application/json";
|
|
759
|
-
init.body = JSON.stringify(
|
|
1124
|
+
init.body = JSON.stringify(built.body);
|
|
760
1125
|
}
|
|
761
|
-
return send(connection, url, init);
|
|
1126
|
+
return send(connection, built.url, init);
|
|
762
1127
|
}
|
|
763
1128
|
function postJson(endpoint2, path, body) {
|
|
764
1129
|
return send(endpoint2, apiUrl(endpoint2, path), {
|
|
@@ -894,8 +1259,10 @@ async function waitForLogin(endpoint2, io, login, waitSeconds) {
|
|
|
894
1259
|
var LOGIN_HINT = "run `creatorriver auth login`";
|
|
895
1260
|
var GROUP_DESCRIPTIONS = {
|
|
896
1261
|
creators: "Find, inspect, unlock and save creators, and find more like one",
|
|
1262
|
+
lists: "Create, manage and export creator lists",
|
|
1263
|
+
exports: "Preview costs and unlock creators before exporting CSV",
|
|
897
1264
|
trends: "List recent viral videos and rising hashtags across platforms",
|
|
898
|
-
campaigns: "Create, change and
|
|
1265
|
+
campaigns: "Create, change, follow and export campaigns and the creators in them",
|
|
899
1266
|
contacts: "Reveal email addresses for one or more selected creators",
|
|
900
1267
|
emails: "Send outreach emails",
|
|
901
1268
|
conversations: "Read email threads with creators and record their replies",
|
|
@@ -910,6 +1277,34 @@ function forCli(text, operations2) {
|
|
|
910
1277
|
text
|
|
911
1278
|
);
|
|
912
1279
|
}
|
|
1280
|
+
function formatCliSummary(operation) {
|
|
1281
|
+
return operation.cost.model === "free" ? operation.summary : `${operation.summary} [${operation.cost.label}]`;
|
|
1282
|
+
}
|
|
1283
|
+
function formatCliDescription(operation, operations2) {
|
|
1284
|
+
const base = forCli(operation.description, operations2) ?? "";
|
|
1285
|
+
const note = forCli(operation.cost.note, operations2);
|
|
1286
|
+
const costLine = note ? `Cost: ${operation.cost.label} \u2014 ${note}` : `Cost: ${operation.cost.label}`;
|
|
1287
|
+
return base ? `${base}
|
|
1288
|
+
|
|
1289
|
+
${costLine}` : costLine;
|
|
1290
|
+
}
|
|
1291
|
+
function dryRunNote(operation, input) {
|
|
1292
|
+
if (operation.cost.model === "free") {
|
|
1293
|
+
return void 0;
|
|
1294
|
+
}
|
|
1295
|
+
if (operation.cost.model === "quota") {
|
|
1296
|
+
return "0 credits; may count toward the daily search allowance (check `creatorriver account` or `creatorriver pricing`).";
|
|
1297
|
+
}
|
|
1298
|
+
if (operation.name === "send_email") {
|
|
1299
|
+
return "First 100 outreach emails/day are free (Pro subscriptions allow 101-200/day at 0.1 credits each). Check `creatorriver account` for remaining free emails today.";
|
|
1300
|
+
}
|
|
1301
|
+
if (Array.isArray(input.creatorIds) && input.creatorIds.length > 0) {
|
|
1302
|
+
const ids = input.creatorIds.join(",");
|
|
1303
|
+
const noEmailFlag = operation.name === "prepare_export" && input.includeEmail === false ? " --no-include-email" : "";
|
|
1304
|
+
return `Upper bound assuming none are unlocked yet. Run \`creatorriver exports preview --creator-ids ${ids}${noEmailFlag}\` for an exact account-scoped quote.`;
|
|
1305
|
+
}
|
|
1306
|
+
return "Upper bound assuming this creator has not been unlocked or revealed yet; repeating already-paid items costs 0 credits.";
|
|
1307
|
+
}
|
|
913
1308
|
function describeFlag(field, operations2) {
|
|
914
1309
|
return [
|
|
915
1310
|
forCli(field.description, operations2),
|
|
@@ -942,7 +1337,7 @@ function buildInput(fields, options) {
|
|
|
942
1337
|
for (const field of fields) {
|
|
943
1338
|
const value = options[field.name];
|
|
944
1339
|
if (value === void 0) continue;
|
|
945
|
-
input[field.name] = field.kind === "boolean" ?
|
|
1340
|
+
input[field.name] = field.kind === "boolean" ? Boolean(value) : parseFieldText(field, String(value));
|
|
946
1341
|
}
|
|
947
1342
|
return input;
|
|
948
1343
|
}
|
|
@@ -1017,17 +1412,22 @@ Exit codes: 0 ok, ${Object.entries(EXIT_CODES).sort(([, a], [, b]) => a - b).map
|
|
|
1017
1412
|
parent = program.commands.find((command2) => command2.name() === first) ?? program.command(first).description(GROUP_DESCRIPTIONS[first] ?? "");
|
|
1018
1413
|
}
|
|
1019
1414
|
const fields = describeFields(operation.input);
|
|
1020
|
-
const command = parent.command(second ?? first).summary(operation
|
|
1415
|
+
const command = parent.command(second ?? first).summary(formatCliSummary(operation)).description(formatCliDescription(operation, operations2));
|
|
1021
1416
|
for (const field of fields) {
|
|
1022
1417
|
const flag = flagName(field.name);
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1418
|
+
if (field.kind === "boolean") {
|
|
1419
|
+
command.option(flag, describeFlag(field, operations2));
|
|
1420
|
+
command.addOption(new Option(`--no-${flag.slice(2)}`).hideHelp());
|
|
1421
|
+
} else {
|
|
1422
|
+
command.option(`${flag} <value>`, describeFlag(field, operations2));
|
|
1423
|
+
}
|
|
1027
1424
|
}
|
|
1028
1425
|
command.option(
|
|
1029
1426
|
"--input-json <json>",
|
|
1030
1427
|
"the whole input as a JSON object; flags override its fields"
|
|
1428
|
+
).option(
|
|
1429
|
+
"--dry-run",
|
|
1430
|
+
"preview the request and estimated maximum credit cost without calling the API"
|
|
1031
1431
|
).action(async (options) => {
|
|
1032
1432
|
try {
|
|
1033
1433
|
const parsed = operation.input.strict().safeParse(buildInput(fields, options));
|
|
@@ -1039,9 +1439,34 @@ Exit codes: 0 ok, ${Object.entries(EXIT_CODES).sort(([, a], [, b]) => a - b).map
|
|
|
1039
1439
|
}))
|
|
1040
1440
|
});
|
|
1041
1441
|
}
|
|
1442
|
+
const validatedInput = parsed.data;
|
|
1443
|
+
if (options.dryRun === true) {
|
|
1444
|
+
const built = buildOperationRequest(
|
|
1445
|
+
operation,
|
|
1446
|
+
validatedInput,
|
|
1447
|
+
endpoint(io)
|
|
1448
|
+
);
|
|
1449
|
+
const estimatedMaxCredits = estimateMaxOperationCredits(
|
|
1450
|
+
operation,
|
|
1451
|
+
validatedInput
|
|
1452
|
+
);
|
|
1453
|
+
const note = dryRunNote(operation, validatedInput);
|
|
1454
|
+
succeed({
|
|
1455
|
+
dryRun: true,
|
|
1456
|
+
operation: operation.name,
|
|
1457
|
+
command: operation.command.join(" "),
|
|
1458
|
+
method: built.method,
|
|
1459
|
+
url: built.url.toString(),
|
|
1460
|
+
...built.body !== void 0 ? { body: built.body } : {},
|
|
1461
|
+
cost: operation.cost,
|
|
1462
|
+
estimatedMaxCredits,
|
|
1463
|
+
...note ? { note } : {}
|
|
1464
|
+
});
|
|
1465
|
+
return;
|
|
1466
|
+
}
|
|
1042
1467
|
const data = await callOperation(
|
|
1043
1468
|
operation,
|
|
1044
|
-
|
|
1469
|
+
validatedInput,
|
|
1045
1470
|
await connect(io)
|
|
1046
1471
|
);
|
|
1047
1472
|
succeed(data);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "creatorriver",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "Creator River CLI: search 10M+ YouTube, TikTok and Instagram creators, every one with a contact email, and run outreach from your terminal or AI agent",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"creator-river",
|