creatorriver 0.4.0 → 0.5.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 CHANGED
@@ -25,11 +25,14 @@ creatorriver account
25
25
  creatorriver campaigns create --brief "Skincare brand looking for US beauty creators" --status active
26
26
  creatorriver creators search --query "US beauty creators reviewing skincare" --platforms youtube,tiktok --campaign-id <campaign-id>
27
27
  creatorriver contacts reveal --campaign-id <campaign-id> --creator-id <creator-id>
28
+ creatorriver contacts reveal-batch --campaign-id <campaign-id> --creator-ids <first-id>,<second-id>
28
29
  creatorriver emails send --campaign-id <campaign-id> --creator-id <creator-id> --subject "Partnership" --body "Hi! ..."
29
30
  creatorriver conversations get --campaign-id <campaign-id> --creator-id <creator-id>
30
31
  creatorriver campaigns status --campaign-id <campaign-id>
31
32
  ```
32
33
 
34
+ 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. Filtered browsing counts toward the search allowance shown by `account`. For a follow-up in an existing conversation you can omit `--subject`.
35
+
33
36
  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.
34
37
 
35
38
  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>`.
@@ -150,10 +150,18 @@ var getAccount = defineOperation({
150
150
  path: "/account",
151
151
  kind: "read",
152
152
  summary: "Show the credit balance, prices and today\u2019s usage",
153
- description: "Returns the credit balance, what each paid action costs, the plan, and today\u2019s usage against the daily limits. Free. Call it first to confirm the API key works, and before spending credits.",
153
+ description: "Returns the credit balance, what each paid action costs, the plan, the maximum results per search, and today\u2019s usage against the daily limits. Free. Call it first to confirm the API key works, and before spending credits.",
154
154
  input: z3.object({})
155
155
  });
