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