influship 0.2.0 → 0.3.1

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.
Files changed (262) hide show
  1. package/CHANGELOG.md +48 -30
  2. package/LICENSE +1 -1
  3. package/README.md +88 -43
  4. package/client.d.mts +49 -29
  5. package/client.d.mts.map +1 -1
  6. package/client.d.ts +49 -29
  7. package/client.d.ts.map +1 -1
  8. package/client.js +89 -56
  9. package/client.js.map +1 -1
  10. package/client.mjs +89 -56
  11. package/client.mjs.map +1 -1
  12. package/core/api-promise.d.mts +2 -2
  13. package/core/api-promise.d.mts.map +1 -1
  14. package/core/api-promise.d.ts +2 -2
  15. package/core/api-promise.d.ts.map +1 -1
  16. package/core/api-promise.js.map +1 -1
  17. package/core/api-promise.mjs.map +1 -1
  18. package/core/error.d.mts +2 -2
  19. package/core/error.d.mts.map +1 -1
  20. package/core/error.d.ts +2 -2
  21. package/core/error.d.ts.map +1 -1
  22. package/core/error.js +4 -4
  23. package/core/error.js.map +1 -1
  24. package/core/error.mjs +2 -2
  25. package/core/error.mjs.map +1 -1
  26. package/core/pagination.d.mts +75 -0
  27. package/core/pagination.d.mts.map +1 -0
  28. package/core/pagination.d.ts +75 -0
  29. package/core/pagination.d.ts.map +1 -0
  30. package/core/pagination.js +139 -0
  31. package/core/pagination.js.map +1 -0
  32. package/core/pagination.mjs +132 -0
  33. package/core/pagination.mjs.map +1 -0
  34. package/core/resource.d.mts +3 -3
  35. package/core/resource.d.mts.map +1 -1
  36. package/core/resource.d.ts +3 -3
  37. package/core/resource.d.ts.map +1 -1
  38. package/core/resource.js.map +1 -1
  39. package/core/resource.mjs.map +1 -1
  40. package/index.d.mts +4 -3
  41. package/index.d.mts.map +1 -1
  42. package/index.d.ts +4 -3
  43. package/index.d.ts.map +1 -1
  44. package/index.js +6 -4
  45. package/index.js.map +1 -1
  46. package/index.mjs +4 -3
  47. package/index.mjs.map +1 -1
  48. package/internal/parse.d.mts +2 -2
  49. package/internal/parse.d.mts.map +1 -1
  50. package/internal/parse.d.ts +2 -2
  51. package/internal/parse.d.ts.map +1 -1
  52. package/internal/parse.js +5 -0
  53. package/internal/parse.js.map +1 -1
  54. package/internal/parse.mjs +5 -0
  55. package/internal/parse.mjs.map +1 -1
  56. package/internal/shims.js +1 -1
  57. package/internal/shims.js.map +1 -1
  58. package/internal/shims.mjs +1 -1
  59. package/internal/shims.mjs.map +1 -1
  60. package/internal/tslib.js +17 -17
  61. package/internal/uploads.d.mts +4 -4
  62. package/internal/uploads.d.mts.map +1 -1
  63. package/internal/uploads.d.ts +4 -4
  64. package/internal/uploads.d.ts.map +1 -1
  65. package/internal/uploads.js.map +1 -1
  66. package/internal/uploads.mjs.map +1 -1
  67. package/internal/utils/base64.js +2 -2
  68. package/internal/utils/base64.js.map +1 -1
  69. package/internal/utils/base64.mjs +3 -3
  70. package/internal/utils/base64.mjs.map +1 -1
  71. package/internal/utils/log.d.mts +3 -3
  72. package/internal/utils/log.d.mts.map +1 -1
  73. package/internal/utils/log.d.ts +3 -3
  74. package/internal/utils/log.d.ts.map +1 -1
  75. package/internal/utils/log.js.map +1 -1
  76. package/internal/utils/log.mjs.map +1 -1
  77. package/internal/utils/path.js +1 -1
  78. package/internal/utils/path.js.map +1 -1
  79. package/internal/utils/path.mjs +2 -2
  80. package/internal/utils/path.mjs.map +1 -1
  81. package/internal/utils/query.d.mts +2 -0
  82. package/internal/utils/query.d.mts.map +1 -0
  83. package/internal/utils/query.d.ts +2 -0
  84. package/internal/utils/query.d.ts.map +1 -0
  85. package/internal/utils/query.js +10 -0
  86. package/internal/utils/query.js.map +1 -0
  87. package/internal/utils/query.mjs +6 -0
  88. package/internal/utils/query.mjs.map +1 -0
  89. package/internal/utils/values.js +5 -5
  90. package/internal/utils/values.js.map +1 -1
  91. package/internal/utils/values.mjs +6 -6
  92. package/internal/utils/values.mjs.map +1 -1
  93. package/internal/utils.d.mts +1 -0
  94. package/internal/utils.d.ts +1 -0
  95. package/internal/utils.js +1 -0
  96. package/internal/utils.js.map +1 -1
  97. package/internal/utils.mjs +1 -0
  98. package/package.json +13 -3
  99. package/pagination.d.mts +2 -0
  100. package/pagination.d.mts.map +1 -0
  101. package/pagination.d.ts +2 -0
  102. package/pagination.d.ts.map +1 -0
  103. package/pagination.js +6 -0
  104. package/pagination.js.map +1 -0
  105. package/pagination.mjs +2 -0
  106. package/pagination.mjs.map +1 -0
  107. package/resources/creators.d.mts +326 -247
  108. package/resources/creators.d.mts.map +1 -1
  109. package/resources/creators.d.ts +326 -247
  110. package/resources/creators.d.ts.map +1 -1
  111. package/resources/creators.js +80 -63
  112. package/resources/creators.js.map +1 -1
  113. package/resources/creators.mjs +80 -63
  114. package/resources/creators.mjs.map +1 -1
  115. package/resources/health.d.mts +13 -1
  116. package/resources/health.d.mts.map +1 -1
  117. package/resources/health.d.ts +13 -1
  118. package/resources/health.d.ts.map +1 -1
  119. package/resources/health.js +4 -1
  120. package/resources/health.js.map +1 -1
  121. package/resources/health.mjs +4 -1
  122. package/resources/health.mjs.map +1 -1
  123. package/resources/index.d.mts +6 -7
  124. package/resources/index.d.mts.map +1 -1
  125. package/resources/index.d.ts +6 -7
  126. package/resources/index.d.ts.map +1 -1
  127. package/resources/index.js +5 -7
  128. package/resources/index.js.map +1 -1
  129. package/resources/index.mjs +2 -3
  130. package/resources/index.mjs.map +1 -1
  131. package/resources/posts.d.mts +82 -202
  132. package/resources/posts.d.mts.map +1 -1
  133. package/resources/posts.d.ts +82 -202
  134. package/resources/posts.d.ts.map +1 -1
  135. package/resources/posts.js +17 -38
  136. package/resources/posts.js.map +1 -1
  137. package/resources/posts.mjs +17 -38
  138. package/resources/posts.mjs.map +1 -1
  139. package/resources/profiles.d.mts +208 -58
  140. package/resources/profiles.d.mts.map +1 -1
  141. package/resources/profiles.d.ts +208 -58
  142. package/resources/profiles.d.ts.map +1 -1
  143. package/resources/profiles.js +37 -41
  144. package/resources/profiles.js.map +1 -1
  145. package/resources/profiles.mjs +37 -41
  146. package/resources/profiles.mjs.map +1 -1
  147. package/resources/raw/index.d.mts +4 -0
  148. package/resources/raw/index.d.mts.map +1 -0
  149. package/resources/raw/index.d.ts +4 -0
  150. package/resources/raw/index.d.ts.map +1 -0
  151. package/resources/raw/index.js +11 -0
  152. package/resources/raw/index.js.map +1 -0
  153. package/resources/raw/index.mjs +5 -0
  154. package/resources/raw/index.mjs.map +1 -0
  155. package/resources/raw/instagram.d.mts +215 -0
  156. package/resources/raw/instagram.d.mts.map +1 -0
  157. package/resources/raw/instagram.d.ts +215 -0
  158. package/resources/raw/instagram.d.ts.map +1 -0
  159. package/resources/raw/instagram.js +31 -0
  160. package/resources/raw/instagram.js.map +1 -0
  161. package/resources/raw/instagram.mjs +27 -0
  162. package/resources/raw/instagram.mjs.map +1 -0
  163. package/resources/raw/raw.d.mts +14 -0
  164. package/resources/raw/raw.d.mts.map +1 -0
  165. package/resources/raw/raw.d.ts +14 -0
  166. package/resources/raw/raw.d.ts.map +1 -0
  167. package/resources/raw/raw.js +21 -0
  168. package/resources/raw/raw.js.map +1 -0
  169. package/resources/raw/raw.mjs +16 -0
  170. package/resources/raw/raw.mjs.map +1 -0
  171. package/resources/raw/youtube.d.mts +455 -0
  172. package/resources/raw/youtube.d.mts.map +1 -0
  173. package/resources/raw/youtube.d.ts +455 -0
  174. package/resources/raw/youtube.d.ts.map +1 -0
  175. package/resources/raw/youtube.js +61 -0
  176. package/resources/raw/youtube.js.map +1 -0
  177. package/resources/raw/youtube.mjs +57 -0
  178. package/resources/raw/youtube.mjs.map +1 -0
  179. package/resources/raw.d.mts +2 -0
  180. package/resources/raw.d.mts.map +1 -0
  181. package/resources/raw.d.ts +2 -0
  182. package/resources/raw.d.ts.map +1 -0
  183. package/resources/raw.js +6 -0
  184. package/resources/raw.js.map +1 -0
  185. package/resources/raw.mjs +3 -0
  186. package/resources/raw.mjs.map +1 -0
  187. package/resources/search.d.mts +126 -117
  188. package/resources/search.d.mts.map +1 -1
  189. package/resources/search.d.ts +126 -117
  190. package/resources/search.d.ts.map +1 -1
  191. package/resources/search.js +46 -13
  192. package/resources/search.js.map +1 -1
  193. package/resources/search.mjs +46 -13
  194. package/resources/search.mjs.map +1 -1
  195. package/resources/shared.d.mts +55 -0
  196. package/resources/shared.d.mts.map +1 -0
  197. package/resources/shared.d.ts +55 -0
  198. package/resources/shared.d.ts.map +1 -0
  199. package/resources/shared.js +4 -0
  200. package/resources/shared.js.map +1 -0
  201. package/resources/shared.mjs +3 -0
  202. package/resources/shared.mjs.map +1 -0
  203. package/src/client.ts +153 -127
  204. package/src/core/api-promise.ts +4 -4
  205. package/src/core/error.ts +2 -2
  206. package/src/core/pagination.ts +232 -0
  207. package/src/core/resource.ts +3 -3
  208. package/src/index.ts +4 -3
  209. package/src/internal/parse.ts +8 -2
  210. package/src/internal/shims.ts +1 -1
  211. package/src/internal/uploads.ts +5 -5
  212. package/src/internal/utils/base64.ts +3 -3
  213. package/src/internal/utils/log.ts +3 -3
  214. package/src/internal/utils/path.ts +2 -2
  215. package/src/internal/utils/query.ts +7 -0
  216. package/src/internal/utils/values.ts +6 -6
  217. package/src/internal/utils.ts +1 -0
  218. package/src/pagination.ts +2 -0
  219. package/src/resources/creators.ts +369 -271
  220. package/src/resources/health.ts +13 -1
  221. package/src/resources/index.ts +22 -41
  222. package/src/resources/posts.ts +89 -232
  223. package/src/resources/profiles.ts +252 -59
  224. package/src/resources/raw/index.ts +16 -0
  225. package/src/resources/raw/instagram.ts +271 -0
  226. package/src/resources/raw/raw.ts +47 -0
  227. package/src/resources/raw/youtube.ts +585 -0
  228. package/src/resources/raw.ts +3 -0
  229. package/src/resources/search.ts +145 -131
  230. package/src/resources/shared.ts +66 -0
  231. package/src/version.ts +1 -1
  232. package/version.d.mts +1 -1
  233. package/version.d.ts +1 -1
  234. package/version.js +1 -1
  235. package/version.mjs +1 -1
  236. package/resources/brand-safety.d.mts +0 -234
  237. package/resources/brand-safety.d.mts.map +0 -1
  238. package/resources/brand-safety.d.ts +0 -234
  239. package/resources/brand-safety.d.ts.map +0 -1
  240. package/resources/brand-safety.js +0 -75
  241. package/resources/brand-safety.js.map +0 -1
  242. package/resources/brand-safety.mjs +0 -71
  243. package/resources/brand-safety.mjs.map +0 -1
  244. package/resources/lookalike.d.mts +0 -142
  245. package/resources/lookalike.d.mts.map +0 -1
  246. package/resources/lookalike.d.ts +0 -142
  247. package/resources/lookalike.d.ts.map +0 -1
  248. package/resources/lookalike.js +0 -28
  249. package/resources/lookalike.js.map +0 -1
  250. package/resources/lookalike.mjs +0 -24
  251. package/resources/lookalike.mjs.map +0 -1
  252. package/resources/match.d.mts +0 -90
  253. package/resources/match.d.mts.map +0 -1
  254. package/resources/match.d.ts +0 -90
  255. package/resources/match.d.ts.map +0 -1
  256. package/resources/match.js +0 -22
  257. package/resources/match.js.map +0 -1
  258. package/resources/match.mjs +0 -18
  259. package/resources/match.mjs.map +0 -1
  260. package/src/resources/brand-safety.ts +0 -304
  261. package/src/resources/lookalike.ts +0 -186
  262. package/src/resources/match.ts +0 -115