156
+ var accountExclusionFilters = {
157
+ excludeContacted: z3.boolean().optional().describe(
158
+ "Exclude this account\u2019s contacted or do-not-contact creators across all campaigns"
159
+ ),
160
+ excludeExported: z3.boolean().optional().describe("Exclude creators this account previously exported"),
161
+ excludeUploaded: z3.boolean().optional().describe("Apply this account\u2019s uploaded prospect exclude list")
162
+ };
156
163
  var creatorFilters = {
164
+ ...accountExclusionFilters,
157
165
  platforms: z3.array(z3.enum(PLATFORMS)).optional().describe("Only creators on these platforms"),
158
166
  niches: z3.array(z3.enum(CREATOR_NICHES)).optional().describe(
159
167
  "Only creators whose main content is one of these niches. Creators who cover many topics are filed under none, so leave this out for broad lifestyle searches"
@@ -193,7 +201,7 @@ var searchCreators = defineOperation({
193
201
  path: "/searches",
194
202
  kind: "read",
195
203
  summary: "Find creators by description and filters",
196
- 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. Free, but each call counts against the daily search limit (see get_account). Results show each creator\u2019s name but no handle or profile link. Pass campaignId to rank against that campaign\u2019s brief and record the search in it.",
204
+ 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 but no handle or profile link. Pass campaignId to rank against that campaign\u2019s brief and record the search in it.",
197
205
  input: z3.object({
198
206
  query: z3.string().trim().min(1).max(1e3).describe(
199
207
  "The creators you want, in plain words: niche, what their content is like, who watches it"
@@ -213,7 +221,7 @@ var browseCreators = defineOperation({
213
221
  path: "/creators/browse",
214
222
  kind: "read",
215
223
  summary: "List the biggest creators matching filters",
216
- description: "Lists the creators that match the filters, most followed first, with no description to match, as the dashboard\u2019s Discover list does before a search. Free, does not count against the daily search limit and is not kept as a search. Use it for asks like the biggest beauty creators in the US; use search_creators when the user describes what the content should be about. Results show names but no handles.",
224
+ description: "Lists the creators that match the filters, most followed first, with no description to match, as the dashboard\u2019s Discover list does before a search. Browsing costs no credits. A filtered list uses the daily search allowance. The default unfiltered list and repeats of the same successful filtered list that day use no allowance. Browse lists stay out of search history. Use it for asks like the biggest beauty creators in the US; use search_creators when the user describes what the content should be about. Results show names but no handles.",
217
225
  input: z3.object({ ...creatorFilters, limit: limit(100, 20) })
218
226
  });
219
227
  var findCreator = defineOperation({
@@ -237,11 +245,12 @@ var findSimilarCreators = defineOperation({
237
245
  path: "/creators/{creatorId}/similar",
238
246
  kind: "read",
239
247
  summary: "Find creators like one you already have",
240
- description: "Finds creators whose content is closest to one creator\u2019s, on the same platform: pass the creatorId of a search result, no handle or unlock needed. Free, but each call counts against the daily search limit (see get_account). With campaignId, creators already in that campaign or excluded from it are left out. Results show names but no handles, as search_creators does, each with a matchScore from 0 to 1; the search is kept, so list_searches and get_search can read it again.",
248
+ description: "Finds creators whose content is closest to one creator\u2019s, on the same platform: 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). With campaignId, creators already in that campaign or excluded from it are left out. Results show names but no handles, as search_creators does, each with a matchScore from 0 to 1; the search is kept, so list_searches and get_search can read it again.",
241
249
  input: z3.object({
242
250
  creatorId: creatorId.describe(
243
251
  "The creator to find more like, from search_creators or another result"
244
252
  ),
253
+ ...accountExclusionFilters,
245
254
  campaignId: campaignId.optional().describe("Leave out creators this campaign already has or excluded"),
246
255
  markets: z3.array(z3.string().trim().min(1)).optional().describe(
247
256
  "Only creators based in these countries: two-letter codes, e.g. us, gb, jp"
@@ -310,9 +319,9 @@ var exportSearch = defineOperation({
310
319
  command: ["searches", "export"],
311
320
  method: "GET",
312
321
  path: "/searches/{searchId}/export",
313
- kind: "read",
322
+ kind: "write",
314
323
  summary: "Export a search\u2019s results as CSV",
315
- 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 emails only for ones already revealed. Free. Save csv to a file named filename.",
324
+ 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 emails only for ones already revealed. Exporting costs no credits and records the returned creators as exported for this account. Later searches can omit them with excludeExported. Save csv to a file named filename.",
316
325
  input: z3.object({
317
326
  searchId,
318
327
  scope: z3.enum(["all", "added"]).optional().describe("all results (default), or only the ones added to a campaign")
@@ -447,9 +456,23 @@ var revealContact = defineOperation({
447
456
  path: "/campaigns/{campaignId}/creators/{creatorId}/contact",
448
457
  kind: "spend",
449
458
  summary: "Reveal a creator\u2019s email for a campaign",
450
- 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. Required before send_email.",
459
+ 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.",
451
460
  input: z3.object({ campaignId, creatorId })
452
461
  });
462
+ var revealContacts = defineOperation({
463
+ name: "reveal_contacts",
464
+ command: ["contacts", "reveal-batch"],
465
+ method: "POST",
466
+ path: "/campaigns/{campaignId}/contacts/reveal",
467
+ kind: "spend",
468
+ summary: "Reveal selected creators\u2019 emails for a campaign",
469
+ 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. Check the budget for the whole selection before calling. 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.",
470
+ input: z3.object({
471
+ campaignId,
472
+ creatorIds: z3.array(creatorId).min(1).max(10).describe("1 to 10 selected creator IDs"),
473
+ searchId: searchId.optional().describe("Mark successful additions in this search")
474
+ })
475
+ });
453
476
  var sendEmail = defineOperation({
454
477
  name: "send_email",
455
478
  command: ["emails", "send"],
@@ -457,12 +480,16 @@ var sendEmail = defineOperation({
457
480
  path: "/campaigns/{campaignId}/creators/{creatorId}/emails",
458
481
  kind: "send",
459
482
  summary: "Email a creator",
460
- description: "Sends a plain-text email to the creator\u2019s revealed address (call reveal_contact first). Replies arrive in the conversation (see get_conversation). The first 100 emails each day are free; after that each costs 0.1 credits, up to the daily limit (see get_account). 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.",
483
+ 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; after that each costs 0.1 credits, up to the daily limit (see get_account). 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.',
461
484
  input: z3.object({
462
485
  campaignId,
463
486
  creatorId,
464
- subject: z3.string().trim().min(1).max(200).describe("Email subject"),
465
- body: z3.string().trim().min(1).max(5e4).describe("Email body, plain text"),
487
+ subject: z3.string().trim().min(1).max(200).optional().describe(
488
+ "Email subject. Required for the first email; leave it out on a follow-up to reply in the same thread"
489
+ ),
490
+ body: z3.string().trim().min(1).max(5e4).describe(
491
+ "Email body, plain text; may use {name}, {handle}, {platform}, {followers} and {country}"
492
+ ),
466
493
  idempotencyKey: z3.string().trim().min(1).max(200).optional().describe("Retries with the same key never send twice")
467
494
  })
468
495
  });
@@ -473,7 +500,7 @@ var getConversation = defineOperation({
473
500
  path: "/campaigns/{campaignId}/creators/{creatorId}/conversation",
474
501
  kind: "read",
475
502
  summary: "Read the email conversation with a creator",
476
- 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. The thread is null until the first email is sent.",
503
+ 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.",
477
504
  input: z3.object({ campaignId, creatorId })
478
505
  });
479
506
  var price = z3.string().trim().min(1).max(200).optional().describe("Price the creator named or agreed, as said, e.g. $300 per video");
@@ -564,6 +591,7 @@ var operations = [
564
591
  getCampaignStatus,
565
592
  addCreator,
566
593
  revealContact,
594
+ revealContacts,
567
595
  sendEmail,
568
596
  getConversation,
569
597
  recordReply,
@@ -575,7 +603,7 @@ var operations = [
575
603
  import { Command, CommanderError } from "commander";
576
604
 
577
605
  // package.json
578
- var version = "0.4.0";
606
+ var version = "0.5.0";
579
607
 
580
608
  // src/http.ts
581
609
  var DEFAULT_API_URL = "https://www.creatorriver.com";
@@ -800,7 +828,7 @@ var LOGIN_HINT = "run `creatorriver auth login`";
800
828
  var GROUP_DESCRIPTIONS = {
801
829
  creators: "Find, inspect, unlock and save creators, and find more like one",
802
830
  campaigns: "Create, change and follow campaigns and the creators in them",
803
- contacts: "Reveal creator email addresses",
831
+ contacts: "Reveal email addresses for one or more selected creators",
804
832
  emails: "Send outreach emails",
805
833
  conversations: "Read email threads with creators and record their replies",
806
834
  searches: "Reopen, rename, archive and export past searches, and list filter values"
@@ -934,7 +962,7 @@ Exit codes: 0 ok, ${Object.entries(EXIT_CODES).sort(([, a], [, b]) => a - b).map
934
962
  "the whole input as a JSON object; flags override its fields"
935
963
  ).action(async (options) => {
936
964
  try {
937
- const parsed = operation.input.safeParse(buildInput(fields, options));
965
+ const parsed = operation.input.strict().safeParse(buildInput(fields, options));
938
966
  if (!parsed.success) {
939
967
  throw new CliError("invalid_input", "Invalid input", {
940
968
  issues: parsed.error.issues.map((issue) => ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "creatorriver",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "Creator River CLI: search 1.8M+ 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",
@@ -34,11 +34,11 @@
34
34
  "zod": "^4.1.5"
35
35
  },
36
36
  "devDependencies": {
37
- "@cde/contract": "0.1.0",
38
37
  "@types/node": "^20",
39
38
  "tsup": "^8.3.6",
40
39
  "tsx": "^4.20.3",
41
- "typescript": "^5"
40
+ "typescript": "^5",
41
+ "@cde/contract": "0.1.0"
42
42
  },
43
43
  "scripts": {
44
44
  "dev": "tsx src/bin/creatorriver.ts",