creatorriver 0.3.0 → 0.4.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/dist/creatorriver.js +166 -39
- package/package.json +1 -1
package/dist/creatorriver.js
CHANGED
|
@@ -102,6 +102,9 @@ function fillPath(template, input) {
|
|
|
102
102
|
|
|
103
103
|
// ../contract/src/operations.ts
|
|
104
104
|
import { z as z3 } from "zod";
|
|
105
|
+
var searchId = z3.string().trim().min(1).describe(
|
|
106
|
+
"Search id, from search_creators, find_similar_creators or list_searches"
|
|
107
|
+
);
|
|
105
108
|
var creatorId = z3.string().trim().min(1).describe("Creator id, from search_creators results");
|
|
106
109
|
var campaignId = z3.string().trim().min(1).describe("Campaign id, from list_campaigns or create_campaign");
|
|
107
110
|
var limit = (max, fallback) => z3.number().int().min(1).max(max).optional().describe(`How many to return, 1-${max} (default ${fallback})`);
|
|
@@ -150,6 +153,39 @@ var getAccount = defineOperation({
|
|
|
150
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.",
|
|
151
154
|
input: z3.object({})
|
|
152
155
|
});
|
|
156
|
+
var creatorFilters = {
|
|
157
|
+
platforms: z3.array(z3.enum(PLATFORMS)).optional().describe("Only creators on these platforms"),
|
|
158
|
+
niches: z3.array(z3.enum(CREATOR_NICHES)).optional().describe(
|
|
159
|
+
"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"
|
|
160
|
+
),
|
|
161
|
+
markets: z3.array(z3.string().trim().min(1)).optional().describe(
|
|
162
|
+
"Only creators based in these countries: two-letter codes, e.g. us, gb, jp"
|
|
163
|
+
),
|
|
164
|
+
audienceCountries: z3.array(z3.string().trim().min(1)).optional().describe(
|
|
165
|
+
"Only creators whose largest audience is in these countries: two-letter codes, e.g. us, gb, th"
|
|
166
|
+
),
|
|
167
|
+
languages: z3.array(z3.string().trim().min(1)).optional().describe(
|
|
168
|
+
"Only creators posting in these languages: two-letter codes, e.g. en, es, ja"
|
|
169
|
+
),
|
|
170
|
+
lastPostWithinDays: z3.number().int().refine(
|
|
171
|
+
(days) => LAST_POST_WITHIN_DAYS.includes(days),
|
|
172
|
+
{
|
|
173
|
+
message: "Must be 7, 14, 30, 90 or 180"
|
|
174
|
+
}
|
|
175
|
+
).optional().describe(
|
|
176
|
+
"Only creators whose latest post is at most this many days old: 7, 14, 30, 90 or 180"
|
|
177
|
+
),
|
|
178
|
+
minFollowers: count("At least this many followers"),
|
|
179
|
+
maxFollowers: count("At most this many followers"),
|
|
180
|
+
minAvgViews: count("At least this many average views per post"),
|
|
181
|
+
maxAvgViews: count("At most this many average views per post"),
|
|
182
|
+
minEngagementRate: engagementRate(
|
|
183
|
+
"At least this engagement rate, as a fraction: 0.02 for 2%"
|
|
184
|
+
),
|
|
185
|
+
maxEngagementRate: engagementRate(
|
|
186
|
+
"At most this engagement rate, as a fraction: 0.1 for 10%"
|
|
187
|
+
)
|
|
188
|
+
};
|
|
153
189
|
var searchCreators = defineOperation({
|
|
154
190
|
name: "search_creators",
|
|
155
191
|
command: ["creators", "search"],
|
|
@@ -162,44 +198,38 @@ var searchCreators = defineOperation({
|
|
|
162
198
|
query: z3.string().trim().min(1).max(1e3).describe(
|
|
163
199
|
"The creators you want, in plain words: niche, what their content is like, who watches it"
|
|
164
200
|
),
|
|
165
|
-
platforms: z3.array(z3.enum(PLATFORMS)).optional().describe("Only creators on these platforms"),
|
|
166
|
-
niches: z3.array(z3.enum(CREATOR_NICHES)).optional().describe(
|
|
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"
|
|
168
|
-
),
|
|
169
201
|
exampleCreators: z3.array(z3.string().trim().min(1).max(300)).max(10).optional().describe(
|
|
170
202
|
"Creators to find more like: @handles or profile links, e.g. @mkbhd or https://www.tiktok.com/@khaby.lame. The query still says what they should share. Ones not found are listed in warnings"
|
|
171
203
|
),
|
|
172
|
-
|
|
173
|
-
"Only creators based in these countries: two-letter codes, e.g. us, gb, jp"
|
|
174
|
-
),
|
|
175
|
-
audienceCountries: z3.array(z3.string().trim().min(1)).optional().describe(
|
|
176
|
-
"Only creators whose largest audience is in these countries: two-letter codes, e.g. us, gb, th"
|
|
177
|
-
),
|
|
178
|
-
languages: z3.array(z3.string().trim().min(1)).optional().describe(
|
|
179
|
-
"Only creators posting in these languages: two-letter codes, e.g. en, es, ja"
|
|
180
|
-
),
|
|
181
|
-
lastPostWithinDays: z3.number().int().refine(
|
|
182
|
-
(days) => LAST_POST_WITHIN_DAYS.includes(days),
|
|
183
|
-
{
|
|
184
|
-
message: "Must be 7, 14, 30, 90 or 180"
|
|
185
|
-
}
|
|
186
|
-
).optional().describe(
|
|
187
|
-
"Only creators whose latest post is at most this many days old: 7, 14, 30, 90 or 180"
|
|
188
|
-
),
|
|
189
|
-
minFollowers: count("At least this many followers"),
|
|
190
|
-
maxFollowers: count("At most this many followers"),
|
|
191
|
-
minAvgViews: count("At least this many average views per post"),
|
|
192
|
-
maxAvgViews: count("At most this many average views per post"),
|
|
193
|
-
minEngagementRate: engagementRate(
|
|
194
|
-
"At least this engagement rate, as a fraction: 0.02 for 2%"
|
|
195
|
-
),
|
|
196
|
-
maxEngagementRate: engagementRate(
|
|
197
|
-
"At most this engagement rate, as a fraction: 0.1 for 10%"
|
|
198
|
-
),
|
|
204
|
+
...creatorFilters,
|
|
199
205
|
campaignId: campaignId.optional().describe("Rank for this campaign and record the search in it"),
|
|
200
206
|
limit: limit(100, 20)
|
|
201
207
|
})
|
|
202
208
|
});
|
|
209
|
+
var browseCreators = defineOperation({
|
|
210
|
+
name: "browse_creators",
|
|
211
|
+
command: ["creators", "browse"],
|
|
212
|
+
method: "GET",
|
|
213
|
+
path: "/creators/browse",
|
|
214
|
+
kind: "read",
|
|
215
|
+
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.",
|
|
217
|
+
input: z3.object({ ...creatorFilters, limit: limit(100, 20) })
|
|
218
|
+
});
|
|
219
|
+
var findCreator = defineOperation({
|
|
220
|
+
name: "find_creator",
|
|
221
|
+
command: ["creators", "find"],
|
|
222
|
+
method: "GET",
|
|
223
|
+
path: "/creators/lookup",
|
|
224
|
+
kind: "read",
|
|
225
|
+
summary: "Find a creator by handle or profile link",
|
|
226
|
+
description: "Looks up a creator the user names by @handle or profile link, on every platform where that exact handle is in Creator River, and returns their creatorId for get_creator, add_creator or reveal_contact. Free. An empty list means Creator River does not have them.",
|
|
227
|
+
input: z3.object({
|
|
228
|
+
reference: z3.string().trim().min(1).max(300).describe(
|
|
229
|
+
"An @handle or a profile link, e.g. @mkbhd or https://www.youtube.com/@mkbhd"
|
|
230
|
+
)
|
|
231
|
+
})
|
|
232
|
+
});
|
|
203
233
|
var findSimilarCreators = defineOperation({
|
|
204
234
|
name: "find_similar_creators",
|
|
205
235
|
command: ["creators", "similar"],
|
|
@@ -236,6 +266,7 @@ var listSearches = defineOperation({
|
|
|
236
266
|
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.",
|
|
237
267
|
input: z3.object({
|
|
238
268
|
campaignId: campaignId.optional().describe("Only the searches run for this campaign"),
|
|
269
|
+
includeArchived: z3.boolean().optional().describe("Also list archived searches (default false)"),
|
|
239
270
|
page: z3.number().int().min(1).optional().describe("Page number, from 1"),
|
|
240
271
|
limit: limit(100, 20)
|
|
241
272
|
})
|
|
@@ -248,10 +279,43 @@ var getSearch = defineOperation({
|
|
|
248
279
|
kind: "read",
|
|
249
280
|
summary: "Read a past search\u2019s results again",
|
|
250
281
|
description: "Returns a past search and its results, in the order they were ranked, as search_creators returned them. Free, and does not count against the daily search limit.",
|
|
282
|
+
input: z3.object({ searchId })
|
|
283
|
+
});
|
|
284
|
+
var getSearchFilters = defineOperation({
|
|
285
|
+
name: "get_search_filters",
|
|
286
|
+
command: ["searches", "filters"],
|
|
287
|
+
method: "GET",
|
|
288
|
+
path: "/searches/filters",
|
|
289
|
+
kind: "read",
|
|
290
|
+
summary: "List the values the search filters take",
|
|
291
|
+
description: "Returns the values the search and browse filters accept: platforms, creator countries and languages present in the database, niches and activity windows. Free.",
|
|
292
|
+
input: z3.object({})
|
|
293
|
+
});
|
|
294
|
+
var updateSearch = defineOperation({
|
|
295
|
+
name: "update_search",
|
|
296
|
+
command: ["searches", "update"],
|
|
297
|
+
method: "PATCH",
|
|
298
|
+
path: "/searches/{searchId}",
|
|
299
|
+
kind: "write",
|
|
300
|
+
summary: "Rename or archive a past search",
|
|
301
|
+
description: "Names a past search, or archives it so list_searches leaves it out (archived: false brings it back). Free.",
|
|
251
302
|
input: z3.object({
|
|
252
|
-
searchId
|
|
253
|
-
|
|
254
|
-
)
|
|
303
|
+
searchId,
|
|
304
|
+
name: z3.string().trim().min(1).max(80).optional().describe("New name"),
|
|
305
|
+
archived: z3.boolean().optional().describe("true leaves it out of list_searches; false brings it back")
|
|
306
|
+
})
|
|
307
|
+
});
|
|
308
|
+
var exportSearch = defineOperation({
|
|
309
|
+
name: "export_search",
|
|
310
|
+
command: ["searches", "export"],
|
|
311
|
+
method: "GET",
|
|
312
|
+
path: "/searches/{searchId}/export",
|
|
313
|
+
kind: "read",
|
|
314
|
+
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.",
|
|
316
|
+
input: z3.object({
|
|
317
|
+
searchId,
|
|
318
|
+
scope: z3.enum(["all", "added"]).optional().describe("all results (default), or only the ones added to a campaign")
|
|
255
319
|
})
|
|
256
320
|
});
|
|
257
321
|
var getCreator = defineOperation({
|
|
@@ -277,6 +341,42 @@ var unlockCreator = defineOperation({
|
|
|
277
341
|
description: "Unlocks the creator and returns the full profile with handle, profile link and recent video titles and links. Costs 0.5 credits the first time for each creator; unlocking again is free. It does not reveal the email address; use reveal_contact for that.",
|
|
278
342
|
input: z3.object({ creatorId })
|
|
279
343
|
});
|
|
344
|
+
var saveCreator = defineOperation({
|
|
345
|
+
name: "save_creator",
|
|
346
|
+
command: ["creators", "save"],
|
|
347
|
+
method: "POST",
|
|
348
|
+
path: "/creators/{creatorId}/save",
|
|
349
|
+
kind: "spend",
|
|
350
|
+
summary: "Save a creator to the account\u2019s saved list",
|
|
351
|
+
description: "Saves a creator to the account\u2019s saved list, which is the user\u2019s own bookmarks outside any campaign (the dashboard\u2019s Saved page). Saving unlocks the creator, which costs 0.5 credits the first time for each creator; saving again is free. Pass searchId to remember where they were found.",
|
|
352
|
+
input: z3.object({
|
|
353
|
+
creatorId,
|
|
354
|
+
searchId: z3.string().trim().min(1).optional().describe("The search the creator was found in")
|
|
355
|
+
})
|
|
356
|
+
});
|
|
357
|
+
var unsaveCreator = defineOperation({
|
|
358
|
+
name: "unsave_creator",
|
|
359
|
+
command: ["creators", "unsave"],
|
|
360
|
+
method: "DELETE",
|
|
361
|
+
path: "/creators/{creatorId}/save",
|
|
362
|
+
kind: "write",
|
|
363
|
+
summary: "Remove a creator from the saved list",
|
|
364
|
+
description: "Removes a creator from the account\u2019s saved list. Free; the creator stays unlocked and in any campaign.",
|
|
365
|
+
input: z3.object({ creatorId })
|
|
366
|
+
});
|
|
367
|
+
var listSavedCreators = defineOperation({
|
|
368
|
+
name: "list_saved_creators",
|
|
369
|
+
command: ["creators", "saved"],
|
|
370
|
+
method: "GET",
|
|
371
|
+
path: "/creators/saved",
|
|
372
|
+
kind: "read",
|
|
373
|
+
summary: "List saved creators",
|
|
374
|
+
description: "Lists the creators on the account\u2019s saved list, most recently saved first. Free.",
|
|
375
|
+
input: z3.object({
|
|
376
|
+
page: z3.number().int().min(1).optional().describe("Page number, from 1"),
|
|
377
|
+
limit: limit(100, 20)
|
|
378
|
+
})
|
|
379
|
+
});
|
|
280
380
|
var listCampaigns = defineOperation({
|
|
281
381
|
name: "list_campaigns",
|
|
282
382
|
command: ["campaigns", "list"],
|
|
@@ -414,6 +514,20 @@ var confirmCollaboration = defineOperation({
|
|
|
414
514
|
liveWindow
|
|
415
515
|
})
|
|
416
516
|
});
|
|
517
|
+
var addCreator = defineOperation({
|
|
518
|
+
name: "add_creator",
|
|
519
|
+
command: ["campaigns", "add"],
|
|
520
|
+
method: "POST",
|
|
521
|
+
path: "/campaigns/{campaignId}/creators/{creatorId}",
|
|
522
|
+
kind: "spend",
|
|
523
|
+
summary: "Shortlist a creator in a campaign",
|
|
524
|
+
description: "Adds a creator to a campaign, at the outreach stage, without revealing the email: use it to build a shortlist before deciding whom to contact (reveal_contact adds the creator too). Adding unlocks the creator, which costs 0.5 credits the first time for each creator; adding again is free. Pass searchId to mark the creator as added in that search. A creator excluded from the campaign cannot be added.",
|
|
525
|
+
input: z3.object({
|
|
526
|
+
campaignId,
|
|
527
|
+
creatorId,
|
|
528
|
+
searchId: z3.string().trim().min(1).optional().describe("The search the creator came from, to mark it added there")
|
|
529
|
+
})
|
|
530
|
+
});
|
|
417
531
|
var excludeCreator = defineOperation({
|
|
418
532
|
name: "exclude_creator",
|
|
419
533
|
command: ["campaigns", "exclude"],
|
|
@@ -421,21 +535,34 @@ var excludeCreator = defineOperation({
|
|
|
421
535
|
path: "/campaigns/{campaignId}/creators/{creatorId}/exclusion",
|
|
422
536
|
kind: "write",
|
|
423
537
|
summary: "Take a creator out of a campaign",
|
|
424
|
-
description: "Takes a creator out of a campaign for good: they move to closed and reveal_contact will
|
|
425
|
-
input: z3.object({
|
|
538
|
+
description: "Takes a creator out of a campaign for good: they move to closed and neither add_creator nor reveal_contact will put them back in this campaign. Their conversation stays readable. Pass searchId to also drop them from that search\u2019s results (get_search). Free; credits already spent are not refunded. Use it when the user rules a creator out.",
|
|
539
|
+
input: z3.object({
|
|
540
|
+
campaignId,
|
|
541
|
+
creatorId,
|
|
542
|
+
searchId: z3.string().trim().min(1).optional().describe("A search to drop the creator from as well")
|
|
543
|
+
})
|
|
426
544
|
});
|
|
427
545
|
var operations = [
|
|
428
546
|
getAccount,
|
|
429
547
|
searchCreators,
|
|
548
|
+
browseCreators,
|
|
549
|
+
findCreator,
|
|
430
550
|
findSimilarCreators,
|
|
431
551
|
listSearches,
|
|
432
552
|
getSearch,
|
|
553
|
+
getSearchFilters,
|
|
554
|
+
updateSearch,
|
|
555
|
+
exportSearch,
|
|
433
556
|
getCreator,
|
|
434
557
|
unlockCreator,
|
|
558
|
+
saveCreator,
|
|
559
|
+
unsaveCreator,
|
|
560
|
+
listSavedCreators,
|
|
435
561
|
listCampaigns,
|
|
436
562
|
createCampaign,
|
|
437
563
|
updateCampaign,
|
|
438
564
|
getCampaignStatus,
|
|
565
|
+
addCreator,
|
|
439
566
|
revealContact,
|
|
440
567
|
sendEmail,
|
|
441
568
|
getConversation,
|
|
@@ -448,7 +575,7 @@ var operations = [
|
|
|
448
575
|
import { Command, CommanderError } from "commander";
|
|
449
576
|
|
|
450
577
|
// package.json
|
|
451
|
-
var version = "0.
|
|
578
|
+
var version = "0.4.0";
|
|
452
579
|
|
|
453
580
|
// src/http.ts
|
|
454
581
|
var DEFAULT_API_URL = "https://www.creatorriver.com";
|
|
@@ -671,12 +798,12 @@ async function waitForLogin(endpoint2, io, login, waitSeconds) {
|
|
|
671
798
|
// src/cli.ts
|
|
672
799
|
var LOGIN_HINT = "run `creatorriver auth login`";
|
|
673
800
|
var GROUP_DESCRIPTIONS = {
|
|
674
|
-
creators: "Find, inspect and
|
|
801
|
+
creators: "Find, inspect, unlock and save creators, and find more like one",
|
|
675
802
|
campaigns: "Create, change and follow campaigns and the creators in them",
|
|
676
803
|
contacts: "Reveal creator email addresses",
|
|
677
804
|
emails: "Send outreach emails",
|
|
678
805
|
conversations: "Read email threads with creators and record their replies",
|
|
679
|
-
searches: "
|
|
806
|
+
searches: "Reopen, rename, archive and export past searches, and list filter values"
|
|
680
807
|
};
|
|
681
808
|
function forCli(text, operations2) {
|
|
682
809
|
return operations2.reduce(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "creatorriver",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.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",
|