@@ -1,58 +1,63 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../core/resource';
4
- import * as CreatorsAPI from './creators';
4
+ import * as Shared from './shared';
5
5
  import { APIPromise } from '../core/api-promise';
6
+ import { BodyCursor, type BodyCursorParams, PagePromise } from '../core/pagination';
6
7
  import { RequestOptions } from '../internal/request-options';
7
8
  import { path } from '../internal/utils/path';
8
9
 
10
+ /**
11
+ * Retrieve creator profiles and discover new creators through search, autocomplete, and lookalike matching. Creators are cross-platform entities that may have profiles on multiple social networks.
12
+ */
9
13
  export class Creators extends APIResource {
10
14
  /**
11
- * Get creator-level information (person data) for one or multiple creators by
12
- * their IDs.
15
+ * Retrieve a creator's profile including AI-generated summary, content themes, and
16
+ * optionally their linked social profiles.
13
17
  *
14
- * This endpoint returns basic creator profile data including name, bio, avatar,
15
- * and status information. For platform-specific data (follower counts, engagement
16
- * rates, etc.), use the `/v1/creators/{id}/profiles` endpoint.
18
+ * **What is a Creator?** A creator is a cross-platform entity representing a
19
+ * person or brand. They may have profiles on multiple social networks (Instagram,
20
+ * YouTube, TikTok, etc.) that are linked together.
17
21
  *
18
- * **Creator vs Profile Data:**
22
+ * **Include options:**
19
23
  *
20
- * - **Creator data**: Person-level information (name, bio, avatar, status)
21
- * - **Profile data**: Platform-specific data (follower counts, engagement,
22
- * metrics)
24
+ * - `profiles`: Include all linked social profiles with metrics
23
25
  *
24
- * **Pricing**: 0.1 credits per creator profile returned
26
+ * **Pricing**: 0.1 credits per request ($0.001)
25
27
  *
26
28
  * @example
27
29
  * ```ts
28
- * const creator = await client.creators.retrieve({
29
- * creator_ids: 'creator_ids',
30
- * });
30
+ * const creator = await client.creators.retrieve(
31
+ * '123e4567-e89b-12d3-a456-426614174000',
32
+ * { include: ['profiles'] },
33
+ * );
31
34
  * ```
32
35
  */
33
- retrieve(query: CreatorRetrieveParams, options?: RequestOptions): APIPromise<CreatorRetrieveResponse> {
34
- return this._client.get('/v1/creators', { query, ...options });
36
+ retrieve(
37
+ id: string,
38
+ query: CreatorRetrieveParams,
39
+ options?: RequestOptions,
40
+ ): APIPromise<CreatorRetrieveResponse> {
41
+ return this._client.get(path`/v1/creators/${id}`, { query, ...options });
35
42
  }
36
43
 
37
44
  /**
38
- * Search creators by partial name or on-platform username for autocomplete
39
- * suggestions.
45
+ * Fast typeahead search for creators by name or username. Optimized for
46
+ * search-as-you-type UIs with sub-100ms response times.
40
47
  *
41
- * This endpoint searches across both global creator names and platform-specific
42
- * usernames/display names from all platforms. Use the platform parameter to filter
43
- * results to only show creators that have profiles on the specified platform.
48
+ * **Matching behavior:**
44
49
  *
45
- * Use the scope parameter to control response granularity:
50
+ * - Matches against creator name, username, and display name
51
+ * - Results include which field matched and the matching value
52
+ * - Prefix matching (e.g., "fit" matches "fitness_coach")
46
53
  *
47
- * - `creator_only`: Returns only creator profile data (id, name, avatar)
48
- * - `matched_platforms`: Returns creator data + only the social accounts that
49
- * matched the search
50
- * - `all_platforms`: Returns creator data + all social accounts (default)
54
+ * **Scope options:**
51
55
  *
52
- * This endpoint is optimized for fast autocomplete functionality and returns
53
- * lightweight results suitable for dropdown suggestions.
56
+ * - `creator_only`: Return only the creator entity
57
+ * - `matched_platforms`: Return only profiles that matched the query
58
+ * - `all_platforms`: Return all linked profiles (default)
54
59
  *
55
- * **Pricing**: 0.001 credits per request
60
+ * **Pricing**: 0.05 credits per request ($0.0005)
56
61
  *
57
62
  * @example
58
63
  * ```ts
@@ -69,382 +74,475 @@ export class Creators extends APIResource {
69
74
  }
70
75
 
71
76
  /**
72
- * **EXPLORATION ENDPOINT**: Get all social account data when you know a creator
73
- * UUID.
77
+ * Find creators similar to provided seed creators using AI-powered similarity
78
+ * matching. Analyzes content themes, audience overlap, posting style, and
79
+ * engagement patterns.
74
80
  *
75
- * **🎯 When to use this endpoint:**
81
+ * **Use cases:**
76
82
  *
77
- * - You have a creator UUID (from `/v1/creators` or `/v1/profiles` response)
78
- * - You want to see all social accounts for a creator (Instagram, TikTok, etc.)
79
- * - You need comprehensive social account data for a creator
80
- * - ✅ You want to explore all platforms a creator is on
83
+ * - Expand campaigns with creators similar to proven performers
84
+ * - Find alternatives when preferred creators are unavailable
85
+ * - Discover emerging creators in the same niche
81
86
  *
82
- * **❌ When NOT to use this endpoint:**
87
+ * **How it works:**
83
88
  *
84
- * - You only have a username and platform (use `/v1/profiles` instead)
85
- * - You don't have a creator UUID (use `/v1/profiles` to discover first)
89
+ * 1. Provide 1-10 seed creators (by ID or platform/username)
90
+ * 2. Optionally weight seeds to prioritize certain creators
91
+ * 3. Get ranked results with similarity scores and shared traits
86
92
  *
87
- * **📊 Response Format:** Returns `SocialAccountLite` or `SocialAccountDetailed`
88
- * objects with identical structure to `/v1/profiles`. Both endpoints return the
89
- * same data structure for consistency.
93
+ * **Pricing**: 1.5 credits per creator returned ($0.015)
90
94
  *
91
- * **🔗 Data Relationships:**
95
+ * @example
96
+ * ```ts
97
+ * // Automatically fetches more pages as needed.
98
+ * for await (const creatorLookalikeResponse of client.creators.lookalike(
99
+ * { seeds: [{}] },
100
+ * )) {
101
+ * // ...
102
+ * }
103
+ * ```
104
+ */
105
+ lookalike(
106
+ body: CreatorLookalikeParams,
107
+ options?: RequestOptions,
108
+ ): PagePromise<CreatorLookalikeResponsesBodyCursor, CreatorLookalikeResponse> {
109
+ return this._client.getAPIList('/v1/creators/lookalike', BodyCursor<CreatorLookalikeResponse>, {
110
+ body,
111
+ method: 'post',
112
+ ...options,
113
+ });
114
+ }
115
+
116
+ /**
117
+ * Evaluate how well creators match a specific campaign using AI analysis. Returns
118
+ * a fit score (0-1), decision recommendation (good/neutral/avoid), and
119
+ * evidence-based explanations.
92
120
  *
93
- * - This endpoint requires a creator UUID (not a social account ID)
94
- * - Use `creator_profile_id` from `/v1/profiles` response as the `{id}` parameter
95
- * - Returns all social accounts associated with that creator
96
- * - Filter by platform using the `platforms` query parameter
121
+ * **Use cases:**
97
122
  *
98
- * **🔄 Typical Workflow:**
123
+ * - Vet shortlisted creators before outreach
124
+ * - Rank candidates for a specific campaign
125
+ * - Get AI-generated talking points for why a creator fits
99
126
  *
100
- * 1. **Discovery**: Call `/v1/profiles` with username+platform → get social
101
- * account data + creator_profile_id
102
- * 2. **All Accounts**: Call `/v1/creators/{creator_profile_id}/profiles` → get all
103
- * social accounts for that creator
104
- * 3. **Creator Data**: Call `/v1/creators` with creator_profile_id → get
105
- * creator-level data
127
+ * **How it works:**
106
128
  *
107
- * **⚙️ Parameters:**
129
+ * 1. Describe your campaign intent and target audience
130
+ * 2. Provide up to 100 creators to evaluate
131
+ * 3. Get detailed scores with explanations and evidence
108
132
  *
109
- * - `mode`: `lite` (default) or `detailed` - controls response detail level
110
- * - `platforms`: Comma-separated list of platforms to filter (e.g.,
111
- * `instagram,tiktok`) **Pricing**: 0.01-0.05 credits per social account
112
- * (lite/detailed mode)
133
+ * **Pricing**: 1 credit per creator scored ($0.01)
113
134
  *
114
135
  * @example
115
136
  * ```ts
116
- * const response = await client.creators.listProfiles(
117
- * '123e4567-e89b-12d3-a456-426614174000',
118
- * );
137
+ * const response = await client.creators.match({
138
+ * creators: [{}],
139
+ * intent: {
140
+ * query:
141
+ * 'Looking for fitness influencers to promote our new protein bar',
142
+ * },
143
+ * });
119
144
  * ```
120
145
  */
121
- listProfiles(
122
- id: string,
123
- query: CreatorListProfilesParams | null | undefined = {},
124
- options?: RequestOptions,
125
- ): APIPromise<CreatorListProfilesResponse> {
126
- return this._client.get(path`/v1/creators/${id}/profiles`, { query, ...options });
146
+ match(body: CreatorMatchParams, options?: RequestOptions): APIPromise<CreatorMatchResponse> {
147
+ return this._client.post('/v1/creators/match', { body, ...options });
127
148
  }
128
149
  }
129
150
 
130
- /**
131
- * Basic creator information
132
- */
133
- export interface Creator {
134
- /**
135
- * Unique creator identifier
136
- */
137
- id?: string;
138
-
139
- /**
140
- * Creator's avatar URL
141
- */
142
- avatar?: string | null;
151
+ export type CreatorLookalikeResponsesBodyCursor = BodyCursor<CreatorLookalikeResponse>;
143
152
 
153
+ export interface CreatorRetrieveResponse {
144
154
  /**
145
- * Creator's bio text
155
+ * Full creator details
146
156
  */
147
- bio?: string | null;
157
+ data: CreatorRetrieveResponse.Data;
148
158
 
149
159
  /**
150
- * Creator's display name
160
+ * Present when partial results were returned because one or more linked profiles
161
+ * were skipped for data integrity reasons.
151
162
  */
152
- name?: string | null;
163
+ warning?: string;
153
164
  }
154
165
 
155
- /**
156
- * Creator autocomplete result
157
- */
158
- export interface CreatorAutocomplete {
159
- /**
160
- * Unique creator identifier
161
- */
162
- id: string;
163
-
164
- /**
165
- * Creator's avatar URL
166
- */
167
- avatar: string;
168
-
166
+ export namespace CreatorRetrieveResponse {
169
167
  /**
170
- * Creator's display name
168
+ * Full creator details
171
169
  */
172
- name: string;
170
+ export interface Data {
171
+ /**
172
+ * Creator unique identifier
173
+ */
174
+ id: string;
173
175
 
174
- /**
175
- * Matching social media platforms
176
- */
177
- platforms: Array<CreatorAutocomplete.Platform>;
178
- }
176
+ /**
177
+ * AI-generated summary of the creator
178
+ */
179
+ ai_summary: string | null;
179
180
 
180
- export namespace CreatorAutocomplete {
181
- export interface Platform {
182
181
  /**
183
- * Display name on the platform
182
+ * Avatar URL
184
183
  */
185
- display_name: string;
184
+ avatar_url: string | null;
186
185
 
187
186
  /**
188
- * Field that matched the search
187
+ * Creator bio
189
188
  */
190
- match_field: string;
189
+ bio: string | null;
191
190
 
192
191
  /**
193
- * Type of match found
192
+ * Content themes/topics
194
193
  */
195
- match_type: 'name' | 'username' | 'display_name';
194
+ content_themes: Array<string>;
196
195
 
197
196
  /**
198
- * Social media platform
197
+ * Creator display name
199
198
  */
200
- platform: 'instagram' | 'tiktok';
199
+ name: string;
201
200
 
202
201
  /**
203
- * Username on the platform
202
+ * Social profiles (only included when include=profiles)
204
203
  */
205
- username: string;
204
+ profiles?: Array<Shared.ProfileSummary>;
206
205
  }
207
206
  }
208
207
 
209
- /**
210
- * Extended social account information with detailed metrics
211
- */
212
- export interface SocialAccountDetailed extends SocialAccountLite {
213
- /**
214
- * Average comments per post from last 12 posts. null if account has <3 posts or is
215
- * private.
216
- */
217
- avg_comments_recent?: number | null;
218
-
219
- /**
220
- * Average views per video post from recent content. null if no video posts or data
221
- * unavailable.
222
- */
223
- avg_video_views_recent?: number | null;
224
-
225
- /**
226
- * Monthly follower growth rate (percentage). Positive = growth, negative =
227
- * decline. null if account is <30 days old or insufficient data.
228
- */
229
- follower_change_rate_monthly_approx?: number | null;
230
-
231
- /**
232
- * Number of accounts this user follows. null if account is private.
233
- */
234
- following_count?: number | null;
235
-
236
- /**
237
- * Number of Instagram Story highlights. Instagram only. null for other platforms.
238
- */
239
- highlight_reel_count?: number | null;
240
-
241
- /**
242
- * Total posts published (photos, videos, carousels). null if unavailable.
243
- */
244
- media_count?: number | null;
245
-
208
+ export interface CreatorAutocompleteResponse {
246
209
  /**
247
- * Platform-assigned category (e.g., "Health & Fitness"). null if not set or
248
- * platform doesn't provide categories.
210
+ * Autocomplete results
249
211
  */
250
- platform_category_name?: string | null;
212
+ data: Array<CreatorAutocompleteResponse.Data>;
251
213
  }
252
214
 
253
- /**
254
- * Basic social account information returned in lite mode
255
- */
256
- export interface SocialAccountLite {
257
- /**
258
- * Unique social account identifier
259
- */
260
- id: string;
215
+ export namespace CreatorAutocompleteResponse {
216
+ export interface Data {
217
+ /**
218
+ * Creator ID
219
+ */
220
+ id: string;
261
221
 
262
- /**
263
- * Account bio
264
- */
265
- bio: string | null;
222
+ /**
223
+ * Avatar URL
224
+ */
225
+ avatar: string | null;
266
226
 
267
- /**
268
- * Creator UUID this social account belongs to. Use with `/v1/creators` for
269
- * person-level data (name, bio, avatar) or `/v1/creators/{id}/profiles` for all
270
- * social accounts.
271
- */
272
- creator_profile_id: string;
227
+ /**
228
+ * Creator name
229
+ */
230
+ name: string;
273
231
 
274
- /**
275
- * Display name on the platform
276
- */
277
- display_name: string;
232
+ /**
233
+ * Matching platforms
234
+ */
235
+ platforms: Array<Data.Platform>;
236
+ }
278
237
 
279
- /**
280
- * Social media platform
281
- */
282
- platform: 'instagram' | 'tiktok';
238
+ export namespace Data {
239
+ export interface Platform {
240
+ display_name: string | null;
283
241
 
284
- /**
285
- * Username on the platform
286
- */
287
- username: string;
242
+ /**
243
+ * The field value that matched
244
+ */
245
+ match_field: string;
288
246
 
289
- /**
290
- * Whether the account has platform verification (blue checkmark).
291
- */
292
- verified: boolean;
247
+ /**
248
+ * How the query matched this profile
249
+ */
250
+ match_type: 'name' | 'username' | 'display_name';
293
251
 
294
- /**
295
- * Profile picture URL
296
- */
297
- avatar_url?: string | null;
252
+ /**
253
+ * Social media platform
254
+ */
255
+ platform: 'instagram';
256
+
257
+ username: string;
258
+ }
259
+ }
260
+ }
298
261
 
262
+ export interface CreatorLookalikeResponse {
299
263
  /**
300
- * Engagement rate percentage (0-100). Formula: (avg_likes + avg_comments) /
301
- * follower_count × 100. Based on last 12 posts. null if account is private or has
302
- * <3 posts.
264
+ * Basic creator information
303
265
  */
304
- engagement_rate?: number | null;
266
+ creator: Shared.CreatorBasic;
305
267
 
306
268
  /**
307
- * External website URL
269
+ * Abbreviated profile information
308
270
  */
309
- external_url?: string | null;
271
+ primary_profile: Shared.ProfileSummary | null;
310
272
 
311
273
  /**
312
- * Total number of followers on this platform. null if data is unavailable or
313
- * account is private.
274
+ * Similarity information for lookalike match
314
275
  */
315
- follower_count?: number | null;
316
- }
317
-
318
- export interface CreatorRetrieveResponse {
319
- creators?: Array<CreatorRetrieveResponse.CreatorWithProfiles | Creator>;
276
+ similarity: CreatorLookalikeResponse.Similarity;
320
277
  }
321
278
 
322
- export namespace CreatorRetrieveResponse {
279
+ export namespace CreatorLookalikeResponse {
323
280
  /**
324
- * Creator with embedded social account profiles
281
+ * Similarity information for lookalike match
325
282
  */
326
- export interface CreatorWithProfiles extends CreatorsAPI.Creator {
283
+ export interface Similarity {
327
284
  /**
328
- * Social account profiles for this creator
285
+ * Similarity score (0-1)
329
286
  */
330
- profiles: Array<CreatorsAPI.SocialAccountLite | CreatorsAPI.SocialAccountDetailed>;
287
+ score: number;
288
+
289
+ /**
290
+ * Shared traits with seed creators
291
+ */
292
+ shared_traits: Array<string>;
331
293
  }
332
294
  }
333
295
 
334
- export interface CreatorAutocompleteResponse {
335
- count?: number;
336
-
337
- ok?: boolean;
338
-
339
- results?: Array<CreatorAutocompleteResponse.Result>;
296
+ export interface CreatorMatchResponse {
297
+ data: Array<CreatorMatchResponse.Data>;
340
298
  }
341
299
 
342
- export namespace CreatorAutocompleteResponse {
343
- export interface Result {
344
- id?: string;
300
+ export namespace CreatorMatchResponse {
301
+ export interface Data {
302
+ creator: Data.Creator;
345
303
 
346
- avatar?: string;
304
+ input: Data.Input;
347
305
 
348
- name?: string;
349
-
350
- platforms?: Array<Result.Platform>;
306
+ match: Data.Match;
351
307
  }
352
308
 
353
- export namespace Result {
354
- export interface Platform {
355
- display_name?: string;
309
+ export namespace Data {
310
+ export interface Creator {
311
+ id: string;
356
312
 
357
- match_field?: string;
313
+ avatar_url: string | null;
358
314
 
359
- match_type?: 'name' | 'username' | 'display_name';
315
+ name: string;
316
+ }
360
317
 
361
- platform?: string;
318
+ export interface Input {
319
+ creator_id?: string;
320
+
321
+ /**
322
+ * Social media platform
323
+ */
324
+ platform?: 'instagram';
362
325
 
363
326
  username?: string;
364
327
  }
328
+
329
+ export interface Match {
330
+ /**
331
+ * Match decision recommendation
332
+ */
333
+ decision: 'good' | 'neutral' | 'avoid';
334
+
335
+ /**
336
+ * Structured reasons supporting the decision
337
+ */
338
+ reasons: Array<Match.Reason>;
339
+
340
+ /**
341
+ * Match score (0-1)
342
+ */
343
+ score: number;
344
+ }
345
+
346
+ export namespace Match {
347
+ export interface Reason {
348
+ /**
349
+ * Human-readable reason for the match
350
+ */
351
+ text: string;
352
+
353
+ /**
354
+ * ID of the supporting fact, if applicable
355
+ */
356
+ fact_id?: string;
357
+
358
+ /**
359
+ * ID of the source post, if applicable
360
+ */
361
+ source_post_id?: string;
362
+ }
363
+ }
365
364
  }
366
365
  }
367
366
 
368
- export interface CreatorListProfilesResponse {
367
+ export interface CreatorRetrieveParams {
369
368
  /**
370
- * Array of social account objects. The structure depends on the `mode` parameter:
371
- *
372
- * - If `mode: "lite"`: Returns SocialAccountLite objects
373
- * - If `mode: "detailed"`: Returns SocialAccountDetailed objects with additional
374
- * fields
369
+ * Additional data to include in response
375
370
  */
376
- profiles?: Array<SocialAccountLite | SocialAccountDetailed>;
371
+ include: Array<'profiles'>;
377
372
  }
378
373
 
379
- export interface CreatorRetrieveParams {
374
+ export interface CreatorAutocompleteParams {
380
375
  /**
381
- * Comma-separated list of creator UUIDs
376
+ * Search query (min 2 characters)
382
377
  */
383
- creator_ids: string;
378
+ q: string;
384
379
 
385
380
  /**
386
- * Whether to include social account profiles for each creator
381
+ * Maximum results to return
387
382
  */
388
- include_profiles?: boolean;
383
+ limit?: number;
389
384
 
390
385
  /**
391
- * Detail level for included profiles (only used when include_profiles=true)
386
+ * Filter by platform
392
387
  */
393
- profile_mode?: 'lite' | 'detailed';
388
+ platform?: 'instagram';
394
389
 
395
390
  /**
396
- * Comma-separated list of platforms to include (instagram, tiktok). Only used when
397
- * include_profiles=true
391
+ * Which platforms to include in results
398
392
  */
399
- profile_platforms?: string;
393
+ scope?: 'creator_only' | 'matched_platforms' | 'all_platforms';
400
394
  }
401
395
 
402
- export interface CreatorAutocompleteParams {
396
+ export interface CreatorLookalikeParams extends BodyCursorParams {
403
397
  /**
404
- * Search query text (partial name/username)
398
+ * Seed creators to find similar creators for
405
399
  */
406
- q: string;
400
+ seeds: Array<CreatorLookalikeParams.Seed>;
407
401
 
408
402
  /**
409
- * Maximum number of results to return
403
+ * Additional filters
410
404
  */
411
- limit?: number;
405
+ filters?: CreatorLookalikeParams.Filters;
406
+ }
407
+
408
+ export namespace CreatorLookalikeParams {
409
+ /**
410
+ * Seed creator for lookalike search
411
+ */
412
+ export interface Seed {
413
+ /**
414
+ * Creator ID (use this OR platform+username)
415
+ */
416
+ creator_id?: string;
417
+
418
+ /**
419
+ * Platform (required with username)
420
+ */
421
+ platform?: 'instagram';
422
+
423
+ /**
424
+ * Username (required with platform)
425
+ */
426
+ username?: string;
427
+
428
+ /**
429
+ * Weight for this seed (0-1)
430
+ */
431
+ weight?: number;
432
+ }
412
433
 
413
434
  /**
414
- * Filter results to only show creators that have profiles on this specific
415
- * platform. If not provided, returns creators from all platforms.
435
+ * Additional filters
416
436
  */
417
- platform?: 'instagram' | 'tiktok';
437
+ export interface Filters {
438
+ /**
439
+ * Filter by engagement rate
440
+ */
441
+ engagement_rate?: Filters.EngagementRate;
442
+
443
+ /**
444
+ * Filter by follower count
445
+ */
446
+ followers?: Filters.Followers;
418
447
 
448
+ /**
449
+ * Filter by verified status
450
+ */
451
+ verified?: boolean;
452
+ }
453
+
454
+ export namespace Filters {
455
+ /**
456
+ * Filter by engagement rate
457
+ */
458
+ export interface EngagementRate {
459
+ /**
460
+ * Maximum engagement rate (%)
461
+ */
462
+ max?: number;
463
+
464
+ /**
465
+ * Minimum engagement rate (%)
466
+ */
467
+ min?: number;
468
+ }
469
+
470
+ /**
471
+ * Filter by follower count
472
+ */
473
+ export interface Followers {
474
+ /**
475
+ * Maximum follower count
476
+ */
477
+ max?: number;
478
+
479
+ /**
480
+ * Minimum follower count
481
+ */
482
+ min?: number;
483
+ }
484
+ }
485
+ }
486
+
487
+ export interface CreatorMatchParams {
419
488
  /**
420
- * Control the granularity of returned data
489
+ * Creators to evaluate
421
490
  */
422
- scope?: 'creator_only' | 'matched_platforms' | 'all_platforms';
491
+ creators: Array<CreatorMatchParams.Creator>;
492
+
493
+ /**
494
+ * Campaign intent for creator matching
495
+ */
496
+ intent: CreatorMatchParams.Intent;
423
497
  }
424
498
 
425
- export interface CreatorListProfilesParams {
499
+ export namespace CreatorMatchParams {
426
500
  /**
427
- * Response detail level
501
+ * Creator identifier for match endpoint
428
502
  */
429
- mode?: 'lite' | 'detailed';
503
+ export interface Creator {
504
+ /**
505
+ * Creator ID (use this OR platform+username)
506
+ */
507
+ creator_id?: string;
508
+
509
+ /**
510
+ * Platform (required with username)
511
+ */
512
+ platform?: 'instagram';
513
+
514
+ /**
515
+ * Username (required with platform)
516
+ */
517
+ username?: string;
518
+ }
430
519
 
431
520
  /**
432
- * Comma-separated list of platforms to include (instagram, tiktok)
521
+ * Campaign intent for creator matching
433
522
  */
434
- platforms?: string;
523
+ export interface Intent {
524
+ /**
525
+ * Campaign description
526
+ */
527
+ query: string;
528
+
529
+ /**
530
+ * Additional context about the campaign
531
+ */
532
+ context?: string;
533
+ }
435
534
  }
436
535
 
437
536
  export declare namespace Creators {
438
537
  export {
439
- type Creator as Creator,
440
- type CreatorAutocomplete as CreatorAutocomplete,
441
- type SocialAccountDetailed as SocialAccountDetailed,
442
- type SocialAccountLite as SocialAccountLite,
443
538
  type CreatorRetrieveResponse as CreatorRetrieveResponse,
444
539
  type CreatorAutocompleteResponse as CreatorAutocompleteResponse,
445
- type CreatorListProfilesResponse as CreatorListProfilesResponse,
540
+ type CreatorLookalikeResponse as CreatorLookalikeResponse,
541
+ type CreatorMatchResponse as CreatorMatchResponse,
542
+ type CreatorLookalikeResponsesBodyCursor as CreatorLookalikeResponsesBodyCursor,
446
543
  type CreatorRetrieveParams as CreatorRetrieveParams,
447
544
  type CreatorAutocompleteParams as CreatorAutocompleteParams,
448
- type CreatorListProfilesParams as CreatorListProfilesParams,
545
+ type CreatorLookalikeParams as CreatorLookalikeParams,
546
+ type CreatorMatchParams as CreatorMatchParams,
449
547
  };
450
548
  }