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.
- package/CHANGELOG.md +48 -30
- package/LICENSE +1 -1
- package/README.md +88 -43
- package/client.d.mts +49 -29
- package/client.d.mts.map +1 -1
- package/client.d.ts +49 -29
- package/client.d.ts.map +1 -1
- package/client.js +89 -56
- package/client.js.map +1 -1
- package/client.mjs +89 -56
- package/client.mjs.map +1 -1
- package/core/api-promise.d.mts +2 -2
- package/core/api-promise.d.mts.map +1 -1
- package/core/api-promise.d.ts +2 -2
- package/core/api-promise.d.ts.map +1 -1
- package/core/api-promise.js.map +1 -1
- package/core/api-promise.mjs.map +1 -1
- package/core/error.d.mts +2 -2
- package/core/error.d.mts.map +1 -1
- package/core/error.d.ts +2 -2
- package/core/error.d.ts.map +1 -1
- package/core/error.js +4 -4
- package/core/error.js.map +1 -1
- package/core/error.mjs +2 -2
- package/core/error.mjs.map +1 -1
- package/core/pagination.d.mts +75 -0
- package/core/pagination.d.mts.map +1 -0
- package/core/pagination.d.ts +75 -0
- package/core/pagination.d.ts.map +1 -0
- package/core/pagination.js +139 -0
- package/core/pagination.js.map +1 -0
- package/core/pagination.mjs +132 -0
- package/core/pagination.mjs.map +1 -0
- package/core/resource.d.mts +3 -3
- package/core/resource.d.mts.map +1 -1
- package/core/resource.d.ts +3 -3
- package/core/resource.d.ts.map +1 -1
- package/core/resource.js.map +1 -1
- package/core/resource.mjs.map +1 -1
- package/index.d.mts +4 -3
- package/index.d.mts.map +1 -1
- package/index.d.ts +4 -3
- package/index.d.ts.map +1 -1
- package/index.js +6 -4
- package/index.js.map +1 -1
- package/index.mjs +4 -3
- package/index.mjs.map +1 -1
- package/internal/parse.d.mts +2 -2
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts +2 -2
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js +5 -0
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs +5 -0
- package/internal/parse.mjs.map +1 -1
- package/internal/shims.js +1 -1
- package/internal/shims.js.map +1 -1
- package/internal/shims.mjs +1 -1
- package/internal/shims.mjs.map +1 -1
- package/internal/tslib.js +17 -17
- package/internal/uploads.d.mts +4 -4
- package/internal/uploads.d.mts.map +1 -1
- package/internal/uploads.d.ts +4 -4
- package/internal/uploads.d.ts.map +1 -1
- package/internal/uploads.js.map +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/base64.js +2 -2
- package/internal/utils/base64.js.map +1 -1
- package/internal/utils/base64.mjs +3 -3
- package/internal/utils/base64.mjs.map +1 -1
- package/internal/utils/log.d.mts +3 -3
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts +3 -3
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.js +1 -1
- package/internal/utils/path.js.map +1 -1
- package/internal/utils/path.mjs +2 -2
- package/internal/utils/path.mjs.map +1 -1
- package/internal/utils/query.d.mts +2 -0
- package/internal/utils/query.d.mts.map +1 -0
- package/internal/utils/query.d.ts +2 -0
- package/internal/utils/query.d.ts.map +1 -0
- package/internal/utils/query.js +10 -0
- package/internal/utils/query.js.map +1 -0
- package/internal/utils/query.mjs +6 -0
- package/internal/utils/query.mjs.map +1 -0
- package/internal/utils/values.js +5 -5
- package/internal/utils/values.js.map +1 -1
- package/internal/utils/values.mjs +6 -6
- package/internal/utils/values.mjs.map +1 -1
- package/internal/utils.d.mts +1 -0
- package/internal/utils.d.ts +1 -0
- package/internal/utils.js +1 -0
- package/internal/utils.js.map +1 -1
- package/internal/utils.mjs +1 -0
- package/package.json +13 -3
- package/pagination.d.mts +2 -0
- package/pagination.d.mts.map +1 -0
- package/pagination.d.ts +2 -0
- package/pagination.d.ts.map +1 -0
- package/pagination.js +6 -0
- package/pagination.js.map +1 -0
- package/pagination.mjs +2 -0
- package/pagination.mjs.map +1 -0
- package/resources/creators.d.mts +326 -247
- package/resources/creators.d.mts.map +1 -1
- package/resources/creators.d.ts +326 -247
- package/resources/creators.d.ts.map +1 -1
- package/resources/creators.js +80 -63
- package/resources/creators.js.map +1 -1
- package/resources/creators.mjs +80 -63
- package/resources/creators.mjs.map +1 -1
- package/resources/health.d.mts +13 -1
- package/resources/health.d.mts.map +1 -1
- package/resources/health.d.ts +13 -1
- package/resources/health.d.ts.map +1 -1
- package/resources/health.js +4 -1
- package/resources/health.js.map +1 -1
- package/resources/health.mjs +4 -1
- package/resources/health.mjs.map +1 -1
- package/resources/index.d.mts +6 -7
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +6 -7
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -7
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -3
- package/resources/index.mjs.map +1 -1
- package/resources/posts.d.mts +82 -202
- package/resources/posts.d.mts.map +1 -1
- package/resources/posts.d.ts +82 -202
- package/resources/posts.d.ts.map +1 -1
- package/resources/posts.js +17 -38
- package/resources/posts.js.map +1 -1
- package/resources/posts.mjs +17 -38
- package/resources/posts.mjs.map +1 -1
- package/resources/profiles.d.mts +208 -58
- package/resources/profiles.d.mts.map +1 -1
- package/resources/profiles.d.ts +208 -58
- package/resources/profiles.d.ts.map +1 -1
- package/resources/profiles.js +37 -41
- package/resources/profiles.js.map +1 -1
- package/resources/profiles.mjs +37 -41
- package/resources/profiles.mjs.map +1 -1
- package/resources/raw/index.d.mts +4 -0
- package/resources/raw/index.d.mts.map +1 -0
- package/resources/raw/index.d.ts +4 -0
- package/resources/raw/index.d.ts.map +1 -0
- package/resources/raw/index.js +11 -0
- package/resources/raw/index.js.map +1 -0
- package/resources/raw/index.mjs +5 -0
- package/resources/raw/index.mjs.map +1 -0
- package/resources/raw/instagram.d.mts +215 -0
- package/resources/raw/instagram.d.mts.map +1 -0
- package/resources/raw/instagram.d.ts +215 -0
- package/resources/raw/instagram.d.ts.map +1 -0
- package/resources/raw/instagram.js +31 -0
- package/resources/raw/instagram.js.map +1 -0
- package/resources/raw/instagram.mjs +27 -0
- package/resources/raw/instagram.mjs.map +1 -0
- package/resources/raw/raw.d.mts +14 -0
- package/resources/raw/raw.d.mts.map +1 -0
- package/resources/raw/raw.d.ts +14 -0
- package/resources/raw/raw.d.ts.map +1 -0
- package/resources/raw/raw.js +21 -0
- package/resources/raw/raw.js.map +1 -0
- package/resources/raw/raw.mjs +16 -0
- package/resources/raw/raw.mjs.map +1 -0
- package/resources/raw/youtube.d.mts +455 -0
- package/resources/raw/youtube.d.mts.map +1 -0
- package/resources/raw/youtube.d.ts +455 -0
- package/resources/raw/youtube.d.ts.map +1 -0
- package/resources/raw/youtube.js +61 -0
- package/resources/raw/youtube.js.map +1 -0
- package/resources/raw/youtube.mjs +57 -0
- package/resources/raw/youtube.mjs.map +1 -0
- package/resources/raw.d.mts +2 -0
- package/resources/raw.d.mts.map +1 -0
- package/resources/raw.d.ts +2 -0
- package/resources/raw.d.ts.map +1 -0
- package/resources/raw.js +6 -0
- package/resources/raw.js.map +1 -0
- package/resources/raw.mjs +3 -0
- package/resources/raw.mjs.map +1 -0
- package/resources/search.d.mts +126 -117
- package/resources/search.d.mts.map +1 -1
- package/resources/search.d.ts +126 -117
- package/resources/search.d.ts.map +1 -1
- package/resources/search.js +46 -13
- package/resources/search.js.map +1 -1
- package/resources/search.mjs +46 -13
- package/resources/search.mjs.map +1 -1
- package/resources/shared.d.mts +55 -0
- package/resources/shared.d.mts.map +1 -0
- package/resources/shared.d.ts +55 -0
- package/resources/shared.d.ts.map +1 -0
- package/resources/shared.js +4 -0
- package/resources/shared.js.map +1 -0
- package/resources/shared.mjs +3 -0
- package/resources/shared.mjs.map +1 -0
- package/src/client.ts +153 -127
- package/src/core/api-promise.ts +4 -4
- package/src/core/error.ts +2 -2
- package/src/core/pagination.ts +232 -0
- package/src/core/resource.ts +3 -3
- package/src/index.ts +4 -3
- package/src/internal/parse.ts +8 -2
- package/src/internal/shims.ts +1 -1
- package/src/internal/uploads.ts +5 -5
- package/src/internal/utils/base64.ts +3 -3
- package/src/internal/utils/log.ts +3 -3
- package/src/internal/utils/path.ts +2 -2
- package/src/internal/utils/query.ts +7 -0
- package/src/internal/utils/values.ts +6 -6
- package/src/internal/utils.ts +1 -0
- package/src/pagination.ts +2 -0
- package/src/resources/creators.ts +369 -271
- package/src/resources/health.ts +13 -1
- package/src/resources/index.ts +22 -41
- package/src/resources/posts.ts +89 -232
- package/src/resources/profiles.ts +252 -59
- package/src/resources/raw/index.ts +16 -0
- package/src/resources/raw/instagram.ts +271 -0
- package/src/resources/raw/raw.ts +47 -0
- package/src/resources/raw/youtube.ts +585 -0
- package/src/resources/raw.ts +3 -0
- package/src/resources/search.ts +145 -131
- package/src/resources/shared.ts +66 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/brand-safety.d.mts +0 -234
- package/resources/brand-safety.d.mts.map +0 -1
- package/resources/brand-safety.d.ts +0 -234
- package/resources/brand-safety.d.ts.map +0 -1
- package/resources/brand-safety.js +0 -75
- package/resources/brand-safety.js.map +0 -1
- package/resources/brand-safety.mjs +0 -71
- package/resources/brand-safety.mjs.map +0 -1
- package/resources/lookalike.d.mts +0 -142
- package/resources/lookalike.d.mts.map +0 -1
- package/resources/lookalike.d.ts +0 -142
- package/resources/lookalike.d.ts.map +0 -1
- package/resources/lookalike.js +0 -28
- package/resources/lookalike.js.map +0 -1
- package/resources/lookalike.mjs +0 -24
- package/resources/lookalike.mjs.map +0 -1
- package/resources/match.d.mts +0 -90
- package/resources/match.d.mts.map +0 -1
- package/resources/match.d.ts +0 -90
- package/resources/match.d.ts.map +0 -1
- package/resources/match.js +0 -22
- package/resources/match.js.map +0 -1
- package/resources/match.mjs +0 -18
- package/resources/match.mjs.map +0 -1
- package/src/resources/brand-safety.ts +0 -304
- package/src/resources/lookalike.ts +0 -186
- 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
|
|
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
|
-
*
|
|
12
|
-
* their
|
|
15
|
+
* Retrieve a creator's profile including AI-generated summary, content themes, and
|
|
16
|
+
* optionally their linked social profiles.
|
|
13
17
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
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
|
-
* **
|
|
22
|
+
* **Include options:**
|
|
19
23
|
*
|
|
20
|
-
* -
|
|
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
|
|
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
|
-
*
|
|
30
|
-
* }
|
|
30
|
+
* const creator = await client.creators.retrieve(
|
|
31
|
+
* '123e4567-e89b-12d3-a456-426614174000',
|
|
32
|
+
* { include: ['profiles'] },
|
|
33
|
+
* );
|
|
31
34
|
* ```
|
|
32
35
|
*/
|
|
33
|
-
retrieve(
|
|
34
|
-
|
|
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
|
-
*
|
|
39
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
53
|
-
*
|
|
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.
|
|
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
|
-
*
|
|
73
|
-
*
|
|
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
|
-
*
|
|
81
|
+
* **Use cases:**
|
|
76
82
|
*
|
|
77
|
-
* -
|
|
78
|
-
* -
|
|
79
|
-
* -
|
|
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
|
-
*
|
|
87
|
+
* **How it works:**
|
|
83
88
|
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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.
|
|
117
|
-
*
|
|
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
|
-
|
|
122
|
-
|
|
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
|
-
*
|
|
155
|
+
* Full creator details
|
|
146
156
|
*/
|
|
147
|
-
|
|
157
|
+
data: CreatorRetrieveResponse.Data;
|
|
148
158
|
|
|
149
159
|
/**
|
|
150
|
-
*
|
|
160
|
+
* Present when partial results were returned because one or more linked profiles
|
|
161
|
+
* were skipped for data integrity reasons.
|
|
151
162
|
*/
|
|
152
|
-
|
|
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
|
-
*
|
|
168
|
+
* Full creator details
|
|
171
169
|
*/
|
|
172
|
-
|
|
170
|
+
export interface Data {
|
|
171
|
+
/**
|
|
172
|
+
* Creator unique identifier
|
|
173
|
+
*/
|
|
174
|
+
id: string;
|
|
173
175
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
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
|
-
*
|
|
182
|
+
* Avatar URL
|
|
184
183
|
*/
|
|
185
|
-
|
|
184
|
+
avatar_url: string | null;
|
|
186
185
|
|
|
187
186
|
/**
|
|
188
|
-
*
|
|
187
|
+
* Creator bio
|
|
189
188
|
*/
|
|
190
|
-
|
|
189
|
+
bio: string | null;
|
|
191
190
|
|
|
192
191
|
/**
|
|
193
|
-
*
|
|
192
|
+
* Content themes/topics
|
|
194
193
|
*/
|
|
195
|
-
|
|
194
|
+
content_themes: Array<string>;
|
|
196
195
|
|
|
197
196
|
/**
|
|
198
|
-
*
|
|
197
|
+
* Creator display name
|
|
199
198
|
*/
|
|
200
|
-
|
|
199
|
+
name: string;
|
|
201
200
|
|
|
202
201
|
/**
|
|
203
|
-
*
|
|
202
|
+
* Social profiles (only included when include=profiles)
|
|
204
203
|
*/
|
|
205
|
-
|
|
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
|
-
*
|
|
248
|
-
* platform doesn't provide categories.
|
|
210
|
+
* Autocomplete results
|
|
249
211
|
*/
|
|
250
|
-
|
|
212
|
+
data: Array<CreatorAutocompleteResponse.Data>;
|
|
251
213
|
}
|
|
252
214
|
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
*/
|
|
260
|
-
id: string;
|
|
215
|
+
export namespace CreatorAutocompleteResponse {
|
|
216
|
+
export interface Data {
|
|
217
|
+
/**
|
|
218
|
+
* Creator ID
|
|
219
|
+
*/
|
|
220
|
+
id: string;
|
|
261
221
|
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
222
|
+
/**
|
|
223
|
+
* Avatar URL
|
|
224
|
+
*/
|
|
225
|
+
avatar: string | null;
|
|
266
226
|
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
*/
|
|
272
|
-
creator_profile_id: string;
|
|
227
|
+
/**
|
|
228
|
+
* Creator name
|
|
229
|
+
*/
|
|
230
|
+
name: string;
|
|
273
231
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
232
|
+
/**
|
|
233
|
+
* Matching platforms
|
|
234
|
+
*/
|
|
235
|
+
platforms: Array<Data.Platform>;
|
|
236
|
+
}
|
|
278
237
|
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
platform: 'instagram' | 'tiktok';
|
|
238
|
+
export namespace Data {
|
|
239
|
+
export interface Platform {
|
|
240
|
+
display_name: string | null;
|
|
283
241
|
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
242
|
+
/**
|
|
243
|
+
* The field value that matched
|
|
244
|
+
*/
|
|
245
|
+
match_field: string;
|
|
288
246
|
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
247
|
+
/**
|
|
248
|
+
* How the query matched this profile
|
|
249
|
+
*/
|
|
250
|
+
match_type: 'name' | 'username' | 'display_name';
|
|
293
251
|
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
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
|
-
*
|
|
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
|
-
|
|
266
|
+
creator: Shared.CreatorBasic;
|
|
305
267
|
|
|
306
268
|
/**
|
|
307
|
-
*
|
|
269
|
+
* Abbreviated profile information
|
|
308
270
|
*/
|
|
309
|
-
|
|
271
|
+
primary_profile: Shared.ProfileSummary | null;
|
|
310
272
|
|
|
311
273
|
/**
|
|
312
|
-
*
|
|
313
|
-
* account is private.
|
|
274
|
+
* Similarity information for lookalike match
|
|
314
275
|
*/
|
|
315
|
-
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
export interface CreatorRetrieveResponse {
|
|
319
|
-
creators?: Array<CreatorRetrieveResponse.CreatorWithProfiles | Creator>;
|
|
276
|
+
similarity: CreatorLookalikeResponse.Similarity;
|
|
320
277
|
}
|
|
321
278
|
|
|
322
|
-
export namespace
|
|
279
|
+
export namespace CreatorLookalikeResponse {
|
|
323
280
|
/**
|
|
324
|
-
*
|
|
281
|
+
* Similarity information for lookalike match
|
|
325
282
|
*/
|
|
326
|
-
export interface
|
|
283
|
+
export interface Similarity {
|
|
327
284
|
/**
|
|
328
|
-
*
|
|
285
|
+
* Similarity score (0-1)
|
|
329
286
|
*/
|
|
330
|
-
|
|
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
|
|
335
|
-
|
|
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
|
|
343
|
-
export interface
|
|
344
|
-
|
|
300
|
+
export namespace CreatorMatchResponse {
|
|
301
|
+
export interface Data {
|
|
302
|
+
creator: Data.Creator;
|
|
345
303
|
|
|
346
|
-
|
|
304
|
+
input: Data.Input;
|
|
347
305
|
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
platforms?: Array<Result.Platform>;
|
|
306
|
+
match: Data.Match;
|
|
351
307
|
}
|
|
352
308
|
|
|
353
|
-
export namespace
|
|
354
|
-
export interface
|
|
355
|
-
|
|
309
|
+
export namespace Data {
|
|
310
|
+
export interface Creator {
|
|
311
|
+
id: string;
|
|
356
312
|
|
|
357
|
-
|
|
313
|
+
avatar_url: string | null;
|
|
358
314
|
|
|
359
|
-
|
|
315
|
+
name: string;
|
|
316
|
+
}
|
|
360
317
|
|
|
361
|
-
|
|
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
|
|
367
|
+
export interface CreatorRetrieveParams {
|
|
369
368
|
/**
|
|
370
|
-
*
|
|
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
|
-
|
|
371
|
+
include: Array<'profiles'>;
|
|
377
372
|
}
|
|
378
373
|
|
|
379
|
-
export interface
|
|
374
|
+
export interface CreatorAutocompleteParams {
|
|
380
375
|
/**
|
|
381
|
-
*
|
|
376
|
+
* Search query (min 2 characters)
|
|
382
377
|
*/
|
|
383
|
-
|
|
378
|
+
q: string;
|
|
384
379
|
|
|
385
380
|
/**
|
|
386
|
-
*
|
|
381
|
+
* Maximum results to return
|
|
387
382
|
*/
|
|
388
|
-
|
|
383
|
+
limit?: number;
|
|
389
384
|
|
|
390
385
|
/**
|
|
391
|
-
*
|
|
386
|
+
* Filter by platform
|
|
392
387
|
*/
|
|
393
|
-
|
|
388
|
+
platform?: 'instagram';
|
|
394
389
|
|
|
395
390
|
/**
|
|
396
|
-
*
|
|
397
|
-
* include_profiles=true
|
|
391
|
+
* Which platforms to include in results
|
|
398
392
|
*/
|
|
399
|
-
|
|
393
|
+
scope?: 'creator_only' | 'matched_platforms' | 'all_platforms';
|
|
400
394
|
}
|
|
401
395
|
|
|
402
|
-
export interface
|
|
396
|
+
export interface CreatorLookalikeParams extends BodyCursorParams {
|
|
403
397
|
/**
|
|
404
|
-
*
|
|
398
|
+
* Seed creators to find similar creators for
|
|
405
399
|
*/
|
|
406
|
-
|
|
400
|
+
seeds: Array<CreatorLookalikeParams.Seed>;
|
|
407
401
|
|
|
408
402
|
/**
|
|
409
|
-
*
|
|
403
|
+
* Additional filters
|
|
410
404
|
*/
|
|
411
|
-
|
|
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
|
-
*
|
|
415
|
-
* platform. If not provided, returns creators from all platforms.
|
|
435
|
+
* Additional filters
|
|
416
436
|
*/
|
|
417
|
-
|
|
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
|
-
*
|
|
489
|
+
* Creators to evaluate
|
|
421
490
|
*/
|
|
422
|
-
|
|
491
|
+
creators: Array<CreatorMatchParams.Creator>;
|
|
492
|
+
|
|
493
|
+
/**
|
|
494
|
+
* Campaign intent for creator matching
|
|
495
|
+
*/
|
|
496
|
+
intent: CreatorMatchParams.Intent;
|
|
423
497
|
}
|
|
424
498
|
|
|
425
|
-
export
|
|
499
|
+
export namespace CreatorMatchParams {
|
|
426
500
|
/**
|
|
427
|
-
*
|
|
501
|
+
* Creator identifier for match endpoint
|
|
428
502
|
*/
|
|
429
|
-
|
|
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
|
-
*
|
|
521
|
+
* Campaign intent for creator matching
|
|
433
522
|
*/
|
|
434
|
-
|
|
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
|
|
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
|
|
545
|
+
type CreatorLookalikeParams as CreatorLookalikeParams,
|
|
546
|
+
type CreatorMatchParams as CreatorMatchParams,
|
|
449
547
|
};
|
|
450
548
|
}
|