influship 0.2.0 → 0.3.2
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 +62 -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 +24 -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
package/src/resources/health.ts
CHANGED
|
@@ -4,18 +4,30 @@ import { APIResource } from '../core/resource';
|
|
|
4
4
|
import { APIPromise } from '../core/api-promise';
|
|
5
5
|
import { RequestOptions } from '../internal/request-options';
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* API health and status endpoints
|
|
9
|
+
*/
|
|
7
10
|
export class Health extends APIResource {
|
|
8
11
|
/**
|
|
9
|
-
* Check
|
|
12
|
+
* Check API health status. No authentication required.
|
|
10
13
|
*/
|
|
11
14
|
check(options?: RequestOptions): APIPromise<HealthCheckResponse> {
|
|
12
15
|
return this._client.get('/health', options);
|
|
13
16
|
}
|
|
14
17
|
}
|
|
15
18
|
|
|
19
|
+
/**
|
|
20
|
+
* Health check response
|
|
21
|
+
*/
|
|
16
22
|
export interface HealthCheckResponse {
|
|
23
|
+
/**
|
|
24
|
+
* Service health status
|
|
25
|
+
*/
|
|
17
26
|
ok: boolean;
|
|
18
27
|
|
|
28
|
+
/**
|
|
29
|
+
* Current server timestamp
|
|
30
|
+
*/
|
|
19
31
|
timestamp: string;
|
|
20
32
|
}
|
|
21
33
|
|
package/src/resources/index.ts
CHANGED
|
@@ -1,62 +1,43 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
export
|
|
4
|
-
BrandSafety,
|
|
5
|
-
type BrandSafetyAnalysis,
|
|
6
|
-
type BrandSafetyFlag,
|
|
7
|
-
type BrandSafetyResult,
|
|
8
|
-
type BrandSafetyAnalyzeCreatorsResponse,
|
|
9
|
-
type BrandSafetyAnalyzePostsResponse,
|
|
10
|
-
type BrandSafetyAnalyzeProfilesResponse,
|
|
11
|
-
type BrandSafetyAnalyzeCreatorsParams,
|
|
12
|
-
type BrandSafetyAnalyzePostsParams,
|
|
13
|
-
type BrandSafetyAnalyzeProfilesParams,
|
|
14
|
-
} from './brand-safety';
|
|
3
|
+
export * from './shared';
|
|
15
4
|
export {
|
|
16
5
|
Creators,
|
|
17
|
-
type Creator,
|
|
18
|
-
type CreatorAutocomplete,
|
|
19
|
-
type SocialAccountDetailed,
|
|
20
|
-
type SocialAccountLite,
|
|
21
6
|
type CreatorRetrieveResponse,
|
|
22
7
|
type CreatorAutocompleteResponse,
|
|
23
|
-
type
|
|
8
|
+
type CreatorLookalikeResponse,
|
|
9
|
+
type CreatorMatchResponse,
|
|
24
10
|
type CreatorRetrieveParams,
|
|
25
11
|
type CreatorAutocompleteParams,
|
|
26
|
-
type
|
|
12
|
+
type CreatorLookalikeParams,
|
|
13
|
+
type CreatorMatchParams,
|
|
14
|
+
type CreatorLookalikeResponsesBodyCursor,
|
|
27
15
|
} from './creators';
|
|
28
16
|
export { Health, type HealthCheckResponse } from './health';
|
|
29
|
-
export {
|
|
30
|
-
Lookalike,
|
|
31
|
-
type LookalikeSeedBase,
|
|
32
|
-
type LookalikeFindSimilarCreatorsResponse,
|
|
33
|
-
type LookalikeFindSimilarCreatorsParams,
|
|
34
|
-
} from './lookalike';
|
|
35
|
-
export {
|
|
36
|
-
Match,
|
|
37
|
-
type CreatorReferenceByID,
|
|
38
|
-
type MatchResult,
|
|
39
|
-
type MatchAnalyzeResponse,
|
|
40
|
-
type MatchAnalyzeParams,
|
|
41
|
-
} from './match';
|
|
42
17
|
export {
|
|
43
18
|
Posts,
|
|
44
|
-
type
|
|
45
|
-
type
|
|
46
|
-
type
|
|
47
|
-
type PostListByCreatorResponse,
|
|
48
|
-
type PostAnalyzeParams,
|
|
49
|
-
type PostListByCreatorParams,
|
|
19
|
+
type PostListResponse,
|
|
20
|
+
type PostListParams,
|
|
21
|
+
type PostListResponsesQueryCursor,
|
|
50
22
|
} from './posts';
|
|
51
23
|
export {
|
|
52
24
|
Profiles,
|
|
53
|
-
type
|
|
25
|
+
type ProfileActivity,
|
|
26
|
+
type ProfileGrowth,
|
|
27
|
+
type ProfileMetrics,
|
|
28
|
+
type ProfileResponseData,
|
|
29
|
+
type ProfileGetResponse,
|
|
54
30
|
type ProfileLookupResponse,
|
|
31
|
+
type ProfileGetParams,
|
|
55
32
|
type ProfileLookupParams,
|
|
56
33
|
} from './profiles';
|
|
34
|
+
export { Raw } from './raw/raw';
|
|
57
35
|
export {
|
|
58
36
|
Search,
|
|
59
|
-
type
|
|
60
|
-
type
|
|
61
|
-
type
|
|
37
|
+
type MatchInfo,
|
|
38
|
+
type SearchCreateResponse,
|
|
39
|
+
type SearchRetrieveResponse,
|
|
40
|
+
type SearchCreateParams,
|
|
41
|
+
type SearchRetrieveParams,
|
|
42
|
+
type SearchRetrieveResponsesQueryCursor,
|
|
62
43
|
} from './search';
|
package/src/resources/posts.ts
CHANGED
|
@@ -1,347 +1,204 @@
|
|
|
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
|
|
5
|
-
import { APIPromise } from '../core/api-promise';
|
|
4
|
+
import { PagePromise, QueryCursor, type QueryCursorParams } from '../core/pagination';
|
|
6
5
|
import { RequestOptions } from '../internal/request-options';
|
|
7
6
|
|
|
7
|
+
/**
|
|
8
|
+
* Retrieve and analyze social media posts with engagement metrics, media content, and performance data.
|
|
9
|
+
*/
|
|
8
10
|
export class Posts extends APIResource {
|
|
9
11
|
/**
|
|
10
|
-
*
|
|
11
|
-
* safety.
|
|
12
|
+
* Retrieve posts for a creator or profile with engagement metrics and media data.
|
|
12
13
|
*
|
|
13
|
-
*
|
|
14
|
-
* brand safety features.
|
|
14
|
+
* **Query options:**
|
|
15
15
|
*
|
|
16
|
-
*
|
|
16
|
+
* - By creator: Use `creator_id` to get posts across all their profiles
|
|
17
|
+
* - By profile: Use `platform` + `username` for a specific profile's posts
|
|
17
18
|
*
|
|
18
|
-
*
|
|
19
|
-
* - AI Analysis feature: +0.5 credits (includes summary and transcript)
|
|
20
|
-
* - Brand Safety feature: +0.5 credits (includes rating and risk flags)
|
|
21
|
-
* - **Example**: 1 post with both features = 1.0 + 0.5 + 0.5 = 2.0 credits
|
|
19
|
+
* **Sort options:**
|
|
22
20
|
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* ```
|
|
29
|
-
*/
|
|
30
|
-
analyze(body: PostAnalyzeParams, options?: RequestOptions): APIPromise<PostAnalysis> {
|
|
31
|
-
return this._client.post('/v1/posts/analyze', { body, ...options });
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Retrieve posts for a specific creator using cursor-based pagination.
|
|
21
|
+
* - `recent`: Most recent posts first (default)
|
|
22
|
+
* - `top_engagement`: Highest engagement rate first
|
|
23
|
+
* - `most_likes`: Most likes first
|
|
24
|
+
* - `most_views`: Most views first (video content)
|
|
25
|
+
* - `most_comments`: Most comments first
|
|
36
26
|
*
|
|
37
|
-
*
|
|
38
|
-
* with optional analysis features and date filtering.
|
|
39
|
-
*
|
|
40
|
-
* **Pricing**:
|
|
41
|
-
*
|
|
42
|
-
* - Base: 0.01 credits per post returned
|
|
43
|
-
* - The more posts you request, the more you pay
|
|
44
|
-
* - Use the `limit` parameter to control costs
|
|
45
|
-
* - **Example**: 25 posts = 0.25 credits
|
|
46
|
-
* - **Example**: 100 posts = 1.0 credit
|
|
47
|
-
*
|
|
48
|
-
* @example
|
|
49
|
-
* ```ts
|
|
50
|
-
* const response = await client.posts.listByCreator();
|
|
51
|
-
* ```
|
|
27
|
+
* **Pricing**: 0.05 credits per post returned ($0.0005)
|
|
52
28
|
*/
|
|
53
|
-
|
|
54
|
-
query:
|
|
29
|
+
list(
|
|
30
|
+
query: PostListParams | null | undefined = {},
|
|
55
31
|
options?: RequestOptions,
|
|
56
|
-
):
|
|
57
|
-
return this._client.
|
|
32
|
+
): PagePromise<PostListResponsesQueryCursor, PostListResponse> {
|
|
33
|
+
return this._client.getAPIList('/v1/posts', QueryCursor<PostListResponse>, { query, ...options });
|
|
58
34
|
}
|
|
59
35
|
}
|
|
60
36
|
|
|
61
|
-
|
|
62
|
-
* AI-powered content analysis. Only present when `ai_analysis` feature is
|
|
63
|
-
* requested.
|
|
64
|
-
*/
|
|
65
|
-
export interface AIAnalysis {
|
|
66
|
-
/**
|
|
67
|
-
* AI-generated summary describing key themes, topics, and messaging.
|
|
68
|
-
*/
|
|
69
|
-
summary: string;
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Transcription of spoken words in video. null for photo posts or videos without
|
|
73
|
-
* speech.
|
|
74
|
-
*/
|
|
75
|
-
transcript?: string | null;
|
|
76
|
-
}
|
|
37
|
+
export type PostListResponsesQueryCursor = QueryCursor<PostListResponse>;
|
|
77
38
|
|
|
78
39
|
/**
|
|
79
|
-
*
|
|
80
|
-
* efficiently.
|
|
40
|
+
* Full post details
|
|
81
41
|
*/
|
|
82
|
-
export interface
|
|
83
|
-
/**
|
|
84
|
-
* Indicates whether more results are available.
|
|
85
|
-
*
|
|
86
|
-
* - `true`: Additional pages exist, use the `cursor` to fetch them
|
|
87
|
-
* - `false`: This is the last page of results
|
|
88
|
-
*/
|
|
89
|
-
has_more: boolean;
|
|
90
|
-
|
|
42
|
+
export interface PostListResponse {
|
|
91
43
|
/**
|
|
92
|
-
*
|
|
93
|
-
* as the `cursor` query parameter in your next request. null when `has_more` is
|
|
94
|
-
* false (no more pages available). Do not attempt to decode or construct cursor
|
|
95
|
-
* values manually.
|
|
96
|
-
*/
|
|
97
|
-
cursor?: string | null;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* Analysis result for a single social media post
|
|
102
|
-
*/
|
|
103
|
-
export interface PostAnalysis {
|
|
104
|
-
/**
|
|
105
|
-
* Internal post ID
|
|
44
|
+
* Post unique identifier
|
|
106
45
|
*/
|
|
107
46
|
id: string;
|
|
108
47
|
|
|
109
48
|
/**
|
|
110
|
-
*
|
|
111
|
-
*/
|
|
112
|
-
creator: PostAnalysis.Creator;
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* Whether this post contains video content. true for video posts and reels, false
|
|
116
|
-
* for photo posts.
|
|
117
|
-
*/
|
|
118
|
-
is_video: boolean;
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
* URL of the primary media file (image or video). For carousel posts, this is the
|
|
122
|
-
* first item.
|
|
123
|
-
*/
|
|
124
|
-
media_url: string;
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* Social media platform
|
|
128
|
-
*/
|
|
129
|
-
platform: 'instagram' | 'tiktok';
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* Platform-specific unique identifier for this post. Format varies by platform
|
|
133
|
-
* (Instagram: numeric ID, TikTok: alphanumeric).
|
|
134
|
-
*/
|
|
135
|
-
platform_post_id: string;
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
* ISO 8601 timestamp when the post was originally published.
|
|
139
|
-
*/
|
|
140
|
-
posted_at: string;
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* Alt text or accessibility caption describing the media. Useful for understanding
|
|
144
|
-
* image content. null if unavailable.
|
|
49
|
+
* Post caption
|
|
145
50
|
*/
|
|
146
|
-
|
|
51
|
+
caption: string | null;
|
|
147
52
|
|
|
148
53
|
/**
|
|
149
|
-
*
|
|
150
|
-
* requested.
|
|
54
|
+
* Hashtags used in the post
|
|
151
55
|
*/
|
|
152
|
-
|
|
56
|
+
hashtags: Array<string>;
|
|
153
57
|
|
|
154
58
|
/**
|
|
155
|
-
*
|
|
59
|
+
* Post location information
|
|
156
60
|
*/
|
|
157
|
-
|
|
61
|
+
location: PostListResponse.Location | null;
|
|
158
62
|
|
|
159
63
|
/**
|
|
160
|
-
* Post
|
|
64
|
+
* Post media information
|
|
161
65
|
*/
|
|
162
|
-
|
|
66
|
+
media: PostListResponse.Media;
|
|
163
67
|
|
|
164
68
|
/**
|
|
165
|
-
*
|
|
69
|
+
* Usernames mentioned in the post
|
|
166
70
|
*/
|
|
167
|
-
|
|
71
|
+
mentions: Array<string>;
|
|
168
72
|
|
|
169
73
|
/**
|
|
170
|
-
*
|
|
74
|
+
* Post engagement metrics
|
|
171
75
|
*/
|
|
172
|
-
|
|
76
|
+
metrics: PostListResponse.Metrics;
|
|
173
77
|
|
|
174
78
|
/**
|
|
175
|
-
*
|
|
176
|
-
* posts, single item for regular posts.
|
|
79
|
+
* Social media platform
|
|
177
80
|
*/
|
|
178
|
-
|
|
81
|
+
platform: 'instagram';
|
|
179
82
|
|
|
180
83
|
/**
|
|
181
|
-
*
|
|
182
|
-
* accurate as of this time.
|
|
84
|
+
* Platform-specific post ID
|
|
183
85
|
*/
|
|
184
|
-
|
|
86
|
+
platform_id: string;
|
|
185
87
|
|
|
186
88
|
/**
|
|
187
|
-
*
|
|
188
|
-
* present for Instagram posts, null for other platforms.
|
|
89
|
+
* Post timestamp
|
|
189
90
|
*/
|
|
190
|
-
|
|
91
|
+
posted_at: string;
|
|
191
92
|
|
|
192
93
|
/**
|
|
193
|
-
*
|
|
194
|
-
* for photo posts.
|
|
94
|
+
* Profile unique identifier
|
|
195
95
|
*/
|
|
196
|
-
|
|
96
|
+
profile_id: string;
|
|
197
97
|
|
|
198
98
|
/**
|
|
199
|
-
*
|
|
99
|
+
* Type of post
|
|
200
100
|
*/
|
|
201
|
-
|
|
101
|
+
type: 'image' | 'video' | 'carousel' | 'reel' | 'story';
|
|
202
102
|
|
|
203
103
|
/**
|
|
204
|
-
*
|
|
104
|
+
* Post URL
|
|
205
105
|
*/
|
|
206
|
-
|
|
106
|
+
url: string;
|
|
207
107
|
}
|
|
208
108
|
|
|
209
|
-
export namespace
|
|
109
|
+
export namespace PostListResponse {
|
|
210
110
|
/**
|
|
211
|
-
*
|
|
111
|
+
* Post location information
|
|
212
112
|
*/
|
|
213
|
-
export interface
|
|
214
|
-
/**
|
|
215
|
-
* Creator UUID
|
|
216
|
-
*/
|
|
217
|
-
id: string;
|
|
218
|
-
|
|
113
|
+
export interface Location {
|
|
219
114
|
/**
|
|
220
|
-
*
|
|
115
|
+
* Location name
|
|
221
116
|
*/
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
/**
|
|
225
|
-
* Social media username
|
|
226
|
-
*/
|
|
227
|
-
username: string;
|
|
117
|
+
name: string | null;
|
|
228
118
|
}
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
/**
|
|
232
|
-
* Response for getting posts by creator
|
|
233
|
-
*/
|
|
234
|
-
export interface PostListByCreatorResponse {
|
|
235
|
-
/**
|
|
236
|
-
* Cursor-based pagination metadata. Use this to navigate through paginated results
|
|
237
|
-
* efficiently.
|
|
238
|
-
*/
|
|
239
|
-
pagination: CursorPagination;
|
|
240
119
|
|
|
241
120
|
/**
|
|
242
|
-
*
|
|
121
|
+
* Post media information
|
|
243
122
|
*/
|
|
244
|
-
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
export type PostAnalyzeParams = PostAnalyzeParams.Variant0 | PostAnalyzeParams.Variant1;
|
|
248
|
-
|
|
249
|
-
export declare namespace PostAnalyzeParams {
|
|
250
|
-
export interface Variant0 {
|
|
123
|
+
export interface Media {
|
|
251
124
|
/**
|
|
252
|
-
*
|
|
125
|
+
* Video duration in seconds
|
|
253
126
|
*/
|
|
254
|
-
|
|
127
|
+
duration_seconds: number | null;
|
|
255
128
|
|
|
256
129
|
/**
|
|
257
|
-
*
|
|
130
|
+
* Thumbnail URL
|
|
258
131
|
*/
|
|
259
|
-
|
|
132
|
+
thumbnail_url: string | null;
|
|
260
133
|
|
|
261
134
|
/**
|
|
262
|
-
*
|
|
135
|
+
* Media URL
|
|
263
136
|
*/
|
|
264
|
-
|
|
137
|
+
url: string | null;
|
|
265
138
|
|
|
266
139
|
/**
|
|
267
|
-
*
|
|
140
|
+
* Video URL (for video content)
|
|
268
141
|
*/
|
|
269
|
-
|
|
142
|
+
video_url: string | null;
|
|
270
143
|
}
|
|
271
144
|
|
|
272
|
-
|
|
145
|
+
/**
|
|
146
|
+
* Post engagement metrics
|
|
147
|
+
*/
|
|
148
|
+
export interface Metrics {
|
|
149
|
+
/**
|
|
150
|
+
* Comment count
|
|
151
|
+
*/
|
|
152
|
+
comments: number | null;
|
|
153
|
+
|
|
273
154
|
/**
|
|
274
|
-
*
|
|
155
|
+
* Engagement rate for this post as a percentage (e.g. 3.8 means 3.8%)
|
|
275
156
|
*/
|
|
276
|
-
|
|
157
|
+
engagement_rate: number | null;
|
|
277
158
|
|
|
278
159
|
/**
|
|
279
|
-
*
|
|
160
|
+
* Like count
|
|
280
161
|
*/
|
|
281
|
-
|
|
162
|
+
likes: number | null;
|
|
282
163
|
|
|
283
164
|
/**
|
|
284
|
-
*
|
|
165
|
+
* Share count
|
|
285
166
|
*/
|
|
286
|
-
|
|
167
|
+
shares: number | null;
|
|
287
168
|
|
|
288
169
|
/**
|
|
289
|
-
*
|
|
170
|
+
* View count (for video content)
|
|
290
171
|
*/
|
|
291
|
-
|
|
172
|
+
views: number | null;
|
|
292
173
|
}
|
|
293
174
|
}
|
|
294
175
|
|
|
295
|
-
export interface
|
|
176
|
+
export interface PostListParams extends QueryCursorParams {
|
|
296
177
|
/**
|
|
297
|
-
* Creator
|
|
178
|
+
* Creator ID (use this OR platform+username)
|
|
298
179
|
*/
|
|
299
180
|
creator_id?: string;
|
|
300
181
|
|
|
301
182
|
/**
|
|
302
|
-
*
|
|
303
|
-
*/
|
|
304
|
-
cursor?: string;
|
|
305
|
-
|
|
306
|
-
/**
|
|
307
|
-
* Start date for filtering posts (ISO 8601)
|
|
183
|
+
* Platform (required with username)
|
|
308
184
|
*/
|
|
309
|
-
|
|
185
|
+
platform?: 'instagram';
|
|
310
186
|
|
|
311
187
|
/**
|
|
312
|
-
*
|
|
313
|
-
*/
|
|
314
|
-
date_to?: string;
|
|
315
|
-
|
|
316
|
-
/**
|
|
317
|
-
* Optional analysis features. `ai_analysis` adds summary/transcript.
|
|
318
|
-
* `brand_safety` adds rating/flags. Each feature has additional cost.
|
|
319
|
-
*/
|
|
320
|
-
features?: Array<'ai_analysis' | 'brand_safety'>;
|
|
321
|
-
|
|
322
|
-
/**
|
|
323
|
-
* Number of posts per page. Min 1, max 100, default 25.
|
|
324
|
-
*/
|
|
325
|
-
limit?: number;
|
|
326
|
-
|
|
327
|
-
/**
|
|
328
|
-
* Social media platform
|
|
188
|
+
* Sort order
|
|
329
189
|
*/
|
|
330
|
-
|
|
190
|
+
sort?: 'recent' | 'top_engagement' | 'most_likes' | 'most_views' | 'most_comments';
|
|
331
191
|
|
|
332
192
|
/**
|
|
333
|
-
*
|
|
193
|
+
* Username (required with platform)
|
|
334
194
|
*/
|
|
335
195
|
username?: string;
|
|
336
196
|
}
|
|
337
197
|
|
|
338
198
|
export declare namespace Posts {
|
|
339
199
|
export {
|
|
340
|
-
type
|
|
341
|
-
type
|
|
342
|
-
type
|
|
343
|
-
type PostListByCreatorResponse as PostListByCreatorResponse,
|
|
344
|
-
type PostAnalyzeParams as PostAnalyzeParams,
|
|
345
|
-
type PostListByCreatorParams as PostListByCreatorParams,
|
|
200
|
+
type PostListResponse as PostListResponse,
|
|
201
|
+
type PostListResponsesQueryCursor as PostListResponsesQueryCursor,
|
|
202
|
+
type PostListParams as PostListParams,
|
|
346
203
|
};
|
|
347
204
|
}
|