getanyapi 0.1.0__py3-none-any.whl
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.
- getanyapi/__init__.py +76 -0
- getanyapi/_account.py +132 -0
- getanyapi/_async_client.py +215 -0
- getanyapi/_client.py +274 -0
- getanyapi/_errors.py +115 -0
- getanyapi/_pagination.py +295 -0
- getanyapi/_transport.py +239 -0
- getanyapi/platforms/__init__.py +89 -0
- getanyapi/platforms/ahrefs.py +384 -0
- getanyapi/platforms/airbnb.py +120 -0
- getanyapi/platforms/alibaba.py +95 -0
- getanyapi/platforms/amazon.py +442 -0
- getanyapi/platforms/appstore.py +95 -0
- getanyapi/platforms/bluesky.py +215 -0
- getanyapi/platforms/booking.py +128 -0
- getanyapi/platforms/coinmarketcap.py +113 -0
- getanyapi/platforms/congress.py +106 -0
- getanyapi/platforms/dexscreener.py +104 -0
- getanyapi/platforms/ebay.py +215 -0
- getanyapi/platforms/email.py +166 -0
- getanyapi/platforms/facebook.py +2324 -0
- getanyapi/platforms/fiverr.py +122 -0
- getanyapi/platforms/github.py +954 -0
- getanyapi/platforms/glassdoor.py +93 -0
- getanyapi/platforms/google.py +232 -0
- getanyapi/platforms/google_ads.py +380 -0
- getanyapi/platforms/google_finance.py +170 -0
- getanyapi/platforms/google_shopping.py +103 -0
- getanyapi/platforms/hackernews.py +276 -0
- getanyapi/platforms/indeed.py +114 -0
- getanyapi/platforms/instagram.py +1868 -0
- getanyapi/platforms/linkedin.py +1064 -0
- getanyapi/platforms/maps.py +412 -0
- getanyapi/platforms/pandaexpress.py +262 -0
- getanyapi/platforms/person.py +96 -0
- getanyapi/platforms/pinterest.py +96 -0
- getanyapi/platforms/playstore.py +99 -0
- getanyapi/platforms/polymarket.py +109 -0
- getanyapi/platforms/realtor.py +104 -0
- getanyapi/platforms/reddit.py +582 -0
- getanyapi/platforms/redfin.py +95 -0
- getanyapi/platforms/rednote.py +807 -0
- getanyapi/platforms/sec.py +118 -0
- getanyapi/platforms/semrush.py +358 -0
- getanyapi/platforms/snapchat.py +146 -0
- getanyapi/platforms/social.py +105 -0
- getanyapi/platforms/spotify.py +588 -0
- getanyapi/platforms/substack.py +142 -0
- getanyapi/platforms/threads.py +358 -0
- getanyapi/platforms/tiktok.py +1827 -0
- getanyapi/platforms/tiktok_shop.py +536 -0
- getanyapi/platforms/tripadvisor.py +180 -0
- getanyapi/platforms/trustpilot.py +114 -0
- getanyapi/platforms/truthsocial.py +226 -0
- getanyapi/platforms/twitter.py +798 -0
- getanyapi/platforms/upwork.py +119 -0
- getanyapi/platforms/walmart.py +93 -0
- getanyapi/platforms/web.py +264 -0
- getanyapi/platforms/whatsapp.py +91 -0
- getanyapi/platforms/yahoo_finance.py +95 -0
- getanyapi/platforms/yelp.py +141 -0
- getanyapi/platforms/youtube.py +1452 -0
- getanyapi/platforms/zillow.py +218 -0
- getanyapi/py.typed +0 -0
- getanyapi/types.py +170 -0
- getanyapi-0.1.0.dist-info/METADATA +155 -0
- getanyapi-0.1.0.dist-info/RECORD +68 -0
- getanyapi-0.1.0.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,1868 @@
|
|
|
1
|
+
# Generated - do not edit. Regenerate with: pnpm generate
|
|
2
|
+
"""Generated namespace module for the instagram platform."""
|
|
3
|
+
|
|
4
|
+
from __future__ import annotations
|
|
5
|
+
|
|
6
|
+
from typing import Literal, TYPE_CHECKING
|
|
7
|
+
|
|
8
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
9
|
+
from typing_extensions import NotRequired, Required, TypedDict, Unpack
|
|
10
|
+
|
|
11
|
+
from ..types import RequestOptions, RunResult
|
|
12
|
+
from .._pagination import (
|
|
13
|
+
AsyncPaginator,
|
|
14
|
+
Paginator,
|
|
15
|
+
apaginate,
|
|
16
|
+
paginate,
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
if TYPE_CHECKING:
|
|
20
|
+
from .._async_client import AsyncAnyAPI
|
|
21
|
+
from .._client import AnyAPI
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class InstagramAudioReelsInput(TypedDict, total=False):
|
|
25
|
+
"""Input for Instagram Reels by Audio."""
|
|
26
|
+
|
|
27
|
+
audioId: Required[str]
|
|
28
|
+
"""Audio identifier from the Instagram audio page URL."""
|
|
29
|
+
cursor: NotRequired[str]
|
|
30
|
+
"""Pagination cursor returned by a previous response."""
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class InstagramBasicProfileInput(TypedDict, total=False):
|
|
34
|
+
"""Input for Instagram Basic Profile."""
|
|
35
|
+
|
|
36
|
+
userId: Required[str]
|
|
37
|
+
"""Instagram numeric user id."""
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
class InstagramEmbedInput(TypedDict, total=False):
|
|
41
|
+
"""Input for Instagram Profile Embed."""
|
|
42
|
+
|
|
43
|
+
handle: Required[str]
|
|
44
|
+
"""Instagram username without the leading @."""
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class InstagramFollowersInput(TypedDict, total=False):
|
|
48
|
+
"""Input for Instagram Followers."""
|
|
49
|
+
|
|
50
|
+
cursor: NotRequired[str]
|
|
51
|
+
"""Opaque pagination cursor from a previous response's nextCursor. Omit for the first page; pass it to fetch the next page of followers."""
|
|
52
|
+
limit: NotRequired[int]
|
|
53
|
+
"""How many followers you want (50-1000). By default results come back in cheap pages of up to ~50: follow the response's nextCursor for more. With requireSinglePage true, up to this many are returned in one (pricier) call. Range: 50 to 1000."""
|
|
54
|
+
requireSinglePage: NotRequired[bool]
|
|
55
|
+
"""Set true to get up to limit followers in a single response instead of cheap pages, served by a bulk provider at a higher price."""
|
|
56
|
+
username: Required[str]
|
|
57
|
+
"""The Instagram username, user ID, or profile URL whose followers to list (e.g. natgeo)."""
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
class InstagramFollowingInput(TypedDict, total=False):
|
|
61
|
+
"""Input for Instagram Following."""
|
|
62
|
+
|
|
63
|
+
cursor: NotRequired[str]
|
|
64
|
+
"""Opaque pagination cursor from a previous response's nextCursor. Omit for the first page; pass it to fetch the next page."""
|
|
65
|
+
limit: NotRequired[int]
|
|
66
|
+
"""How many accounts you want (50-1000). By default results come back in cheap pages of up to ~50: follow the response's nextCursor for more. With requireSinglePage true, up to this many are returned in one (pricier) call. Range: 50 to 1000."""
|
|
67
|
+
requireSinglePage: NotRequired[bool]
|
|
68
|
+
"""Set true to get up to limit accounts in a single response instead of cheap pages, served by a bulk provider at a higher price."""
|
|
69
|
+
username: Required[str]
|
|
70
|
+
"""The Instagram username, user ID, or profile URL whose following list to fetch (e.g. natgeo)."""
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
class InstagramHashtagAnalyticsInput(TypedDict, total=False):
|
|
74
|
+
"""Input for Instagram Hashtag Analytics."""
|
|
75
|
+
|
|
76
|
+
hashtag: Required[str]
|
|
77
|
+
"""The Instagram hashtag to analyze, with or without the # symbol (e.g. streetphotography)."""
|
|
78
|
+
limit: NotRequired[int]
|
|
79
|
+
"""Maximum number of results to return (1-20, default 20). You are billed per result returned, so a lower limit costs less. Range: 1 to 20."""
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
class InstagramHighlightDetailInput(TypedDict, total=False):
|
|
83
|
+
"""Input for Instagram Highlight Detail."""
|
|
84
|
+
|
|
85
|
+
id: Required[str]
|
|
86
|
+
"""The id of the highlight to retrieve details for."""
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
class InstagramMediaTranscriptInput(TypedDict, total=False):
|
|
90
|
+
"""Input for Instagram Media Transcript."""
|
|
91
|
+
|
|
92
|
+
url: Required[str]
|
|
93
|
+
"""Instagram post or reel URL."""
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
class InstagramPostInput(TypedDict, total=False):
|
|
97
|
+
"""Input for Instagram Post."""
|
|
98
|
+
|
|
99
|
+
url: Required[str]
|
|
100
|
+
"""Full Instagram post or reel URL."""
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
class InstagramPostCommentsInput(TypedDict, total=False):
|
|
104
|
+
"""Input for Instagram Post Comments."""
|
|
105
|
+
|
|
106
|
+
cursor: NotRequired[str]
|
|
107
|
+
"""Pagination cursor from a previous response's nextCursor."""
|
|
108
|
+
url: Required[str]
|
|
109
|
+
"""Full Instagram post or reel URL."""
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
class InstagramProfileInput(TypedDict, total=False):
|
|
113
|
+
"""Input for Instagram Profile."""
|
|
114
|
+
|
|
115
|
+
handle: Required[str]
|
|
116
|
+
"""Instagram username without the leading @."""
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
class InstagramReelTranscriptInput(TypedDict, total=False):
|
|
120
|
+
"""Input for Instagram Reel Transcript."""
|
|
121
|
+
|
|
122
|
+
url: Required[str]
|
|
123
|
+
"""The URL of a public Instagram reel or video post with spoken audio (e.g. https://www.instagram.com/reel/C8yKXdRxKqK/)."""
|
|
124
|
+
wordTimestamps: NotRequired[bool]
|
|
125
|
+
"""Set true to include a precise timestamp for every word in the transcript (e.g. true). Default: false."""
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
class InstagramReelsSearchInput(TypedDict, total=False):
|
|
129
|
+
"""Input for Instagram Reels Search."""
|
|
130
|
+
|
|
131
|
+
datePosted: NotRequired[
|
|
132
|
+
Literal["last-hour", "last-day", "last-week", "last-month", "last-year"]
|
|
133
|
+
]
|
|
134
|
+
"""Restrict results to reels posted within this window."""
|
|
135
|
+
page: NotRequired[int]
|
|
136
|
+
"""1-based results page. Minimum: 1. Default: 1."""
|
|
137
|
+
query: Required[str]
|
|
138
|
+
"""Search keyword (e.g. "crossfit")."""
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
class InstagramSearchInput(TypedDict, total=False):
|
|
142
|
+
"""Input for Instagram Search."""
|
|
143
|
+
|
|
144
|
+
limit: NotRequired[int]
|
|
145
|
+
"""Maximum number of results to return (1-20, default 20). You are billed per result returned, so a lower limit costs less. Range: 1 to 20."""
|
|
146
|
+
query: Required[str]
|
|
147
|
+
"""Keyword to search Instagram for; one or more words without special punctuation (e.g. coffee roastery)."""
|
|
148
|
+
type: NotRequired[Literal["user", "hashtag", "place"]]
|
|
149
|
+
"""What to search for: user profiles, hashtags, or places (e.g. hashtag). Default: user."""
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
class InstagramSearchHashtagInput(TypedDict, total=False):
|
|
153
|
+
"""Input for Instagram Hashtag Search."""
|
|
154
|
+
|
|
155
|
+
cursor: NotRequired[str]
|
|
156
|
+
"""Pagination cursor from a previous response."""
|
|
157
|
+
hashtag: Required[str]
|
|
158
|
+
"""Hashtag to search, without the leading #."""
|
|
159
|
+
mediaType: NotRequired[str]
|
|
160
|
+
"""Filter by media type (e.g. all, photo, video, reel)."""
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
class InstagramSearchProfilesInput(TypedDict, total=False):
|
|
164
|
+
"""Input for Instagram Profile Search."""
|
|
165
|
+
|
|
166
|
+
cursor: NotRequired[str]
|
|
167
|
+
"""Pagination cursor returned by a previous response."""
|
|
168
|
+
query: Required[str]
|
|
169
|
+
"""Bio or caption keyword/phrase to search for."""
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
class InstagramStoriesFullInput(TypedDict, total=False):
|
|
173
|
+
"""Input for Instagram Stories (full)."""
|
|
174
|
+
|
|
175
|
+
usernames: Required[list[str]]
|
|
176
|
+
"""Instagram usernames/handles (without the @). A flat run fee is shared across the batch, so request several at once to lower the cost per account. Up to 100 usernames per request."""
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
class InstagramStoriesThinInput(TypedDict, total=False):
|
|
180
|
+
"""Input for Instagram Stories (basic)."""
|
|
181
|
+
|
|
182
|
+
username: Required[str]
|
|
183
|
+
"""Instagram username/handle to fetch currently live stories for (without the @)."""
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
class InstagramTrendingReelsInput(TypedDict, total=False):
|
|
187
|
+
"""Input for Instagram Trending Reels."""
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
class InstagramUserHighlightsInput(TypedDict, total=False):
|
|
191
|
+
"""Input for Instagram User Highlights."""
|
|
192
|
+
|
|
193
|
+
handle: Required[str]
|
|
194
|
+
"""Instagram username without the leading @."""
|
|
195
|
+
userId: NotRequired[str]
|
|
196
|
+
"""Instagram numeric user id (optional, faster than handle)."""
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
class InstagramUserPostsInput(TypedDict, total=False):
|
|
200
|
+
"""Input for Instagram User Posts."""
|
|
201
|
+
|
|
202
|
+
cursor: NotRequired[str]
|
|
203
|
+
"""Pagination cursor from a previous response's nextCursor."""
|
|
204
|
+
handle: Required[str]
|
|
205
|
+
"""Instagram username without the leading @."""
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
class InstagramUserReelsInput(TypedDict, total=False):
|
|
209
|
+
"""Input for Instagram User Reels."""
|
|
210
|
+
|
|
211
|
+
cursor: NotRequired[str]
|
|
212
|
+
"""Pagination cursor (max_id) from a previous response's nextCursor."""
|
|
213
|
+
handle: NotRequired[str]
|
|
214
|
+
"""Instagram handle."""
|
|
215
|
+
userId: NotRequired[str]
|
|
216
|
+
"""Instagram user id (faster than handle when known)."""
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
class InstagramAudioReelsData(BaseModel):
|
|
220
|
+
model_config = ConfigDict(populate_by_name=True)
|
|
221
|
+
|
|
222
|
+
has_more: bool = Field(alias="hasMore")
|
|
223
|
+
next_cursor: str = Field(alias="nextCursor")
|
|
224
|
+
reels: list[InstagramAudioReelsReel]
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
class InstagramAudioReelsReel(BaseModel):
|
|
228
|
+
model_config = ConfigDict(extra="allow")
|
|
229
|
+
|
|
230
|
+
code: str
|
|
231
|
+
comments: int
|
|
232
|
+
handle: str
|
|
233
|
+
id: str
|
|
234
|
+
likes: int
|
|
235
|
+
plays: int
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
class InstagramBasicProfileData(BaseModel):
|
|
239
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
240
|
+
|
|
241
|
+
avatar_url: str = Field(alias="avatarUrl")
|
|
242
|
+
bio: str
|
|
243
|
+
display_name: str = Field(alias="displayName")
|
|
244
|
+
external_url: str = Field(alias="externalUrl")
|
|
245
|
+
followers: int
|
|
246
|
+
following: int
|
|
247
|
+
handle: str
|
|
248
|
+
private: bool
|
|
249
|
+
user_id: str = Field(alias="userId")
|
|
250
|
+
verified: bool
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
class InstagramEmbedData(BaseModel):
|
|
254
|
+
model_config = ConfigDict(extra="allow")
|
|
255
|
+
|
|
256
|
+
html: str
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
class InstagramFollowersData(BaseModel):
|
|
260
|
+
model_config = ConfigDict(populate_by_name=True)
|
|
261
|
+
|
|
262
|
+
items: list[InstagramFollowersItem] = Field(
|
|
263
|
+
description="Follower records: id, handle, full name, profile picture URL, and verification/privacy flags."
|
|
264
|
+
)
|
|
265
|
+
next_cursor: str | None = Field(
|
|
266
|
+
default=None,
|
|
267
|
+
alias="nextCursor",
|
|
268
|
+
description="Opaque cursor for the next page of followers, or null when this lane has no more. Pass it back as cursor to continue.",
|
|
269
|
+
)
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
class InstagramFollowersItem(BaseModel):
|
|
273
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
274
|
+
|
|
275
|
+
full_name: str | None = Field(
|
|
276
|
+
default=None,
|
|
277
|
+
alias="fullName",
|
|
278
|
+
description="Follower's display name (may be empty). Present whenever the upstream returns this record.",
|
|
279
|
+
)
|
|
280
|
+
handle: str
|
|
281
|
+
id: str
|
|
282
|
+
private: bool | None = Field(
|
|
283
|
+
default=None, description="Whether the follower's account is private."
|
|
284
|
+
)
|
|
285
|
+
profile_pic_url: str | None = Field(
|
|
286
|
+
default=None,
|
|
287
|
+
alias="profilePicUrl",
|
|
288
|
+
description="URL of the follower's profile picture. Present whenever the upstream returns this record.",
|
|
289
|
+
)
|
|
290
|
+
verified: bool | None = Field(
|
|
291
|
+
default=None, description="Whether the follower's account is verified."
|
|
292
|
+
)
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
class InstagramFollowingData(BaseModel):
|
|
296
|
+
model_config = ConfigDict(populate_by_name=True)
|
|
297
|
+
|
|
298
|
+
items: list[InstagramFollowingItem] = Field(
|
|
299
|
+
description="Followed-account records: numeric id, handle, full name, profile picture URL, and verified/private flags."
|
|
300
|
+
)
|
|
301
|
+
next_cursor: str | None = Field(
|
|
302
|
+
default=None,
|
|
303
|
+
alias="nextCursor",
|
|
304
|
+
description="Opaque cursor for the next page of accounts, or null when this lane has no more. Pass it back as cursor to continue.",
|
|
305
|
+
)
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
class InstagramFollowingItem(BaseModel):
|
|
309
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
310
|
+
|
|
311
|
+
full_name: str | None = Field(
|
|
312
|
+
default=None,
|
|
313
|
+
alias="fullName",
|
|
314
|
+
description="Account display name. Present whenever the upstream returns this record.",
|
|
315
|
+
)
|
|
316
|
+
handle: str
|
|
317
|
+
id: str
|
|
318
|
+
private: bool | None = Field(
|
|
319
|
+
default=None, description="Whether the account is private."
|
|
320
|
+
)
|
|
321
|
+
profile_pic_url: str | None = Field(
|
|
322
|
+
default=None,
|
|
323
|
+
alias="profilePicUrl",
|
|
324
|
+
description="URL of the account's profile picture. Present whenever the upstream returns this record.",
|
|
325
|
+
)
|
|
326
|
+
verified: bool | None = Field(
|
|
327
|
+
default=None, description="Whether the account has a verified badge."
|
|
328
|
+
)
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
class InstagramHashtagAnalyticsData(BaseModel):
|
|
332
|
+
items: list[InstagramHashtagAnalyticsItem] = Field(
|
|
333
|
+
description="Hashtag analytics records: hashtag name, total post count, and related hashtag suggestions."
|
|
334
|
+
)
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
class InstagramHashtagAnalyticsItem(BaseModel):
|
|
338
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
339
|
+
|
|
340
|
+
difficulty: str | None = None
|
|
341
|
+
id: str | None = Field(
|
|
342
|
+
default=None, description="Present whenever the upstream returns this record."
|
|
343
|
+
)
|
|
344
|
+
name: str = Field(description="Hashtag (without #).")
|
|
345
|
+
posts_count: int | None = Field(
|
|
346
|
+
default=None, alias="postsCount", description="Total posts using the hashtag."
|
|
347
|
+
)
|
|
348
|
+
posts_formatted: str | None = Field(
|
|
349
|
+
default=None,
|
|
350
|
+
alias="postsFormatted",
|
|
351
|
+
description="Human-formatted post count (e.g. 793.54 M). Present whenever the upstream returns this record.",
|
|
352
|
+
)
|
|
353
|
+
url: str
|
|
354
|
+
|
|
355
|
+
|
|
356
|
+
class InstagramHighlightDetailData(BaseModel):
|
|
357
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
358
|
+
|
|
359
|
+
cover_url: str = Field(alias="coverUrl")
|
|
360
|
+
created_at: int = Field(alias="createdAt")
|
|
361
|
+
id: str
|
|
362
|
+
media_count: int = Field(alias="mediaCount")
|
|
363
|
+
owner_handle: str = Field(alias="ownerHandle")
|
|
364
|
+
title: str
|
|
365
|
+
|
|
366
|
+
|
|
367
|
+
class InstagramMediaTranscriptData(BaseModel):
|
|
368
|
+
transcripts: list[InstagramMediaTranscriptTranscript]
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
class InstagramMediaTranscriptTranscript(BaseModel):
|
|
372
|
+
model_config = ConfigDict(extra="allow")
|
|
373
|
+
|
|
374
|
+
id: str
|
|
375
|
+
shortcode: str
|
|
376
|
+
text: str
|
|
377
|
+
|
|
378
|
+
|
|
379
|
+
class InstagramPostData(BaseModel):
|
|
380
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
381
|
+
|
|
382
|
+
display_url: str = Field(alias="displayUrl")
|
|
383
|
+
id: str
|
|
384
|
+
likes: int
|
|
385
|
+
owner: str
|
|
386
|
+
shortcode: str
|
|
387
|
+
type_: str = Field(alias="type")
|
|
388
|
+
video_url: str = Field(alias="videoUrl")
|
|
389
|
+
|
|
390
|
+
|
|
391
|
+
class InstagramPostCommentsData(BaseModel):
|
|
392
|
+
comments: list[InstagramPostCommentsComment]
|
|
393
|
+
|
|
394
|
+
|
|
395
|
+
class InstagramPostCommentsComment(BaseModel):
|
|
396
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
397
|
+
|
|
398
|
+
author: str
|
|
399
|
+
created_at: str = Field(alias="createdAt")
|
|
400
|
+
id: str
|
|
401
|
+
likes: int
|
|
402
|
+
text: str
|
|
403
|
+
verified: bool
|
|
404
|
+
|
|
405
|
+
|
|
406
|
+
class InstagramProfileData(BaseModel):
|
|
407
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
408
|
+
|
|
409
|
+
avatar_url: str = Field(alias="avatarUrl")
|
|
410
|
+
bio: str
|
|
411
|
+
display_name: str = Field(alias="displayName")
|
|
412
|
+
followers: int
|
|
413
|
+
following: int
|
|
414
|
+
handle: str
|
|
415
|
+
posts: int
|
|
416
|
+
verified: bool
|
|
417
|
+
|
|
418
|
+
|
|
419
|
+
class InstagramReelTranscriptData(BaseModel):
|
|
420
|
+
items: list[InstagramReelTranscriptItem] = Field(
|
|
421
|
+
description="Transcript records: full transcript text, timed segments, detected language, and source video metadata."
|
|
422
|
+
)
|
|
423
|
+
|
|
424
|
+
|
|
425
|
+
class InstagramReelTranscriptItem(BaseModel):
|
|
426
|
+
model_config = ConfigDict(extra="allow")
|
|
427
|
+
|
|
428
|
+
text: str
|
|
429
|
+
url: str
|
|
430
|
+
|
|
431
|
+
|
|
432
|
+
class InstagramReelsSearchData(BaseModel):
|
|
433
|
+
reels: list[InstagramReelsSearchReel]
|
|
434
|
+
|
|
435
|
+
|
|
436
|
+
class InstagramReelsSearchReel(BaseModel):
|
|
437
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
438
|
+
|
|
439
|
+
caption: str
|
|
440
|
+
comments: int
|
|
441
|
+
duration_seconds: float = Field(alias="durationSeconds")
|
|
442
|
+
followers: int
|
|
443
|
+
likes: int
|
|
444
|
+
paid_partnership: bool = Field(alias="paidPartnership")
|
|
445
|
+
plays: int
|
|
446
|
+
shortcode: str
|
|
447
|
+
taken_at: str = Field(alias="takenAt")
|
|
448
|
+
thumbnail: str
|
|
449
|
+
url: str
|
|
450
|
+
username: str
|
|
451
|
+
verified: bool
|
|
452
|
+
views: int
|
|
453
|
+
|
|
454
|
+
|
|
455
|
+
class InstagramSearchData(BaseModel):
|
|
456
|
+
items: list[InstagramSearchItem] = Field(
|
|
457
|
+
description="Matching search results: user profiles, hashtags, or places with names, follower/post counts, and profile links."
|
|
458
|
+
)
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
class InstagramSearchItem(BaseModel):
|
|
462
|
+
model_config = ConfigDict(extra="allow")
|
|
463
|
+
|
|
464
|
+
handle: str
|
|
465
|
+
url: str
|
|
466
|
+
|
|
467
|
+
|
|
468
|
+
class InstagramSearchHashtagData(BaseModel):
|
|
469
|
+
posts: list[InstagramSearchHashtagPost]
|
|
470
|
+
|
|
471
|
+
|
|
472
|
+
class InstagramSearchHashtagPost(BaseModel):
|
|
473
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
474
|
+
|
|
475
|
+
caption: str
|
|
476
|
+
display_url: str = Field(alias="displayUrl")
|
|
477
|
+
id: str
|
|
478
|
+
shortcode: str
|
|
479
|
+
type_: str = Field(alias="type")
|
|
480
|
+
url: str
|
|
481
|
+
|
|
482
|
+
|
|
483
|
+
class InstagramSearchProfilesData(BaseModel):
|
|
484
|
+
model_config = ConfigDict(populate_by_name=True)
|
|
485
|
+
|
|
486
|
+
next_cursor: str = Field(alias="nextCursor")
|
|
487
|
+
profiles: list[InstagramSearchProfilesProfile]
|
|
488
|
+
|
|
489
|
+
|
|
490
|
+
class InstagramSearchProfilesProfile(BaseModel):
|
|
491
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
492
|
+
|
|
493
|
+
avatar_url: str = Field(alias="avatarUrl")
|
|
494
|
+
bio: str
|
|
495
|
+
display_name: str = Field(alias="displayName")
|
|
496
|
+
followers: int
|
|
497
|
+
following: int
|
|
498
|
+
handle: str
|
|
499
|
+
id: str
|
|
500
|
+
posts: int
|
|
501
|
+
private: bool
|
|
502
|
+
verified: bool
|
|
503
|
+
|
|
504
|
+
|
|
505
|
+
class InstagramStoriesFullData(BaseModel):
|
|
506
|
+
items: list[InstagramStoriesFullItem] = Field(
|
|
507
|
+
description="Story records across the requested accounts, each with full media, type, dimensions, posting + expiry time, and caption."
|
|
508
|
+
)
|
|
509
|
+
|
|
510
|
+
|
|
511
|
+
class InstagramStoriesFullItem(BaseModel):
|
|
512
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
513
|
+
|
|
514
|
+
caption: str | None = Field(
|
|
515
|
+
default=None, description="Story caption text, when present."
|
|
516
|
+
)
|
|
517
|
+
code: str | None = Field(default=None, description="Instagram media shortcode.")
|
|
518
|
+
expires_at: int | None = Field(
|
|
519
|
+
default=None,
|
|
520
|
+
alias="expiresAt",
|
|
521
|
+
description="Expiry time, 24h after posting (Unix seconds).",
|
|
522
|
+
)
|
|
523
|
+
height: int | None = Field(default=None, description="Media pixel height.")
|
|
524
|
+
id: str = Field(description="Story identifier.")
|
|
525
|
+
image_url: str | None = Field(
|
|
526
|
+
default=None,
|
|
527
|
+
alias="imageUrl",
|
|
528
|
+
description="Direct URL to the story image (highest resolution).",
|
|
529
|
+
)
|
|
530
|
+
media_type: int | None = Field(
|
|
531
|
+
default=None, alias="mediaType", description="Media type: 1 = image, 2 = video."
|
|
532
|
+
)
|
|
533
|
+
posted_at: int | None = Field(
|
|
534
|
+
default=None, alias="postedAt", description="Posting time (Unix seconds)."
|
|
535
|
+
)
|
|
536
|
+
username: str | None = Field(
|
|
537
|
+
default=None,
|
|
538
|
+
description="Owner username. Present whenever the upstream returns this record.",
|
|
539
|
+
)
|
|
540
|
+
video_url: str | None = Field(
|
|
541
|
+
default=None,
|
|
542
|
+
alias="videoUrl",
|
|
543
|
+
description="Direct URL to the story video, when the story is a video.",
|
|
544
|
+
)
|
|
545
|
+
width: int | None = Field(default=None, description="Media pixel width.")
|
|
546
|
+
|
|
547
|
+
|
|
548
|
+
class InstagramStoriesThinData(BaseModel):
|
|
549
|
+
items: list[InstagramStoriesThinItem] = Field(
|
|
550
|
+
description="The account's currently live stories, each with its media URL, owner, posting time, and permalink."
|
|
551
|
+
)
|
|
552
|
+
|
|
553
|
+
|
|
554
|
+
class InstagramStoriesThinItem(BaseModel):
|
|
555
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
556
|
+
|
|
557
|
+
id: str = Field(description="Story identifier.")
|
|
558
|
+
media_url: str | None = Field(
|
|
559
|
+
default=None,
|
|
560
|
+
alias="mediaUrl",
|
|
561
|
+
description="Direct URL to the story image or video. Present whenever the upstream returns this record.",
|
|
562
|
+
)
|
|
563
|
+
permalink: str | None = Field(
|
|
564
|
+
default=None,
|
|
565
|
+
description="Public link to the story. Present whenever the upstream returns this record.",
|
|
566
|
+
)
|
|
567
|
+
posted_at: int | None = Field(
|
|
568
|
+
default=None, alias="postedAt", description="Posting time (Unix seconds)."
|
|
569
|
+
)
|
|
570
|
+
username: str | None = Field(
|
|
571
|
+
default=None,
|
|
572
|
+
description="Owner username. Present whenever the upstream returns this record.",
|
|
573
|
+
)
|
|
574
|
+
|
|
575
|
+
|
|
576
|
+
class InstagramTrendingReelsData(BaseModel):
|
|
577
|
+
reels: list[InstagramTrendingReelsReel]
|
|
578
|
+
|
|
579
|
+
|
|
580
|
+
class InstagramTrendingReelsReel(BaseModel):
|
|
581
|
+
model_config = ConfigDict(extra="allow")
|
|
582
|
+
|
|
583
|
+
caption: str
|
|
584
|
+
comments: int
|
|
585
|
+
handle: str
|
|
586
|
+
id: str
|
|
587
|
+
likes: int
|
|
588
|
+
plays: int
|
|
589
|
+
shortcode: str
|
|
590
|
+
url: str
|
|
591
|
+
|
|
592
|
+
|
|
593
|
+
class InstagramUserHighlightsData(BaseModel):
|
|
594
|
+
highlights: list[InstagramUserHighlightsHighlight]
|
|
595
|
+
|
|
596
|
+
|
|
597
|
+
class InstagramUserHighlightsHighlight(BaseModel):
|
|
598
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
599
|
+
|
|
600
|
+
cover_url: str = Field(alias="coverUrl")
|
|
601
|
+
id: str
|
|
602
|
+
owner_handle: str = Field(alias="ownerHandle")
|
|
603
|
+
title: str
|
|
604
|
+
|
|
605
|
+
|
|
606
|
+
class InstagramUserPostsData(BaseModel):
|
|
607
|
+
model_config = ConfigDict(populate_by_name=True)
|
|
608
|
+
|
|
609
|
+
next_cursor: str = Field(alias="nextCursor")
|
|
610
|
+
posts: list[InstagramUserPostsPost]
|
|
611
|
+
|
|
612
|
+
|
|
613
|
+
class InstagramUserPostsPost(BaseModel):
|
|
614
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
615
|
+
|
|
616
|
+
caption: str
|
|
617
|
+
comments: int
|
|
618
|
+
created_at: str = Field(alias="createdAt")
|
|
619
|
+
id: str
|
|
620
|
+
likes: int
|
|
621
|
+
url: str
|
|
622
|
+
|
|
623
|
+
|
|
624
|
+
class InstagramUserReelsData(BaseModel):
|
|
625
|
+
model_config = ConfigDict(populate_by_name=True)
|
|
626
|
+
|
|
627
|
+
next_cursor: str = Field(alias="nextCursor")
|
|
628
|
+
reels: list[InstagramUserReelsReel]
|
|
629
|
+
|
|
630
|
+
|
|
631
|
+
class InstagramUserReelsReel(BaseModel):
|
|
632
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
633
|
+
|
|
634
|
+
caption: str
|
|
635
|
+
comments: int
|
|
636
|
+
id: str
|
|
637
|
+
likes: int
|
|
638
|
+
shortcode: str
|
|
639
|
+
taken_at: int = Field(alias="takenAt")
|
|
640
|
+
views: int
|
|
641
|
+
|
|
642
|
+
|
|
643
|
+
class InstagramNamespace:
|
|
644
|
+
"""Typed methods for this platform. Attached lazily to the client."""
|
|
645
|
+
|
|
646
|
+
def __init__(self, client: "AnyAPI") -> None:
|
|
647
|
+
self._client = client
|
|
648
|
+
|
|
649
|
+
def audio_reels(
|
|
650
|
+
self,
|
|
651
|
+
*,
|
|
652
|
+
options: RequestOptions | None = None,
|
|
653
|
+
**input: Unpack[InstagramAudioReelsInput],
|
|
654
|
+
) -> RunResult[InstagramAudioReelsData]:
|
|
655
|
+
"""Instagram Reels by Audio
|
|
656
|
+
|
|
657
|
+
List Instagram reels that use a given audio track by audio id, normalized
|
|
658
|
+
across providers with transparent failover.
|
|
659
|
+
|
|
660
|
+
Price: $0.002 per request.
|
|
661
|
+
|
|
662
|
+
Example:
|
|
663
|
+
res = client.instagram.audio_reels(audioId="1392969992841787")
|
|
664
|
+
"""
|
|
665
|
+
raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
|
|
666
|
+
"instagram.audio_reels", dict(input), options
|
|
667
|
+
)
|
|
668
|
+
return RunResult[InstagramAudioReelsData].model_validate(raw)
|
|
669
|
+
|
|
670
|
+
def iter_audio_reels(
|
|
671
|
+
self,
|
|
672
|
+
*,
|
|
673
|
+
options: RequestOptions | None = None,
|
|
674
|
+
**input: Unpack[InstagramAudioReelsInput],
|
|
675
|
+
) -> Paginator[InstagramAudioReelsReel, InstagramAudioReelsData]:
|
|
676
|
+
"""Iterate Instagram Reels by Audio results, following pagination cursors.
|
|
677
|
+
|
|
678
|
+
Yields validated `InstagramAudioReelsReel` items from the `reels` field of
|
|
679
|
+
each page. Use `.pages()` on the returned paginator to walk whole
|
|
680
|
+
`RunResult` pages.
|
|
681
|
+
"""
|
|
682
|
+
return paginate(
|
|
683
|
+
self._client,
|
|
684
|
+
"instagram.audio_reels",
|
|
685
|
+
dict(input),
|
|
686
|
+
"reels",
|
|
687
|
+
item_model=InstagramAudioReelsReel,
|
|
688
|
+
data_model=InstagramAudioReelsData,
|
|
689
|
+
bare=False,
|
|
690
|
+
options=options,
|
|
691
|
+
)
|
|
692
|
+
|
|
693
|
+
def basic_profile(
|
|
694
|
+
self,
|
|
695
|
+
*,
|
|
696
|
+
options: RequestOptions | None = None,
|
|
697
|
+
**input: Unpack[InstagramBasicProfileInput],
|
|
698
|
+
) -> RunResult[InstagramBasicProfileData]:
|
|
699
|
+
"""Instagram Basic Profile
|
|
700
|
+
|
|
701
|
+
Fetch an Instagram account's core public profile fields (followers, posts,
|
|
702
|
+
bio, verification) by user id, normalized across providers with transparent
|
|
703
|
+
failover.
|
|
704
|
+
|
|
705
|
+
Price: $0.002 per request.
|
|
706
|
+
|
|
707
|
+
Example:
|
|
708
|
+
res = client.instagram.basic_profile(userId="314216")
|
|
709
|
+
"""
|
|
710
|
+
raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
|
|
711
|
+
"instagram.basic_profile", dict(input), options
|
|
712
|
+
)
|
|
713
|
+
return RunResult[InstagramBasicProfileData].model_validate(raw)
|
|
714
|
+
|
|
715
|
+
def embed(
|
|
716
|
+
self,
|
|
717
|
+
*,
|
|
718
|
+
options: RequestOptions | None = None,
|
|
719
|
+
**input: Unpack[InstagramEmbedInput],
|
|
720
|
+
) -> RunResult[InstagramEmbedData]:
|
|
721
|
+
"""Instagram Profile Embed
|
|
722
|
+
|
|
723
|
+
Fetch the public embed HTML for an Instagram profile by handle, normalized
|
|
724
|
+
across providers with transparent failover.
|
|
725
|
+
|
|
726
|
+
Price: $0.002 per request.
|
|
727
|
+
|
|
728
|
+
Example:
|
|
729
|
+
res = client.instagram.embed(handle="nasa")
|
|
730
|
+
"""
|
|
731
|
+
raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
|
|
732
|
+
"instagram.embed", dict(input), options
|
|
733
|
+
)
|
|
734
|
+
return RunResult[InstagramEmbedData].model_validate(raw)
|
|
735
|
+
|
|
736
|
+
def followers(
|
|
737
|
+
self,
|
|
738
|
+
*,
|
|
739
|
+
options: RequestOptions | None = None,
|
|
740
|
+
**input: Unpack[InstagramFollowersInput],
|
|
741
|
+
) -> RunResult[InstagramFollowersData]:
|
|
742
|
+
"""Instagram Followers
|
|
743
|
+
|
|
744
|
+
List the followers of any public Instagram account by username - follower
|
|
745
|
+
usernames, names, and profile details - at a flat per-request USD price.
|
|
746
|
+
|
|
747
|
+
Price: $0.01625 per request.
|
|
748
|
+
|
|
749
|
+
Example:
|
|
750
|
+
res = client.instagram.followers(limit=50, username="nasa")
|
|
751
|
+
"""
|
|
752
|
+
raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
|
|
753
|
+
"instagram.followers", dict(input), options
|
|
754
|
+
)
|
|
755
|
+
return RunResult[InstagramFollowersData].model_validate(raw)
|
|
756
|
+
|
|
757
|
+
def iter_followers(
|
|
758
|
+
self,
|
|
759
|
+
*,
|
|
760
|
+
options: RequestOptions | None = None,
|
|
761
|
+
**input: Unpack[InstagramFollowersInput],
|
|
762
|
+
) -> Paginator[InstagramFollowersItem, InstagramFollowersData]:
|
|
763
|
+
"""Iterate Instagram Followers results, following pagination cursors.
|
|
764
|
+
|
|
765
|
+
Yields validated `InstagramFollowersItem` items from the `items` field of
|
|
766
|
+
each page. Use `.pages()` on the returned paginator to walk whole
|
|
767
|
+
`RunResult` pages.
|
|
768
|
+
"""
|
|
769
|
+
return paginate(
|
|
770
|
+
self._client,
|
|
771
|
+
"instagram.followers",
|
|
772
|
+
dict(input),
|
|
773
|
+
"items",
|
|
774
|
+
item_model=InstagramFollowersItem,
|
|
775
|
+
data_model=InstagramFollowersData,
|
|
776
|
+
bare=False,
|
|
777
|
+
options=options,
|
|
778
|
+
)
|
|
779
|
+
|
|
780
|
+
def following(
|
|
781
|
+
self,
|
|
782
|
+
*,
|
|
783
|
+
options: RequestOptions | None = None,
|
|
784
|
+
**input: Unpack[InstagramFollowingInput],
|
|
785
|
+
) -> RunResult[InstagramFollowingData]:
|
|
786
|
+
"""Instagram Following
|
|
787
|
+
|
|
788
|
+
List the accounts a public Instagram user follows - usernames, names, and
|
|
789
|
+
profile details - at a flat per-request USD price.
|
|
790
|
+
|
|
791
|
+
Price: $0.01625 per request.
|
|
792
|
+
|
|
793
|
+
Example:
|
|
794
|
+
res = client.instagram.following(limit=50, username="nasa")
|
|
795
|
+
"""
|
|
796
|
+
raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
|
|
797
|
+
"instagram.following", dict(input), options
|
|
798
|
+
)
|
|
799
|
+
return RunResult[InstagramFollowingData].model_validate(raw)
|
|
800
|
+
|
|
801
|
+
def iter_following(
|
|
802
|
+
self,
|
|
803
|
+
*,
|
|
804
|
+
options: RequestOptions | None = None,
|
|
805
|
+
**input: Unpack[InstagramFollowingInput],
|
|
806
|
+
) -> Paginator[InstagramFollowingItem, InstagramFollowingData]:
|
|
807
|
+
"""Iterate Instagram Following results, following pagination cursors.
|
|
808
|
+
|
|
809
|
+
Yields validated `InstagramFollowingItem` items from the `items` field of
|
|
810
|
+
each page. Use `.pages()` on the returned paginator to walk whole
|
|
811
|
+
`RunResult` pages.
|
|
812
|
+
"""
|
|
813
|
+
return paginate(
|
|
814
|
+
self._client,
|
|
815
|
+
"instagram.following",
|
|
816
|
+
dict(input),
|
|
817
|
+
"items",
|
|
818
|
+
item_model=InstagramFollowingItem,
|
|
819
|
+
data_model=InstagramFollowingData,
|
|
820
|
+
bare=False,
|
|
821
|
+
options=options,
|
|
822
|
+
)
|
|
823
|
+
|
|
824
|
+
def hashtag_analytics(
|
|
825
|
+
self,
|
|
826
|
+
*,
|
|
827
|
+
options: RequestOptions | None = None,
|
|
828
|
+
**input: Unpack[InstagramHashtagAnalyticsInput],
|
|
829
|
+
) -> RunResult[InstagramHashtagAnalyticsData]:
|
|
830
|
+
"""Instagram Hashtag Analytics
|
|
831
|
+
|
|
832
|
+
Get analytics for any Instagram hashtag - total post count, related
|
|
833
|
+
hashtags, and usage signals - normalized and priced per request in USD.
|
|
834
|
+
|
|
835
|
+
Price: $0.001 per request plus $0.0017 per result.
|
|
836
|
+
|
|
837
|
+
Example:
|
|
838
|
+
res = client.instagram.hashtag_analytics(hashtag="travel", limit=5)
|
|
839
|
+
"""
|
|
840
|
+
raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
|
|
841
|
+
"instagram.hashtag_analytics", dict(input), options
|
|
842
|
+
)
|
|
843
|
+
return RunResult[InstagramHashtagAnalyticsData].model_validate(raw)
|
|
844
|
+
|
|
845
|
+
def highlight_detail(
|
|
846
|
+
self,
|
|
847
|
+
*,
|
|
848
|
+
options: RequestOptions | None = None,
|
|
849
|
+
**input: Unpack[InstagramHighlightDetailInput],
|
|
850
|
+
) -> RunResult[InstagramHighlightDetailData]:
|
|
851
|
+
"""Instagram Highlight Detail
|
|
852
|
+
|
|
853
|
+
Fetch the details and media items of a single Instagram story highlight by
|
|
854
|
+
id, normalized across providers with transparent failover.
|
|
855
|
+
|
|
856
|
+
Price: $0.002 per request.
|
|
857
|
+
|
|
858
|
+
Example:
|
|
859
|
+
res = client.instagram.highlight_detail(id="18201653992314974")
|
|
860
|
+
"""
|
|
861
|
+
raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
|
|
862
|
+
"instagram.highlight_detail", dict(input), options
|
|
863
|
+
)
|
|
864
|
+
return RunResult[InstagramHighlightDetailData].model_validate(raw)
|
|
865
|
+
|
|
866
|
+
def media_transcript(
|
|
867
|
+
self,
|
|
868
|
+
*,
|
|
869
|
+
options: RequestOptions | None = None,
|
|
870
|
+
**input: Unpack[InstagramMediaTranscriptInput],
|
|
871
|
+
) -> RunResult[InstagramMediaTranscriptData]:
|
|
872
|
+
"""Instagram Media Transcript
|
|
873
|
+
|
|
874
|
+
Get the spoken-audio transcript text for an Instagram post or reel by URL,
|
|
875
|
+
normalized across providers with transparent failover.
|
|
876
|
+
|
|
877
|
+
Price: $0.002 per request.
|
|
878
|
+
|
|
879
|
+
Example:
|
|
880
|
+
res = client.instagram.media_transcript(url="https://www.instagram.com/reel/DHsD6HGqJhp/")
|
|
881
|
+
"""
|
|
882
|
+
raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
|
|
883
|
+
"instagram.media_transcript", dict(input), options
|
|
884
|
+
)
|
|
885
|
+
return RunResult[InstagramMediaTranscriptData].model_validate(raw)
|
|
886
|
+
|
|
887
|
+
def post(
|
|
888
|
+
self,
|
|
889
|
+
*,
|
|
890
|
+
options: RequestOptions | None = None,
|
|
891
|
+
**input: Unpack[InstagramPostInput],
|
|
892
|
+
) -> RunResult[InstagramPostData]:
|
|
893
|
+
"""Instagram Post
|
|
894
|
+
|
|
895
|
+
Fetch a single Instagram post or reel by URL (media URLs, like count, owner,
|
|
896
|
+
type) as normalized JSON, across providers with transparent failover.
|
|
897
|
+
|
|
898
|
+
Price: $0.002 per request.
|
|
899
|
+
|
|
900
|
+
Example:
|
|
901
|
+
res = client.instagram.post(url="https://www.instagram.com/reel/DWzrfE2kaY8/")
|
|
902
|
+
"""
|
|
903
|
+
raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
|
|
904
|
+
"instagram.post", dict(input), options
|
|
905
|
+
)
|
|
906
|
+
return RunResult[InstagramPostData].model_validate(raw)
|
|
907
|
+
|
|
908
|
+
def post_comments(
|
|
909
|
+
self,
|
|
910
|
+
*,
|
|
911
|
+
options: RequestOptions | None = None,
|
|
912
|
+
**input: Unpack[InstagramPostCommentsInput],
|
|
913
|
+
) -> RunResult[InstagramPostCommentsData]:
|
|
914
|
+
"""Instagram Post Comments
|
|
915
|
+
|
|
916
|
+
List the comments on an Instagram post or reel by URL with cursor pagination
|
|
917
|
+
(text, author, likes), normalized across providers.
|
|
918
|
+
|
|
919
|
+
Price: $0.002 per request.
|
|
920
|
+
|
|
921
|
+
Example:
|
|
922
|
+
res = client.instagram.post_comments(url="https://www.instagram.com/reel/DWzrfE2kaY8/")
|
|
923
|
+
"""
|
|
924
|
+
raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
|
|
925
|
+
"instagram.post_comments", dict(input), options
|
|
926
|
+
)
|
|
927
|
+
return RunResult[InstagramPostCommentsData].model_validate(raw)
|
|
928
|
+
|
|
929
|
+
def profile(
|
|
930
|
+
self,
|
|
931
|
+
*,
|
|
932
|
+
options: RequestOptions | None = None,
|
|
933
|
+
**input: Unpack[InstagramProfileInput],
|
|
934
|
+
) -> RunResult[InstagramProfileData]:
|
|
935
|
+
"""Instagram Profile
|
|
936
|
+
|
|
937
|
+
Fetch an Instagram account's public profile (followers, posts, bio,
|
|
938
|
+
verification) by handle, normalized across providers with transparent
|
|
939
|
+
failover.
|
|
940
|
+
|
|
941
|
+
Price: $0.002 per request.
|
|
942
|
+
|
|
943
|
+
Example:
|
|
944
|
+
res = client.instagram.profile(handle="nasa")
|
|
945
|
+
"""
|
|
946
|
+
raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
|
|
947
|
+
"instagram.profile", dict(input), options
|
|
948
|
+
)
|
|
949
|
+
return RunResult[InstagramProfileData].model_validate(raw)
|
|
950
|
+
|
|
951
|
+
def reel_transcript(
|
|
952
|
+
self,
|
|
953
|
+
*,
|
|
954
|
+
options: RequestOptions | None = None,
|
|
955
|
+
**input: Unpack[InstagramReelTranscriptInput],
|
|
956
|
+
) -> RunResult[InstagramReelTranscriptData]:
|
|
957
|
+
"""Instagram Reel Transcript
|
|
958
|
+
|
|
959
|
+
Turn any public Instagram reel or video post into a full speech transcript,
|
|
960
|
+
with optional word-level timestamps - priced per request in USD.
|
|
961
|
+
|
|
962
|
+
Price: $0.005 per request plus $0.02 per result.
|
|
963
|
+
|
|
964
|
+
Example:
|
|
965
|
+
res = client.instagram.reel_transcript(url="https://www.instagram.com/reel/DWzrfE2kaY8/", wordTimestamps=False)
|
|
966
|
+
"""
|
|
967
|
+
raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
|
|
968
|
+
"instagram.reel_transcript", dict(input), options
|
|
969
|
+
)
|
|
970
|
+
return RunResult[InstagramReelTranscriptData].model_validate(raw)
|
|
971
|
+
|
|
972
|
+
def reels_search(
|
|
973
|
+
self,
|
|
974
|
+
*,
|
|
975
|
+
options: RequestOptions | None = None,
|
|
976
|
+
**input: Unpack[InstagramReelsSearchInput],
|
|
977
|
+
) -> RunResult[InstagramReelsSearchData]:
|
|
978
|
+
"""Instagram Reels Search
|
|
979
|
+
|
|
980
|
+
Search Instagram Reels by keyword and get matching reels - caption, views,
|
|
981
|
+
likes, creator, and duration - normalized across providers with transparent
|
|
982
|
+
failover.
|
|
983
|
+
|
|
984
|
+
Price: $0.002 per request.
|
|
985
|
+
|
|
986
|
+
Example:
|
|
987
|
+
res = client.instagram.reels_search(query="travel")
|
|
988
|
+
"""
|
|
989
|
+
raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
|
|
990
|
+
"instagram.reels_search", dict(input), options
|
|
991
|
+
)
|
|
992
|
+
return RunResult[InstagramReelsSearchData].model_validate(raw)
|
|
993
|
+
|
|
994
|
+
def search(
|
|
995
|
+
self,
|
|
996
|
+
*,
|
|
997
|
+
options: RequestOptions | None = None,
|
|
998
|
+
**input: Unpack[InstagramSearchInput],
|
|
999
|
+
) -> RunResult[InstagramSearchData]:
|
|
1000
|
+
"""Instagram Search
|
|
1001
|
+
|
|
1002
|
+
Search Instagram for users, hashtags, or places by keyword and get matching
|
|
1003
|
+
results with names, counts, and links - flat per-request USD pricing.
|
|
1004
|
+
|
|
1005
|
+
Price: $0.00325 per request.
|
|
1006
|
+
|
|
1007
|
+
Example:
|
|
1008
|
+
res = client.instagram.search(query="nasa")
|
|
1009
|
+
"""
|
|
1010
|
+
raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
|
|
1011
|
+
"instagram.search", dict(input), options
|
|
1012
|
+
)
|
|
1013
|
+
return RunResult[InstagramSearchData].model_validate(raw)
|
|
1014
|
+
|
|
1015
|
+
def search_hashtag(
|
|
1016
|
+
self,
|
|
1017
|
+
*,
|
|
1018
|
+
options: RequestOptions | None = None,
|
|
1019
|
+
**input: Unpack[InstagramSearchHashtagInput],
|
|
1020
|
+
) -> RunResult[InstagramSearchHashtagData]:
|
|
1021
|
+
"""Instagram Hashtag Search
|
|
1022
|
+
|
|
1023
|
+
List recent Instagram posts under a hashtag (caption, type, media URL),
|
|
1024
|
+
normalized across providers with transparent failover.
|
|
1025
|
+
|
|
1026
|
+
Price: $0.002 per request.
|
|
1027
|
+
|
|
1028
|
+
Example:
|
|
1029
|
+
res = client.instagram.search_hashtag(hashtag="travel")
|
|
1030
|
+
"""
|
|
1031
|
+
raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
|
|
1032
|
+
"instagram.search_hashtag", dict(input), options
|
|
1033
|
+
)
|
|
1034
|
+
return RunResult[InstagramSearchHashtagData].model_validate(raw)
|
|
1035
|
+
|
|
1036
|
+
def search_profiles(
|
|
1037
|
+
self,
|
|
1038
|
+
*,
|
|
1039
|
+
options: RequestOptions | None = None,
|
|
1040
|
+
**input: Unpack[InstagramSearchProfilesInput],
|
|
1041
|
+
) -> RunResult[InstagramSearchProfilesData]:
|
|
1042
|
+
"""Instagram Profile Search
|
|
1043
|
+
|
|
1044
|
+
Search public Instagram profiles by a bio or caption keyword, normalized
|
|
1045
|
+
across providers with transparent failover.
|
|
1046
|
+
|
|
1047
|
+
Price: $0.002 per request.
|
|
1048
|
+
|
|
1049
|
+
Example:
|
|
1050
|
+
res = client.instagram.search_profiles(query="coffee roaster")
|
|
1051
|
+
"""
|
|
1052
|
+
raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
|
|
1053
|
+
"instagram.search_profiles", dict(input), options
|
|
1054
|
+
)
|
|
1055
|
+
return RunResult[InstagramSearchProfilesData].model_validate(raw)
|
|
1056
|
+
|
|
1057
|
+
def iter_search_profiles(
|
|
1058
|
+
self,
|
|
1059
|
+
*,
|
|
1060
|
+
options: RequestOptions | None = None,
|
|
1061
|
+
**input: Unpack[InstagramSearchProfilesInput],
|
|
1062
|
+
) -> Paginator[InstagramSearchProfilesProfile, InstagramSearchProfilesData]:
|
|
1063
|
+
"""Iterate Instagram Profile Search results, following pagination cursors.
|
|
1064
|
+
|
|
1065
|
+
Yields validated `InstagramSearchProfilesProfile` items from the `profiles` field of
|
|
1066
|
+
each page. Use `.pages()` on the returned paginator to walk whole
|
|
1067
|
+
`RunResult` pages.
|
|
1068
|
+
"""
|
|
1069
|
+
return paginate(
|
|
1070
|
+
self._client,
|
|
1071
|
+
"instagram.search_profiles",
|
|
1072
|
+
dict(input),
|
|
1073
|
+
"profiles",
|
|
1074
|
+
item_model=InstagramSearchProfilesProfile,
|
|
1075
|
+
data_model=InstagramSearchProfilesData,
|
|
1076
|
+
bare=False,
|
|
1077
|
+
options=options,
|
|
1078
|
+
)
|
|
1079
|
+
|
|
1080
|
+
def stories_full(
|
|
1081
|
+
self,
|
|
1082
|
+
*,
|
|
1083
|
+
options: RequestOptions | None = None,
|
|
1084
|
+
**input: Unpack[InstagramStoriesFullInput],
|
|
1085
|
+
) -> RunResult[InstagramStoriesFullData]:
|
|
1086
|
+
"""Instagram Stories (full)
|
|
1087
|
+
|
|
1088
|
+
Fetch public Instagram accounts' currently live stories with the full record
|
|
1089
|
+
- media (image and video), type, dimensions, posting time, 24h expiry, and
|
|
1090
|
+
caption. Priced per username (a flat run fee is shared across the batch), so
|
|
1091
|
+
request several at once to lower the cost per account. Up to 100 usernames
|
|
1092
|
+
per request.
|
|
1093
|
+
|
|
1094
|
+
Price: $0.099 per request plus $0.003 per username.
|
|
1095
|
+
|
|
1096
|
+
Example:
|
|
1097
|
+
res = client.instagram.stories_full(usernames=["natgeo"])
|
|
1098
|
+
"""
|
|
1099
|
+
raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
|
|
1100
|
+
"instagram.stories_full", dict(input), options
|
|
1101
|
+
)
|
|
1102
|
+
return RunResult[InstagramStoriesFullData].model_validate(raw)
|
|
1103
|
+
|
|
1104
|
+
def stories_thin(
|
|
1105
|
+
self,
|
|
1106
|
+
*,
|
|
1107
|
+
options: RequestOptions | None = None,
|
|
1108
|
+
**input: Unpack[InstagramStoriesThinInput],
|
|
1109
|
+
) -> RunResult[InstagramStoriesThinData]:
|
|
1110
|
+
"""Instagram Stories (basic)
|
|
1111
|
+
|
|
1112
|
+
Fetch a public Instagram account's currently live stories - media URL,
|
|
1113
|
+
owner, and posting time - by username. Lightweight projection; for media
|
|
1114
|
+
type, dimensions, and the 24h expiry time use instagram.stories_full.
|
|
1115
|
+
|
|
1116
|
+
Price: $0.01625 per request.
|
|
1117
|
+
|
|
1118
|
+
Example:
|
|
1119
|
+
res = client.instagram.stories_thin(username="natgeo")
|
|
1120
|
+
"""
|
|
1121
|
+
raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
|
|
1122
|
+
"instagram.stories_thin", dict(input), options
|
|
1123
|
+
)
|
|
1124
|
+
return RunResult[InstagramStoriesThinData].model_validate(raw)
|
|
1125
|
+
|
|
1126
|
+
def trending_reels(
|
|
1127
|
+
self,
|
|
1128
|
+
*,
|
|
1129
|
+
options: RequestOptions | None = None,
|
|
1130
|
+
**input: Unpack[InstagramTrendingReelsInput],
|
|
1131
|
+
) -> RunResult[InstagramTrendingReelsData]:
|
|
1132
|
+
"""Instagram Trending Reels
|
|
1133
|
+
|
|
1134
|
+
List currently trending Instagram reels, normalized across providers with
|
|
1135
|
+
transparent failover.
|
|
1136
|
+
|
|
1137
|
+
Price: $0.002 per request.
|
|
1138
|
+
|
|
1139
|
+
Example:
|
|
1140
|
+
res = client.instagram.trending_reels()
|
|
1141
|
+
"""
|
|
1142
|
+
raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
|
|
1143
|
+
"instagram.trending_reels", dict(input), options
|
|
1144
|
+
)
|
|
1145
|
+
return RunResult[InstagramTrendingReelsData].model_validate(raw)
|
|
1146
|
+
|
|
1147
|
+
def user_highlights(
|
|
1148
|
+
self,
|
|
1149
|
+
*,
|
|
1150
|
+
options: RequestOptions | None = None,
|
|
1151
|
+
**input: Unpack[InstagramUserHighlightsInput],
|
|
1152
|
+
) -> RunResult[InstagramUserHighlightsData]:
|
|
1153
|
+
"""Instagram User Highlights
|
|
1154
|
+
|
|
1155
|
+
List an Instagram account's story highlight reels by handle, normalized
|
|
1156
|
+
across providers with transparent failover.
|
|
1157
|
+
|
|
1158
|
+
Price: $0.002 per request.
|
|
1159
|
+
|
|
1160
|
+
Example:
|
|
1161
|
+
res = client.instagram.user_highlights(handle="nasa")
|
|
1162
|
+
"""
|
|
1163
|
+
raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
|
|
1164
|
+
"instagram.user_highlights", dict(input), options
|
|
1165
|
+
)
|
|
1166
|
+
return RunResult[InstagramUserHighlightsData].model_validate(raw)
|
|
1167
|
+
|
|
1168
|
+
def user_posts(
|
|
1169
|
+
self,
|
|
1170
|
+
*,
|
|
1171
|
+
options: RequestOptions | None = None,
|
|
1172
|
+
**input: Unpack[InstagramUserPostsInput],
|
|
1173
|
+
) -> RunResult[InstagramUserPostsData]:
|
|
1174
|
+
"""Instagram User Posts
|
|
1175
|
+
|
|
1176
|
+
List an Instagram account's recent posts (likes, comments, captions) by
|
|
1177
|
+
handle with cursor pagination, normalized across providers.
|
|
1178
|
+
|
|
1179
|
+
Price: $0.002 per request.
|
|
1180
|
+
|
|
1181
|
+
Example:
|
|
1182
|
+
res = client.instagram.user_posts(handle="nasa")
|
|
1183
|
+
"""
|
|
1184
|
+
raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
|
|
1185
|
+
"instagram.user_posts", dict(input), options
|
|
1186
|
+
)
|
|
1187
|
+
return RunResult[InstagramUserPostsData].model_validate(raw)
|
|
1188
|
+
|
|
1189
|
+
def iter_user_posts(
|
|
1190
|
+
self,
|
|
1191
|
+
*,
|
|
1192
|
+
options: RequestOptions | None = None,
|
|
1193
|
+
**input: Unpack[InstagramUserPostsInput],
|
|
1194
|
+
) -> Paginator[InstagramUserPostsPost, InstagramUserPostsData]:
|
|
1195
|
+
"""Iterate Instagram User Posts results, following pagination cursors.
|
|
1196
|
+
|
|
1197
|
+
Yields validated `InstagramUserPostsPost` items from the `posts` field of
|
|
1198
|
+
each page. Use `.pages()` on the returned paginator to walk whole
|
|
1199
|
+
`RunResult` pages.
|
|
1200
|
+
"""
|
|
1201
|
+
return paginate(
|
|
1202
|
+
self._client,
|
|
1203
|
+
"instagram.user_posts",
|
|
1204
|
+
dict(input),
|
|
1205
|
+
"posts",
|
|
1206
|
+
item_model=InstagramUserPostsPost,
|
|
1207
|
+
data_model=InstagramUserPostsData,
|
|
1208
|
+
bare=False,
|
|
1209
|
+
options=options,
|
|
1210
|
+
)
|
|
1211
|
+
|
|
1212
|
+
def user_reels(
|
|
1213
|
+
self,
|
|
1214
|
+
*,
|
|
1215
|
+
options: RequestOptions | None = None,
|
|
1216
|
+
**input: Unpack[InstagramUserReelsInput],
|
|
1217
|
+
) -> RunResult[InstagramUserReelsData]:
|
|
1218
|
+
"""Instagram User Reels
|
|
1219
|
+
|
|
1220
|
+
List an Instagram account's reels by handle with cursor pagination (caption,
|
|
1221
|
+
plays, likes, comments), normalized across providers.
|
|
1222
|
+
|
|
1223
|
+
Price: $0.002 per request.
|
|
1224
|
+
|
|
1225
|
+
Example:
|
|
1226
|
+
res = client.instagram.user_reels(handle="nasa")
|
|
1227
|
+
"""
|
|
1228
|
+
raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
|
|
1229
|
+
"instagram.user_reels", dict(input), options
|
|
1230
|
+
)
|
|
1231
|
+
return RunResult[InstagramUserReelsData].model_validate(raw)
|
|
1232
|
+
|
|
1233
|
+
def iter_user_reels(
|
|
1234
|
+
self,
|
|
1235
|
+
*,
|
|
1236
|
+
options: RequestOptions | None = None,
|
|
1237
|
+
**input: Unpack[InstagramUserReelsInput],
|
|
1238
|
+
) -> Paginator[InstagramUserReelsReel, InstagramUserReelsData]:
|
|
1239
|
+
"""Iterate Instagram User Reels results, following pagination cursors.
|
|
1240
|
+
|
|
1241
|
+
Yields validated `InstagramUserReelsReel` items from the `reels` field of
|
|
1242
|
+
each page. Use `.pages()` on the returned paginator to walk whole
|
|
1243
|
+
`RunResult` pages.
|
|
1244
|
+
"""
|
|
1245
|
+
return paginate(
|
|
1246
|
+
self._client,
|
|
1247
|
+
"instagram.user_reels",
|
|
1248
|
+
dict(input),
|
|
1249
|
+
"reels",
|
|
1250
|
+
item_model=InstagramUserReelsReel,
|
|
1251
|
+
data_model=InstagramUserReelsData,
|
|
1252
|
+
bare=False,
|
|
1253
|
+
options=options,
|
|
1254
|
+
)
|
|
1255
|
+
|
|
1256
|
+
|
|
1257
|
+
class AsyncInstagramNamespace:
|
|
1258
|
+
"""Typed methods for this platform. Attached lazily to the client."""
|
|
1259
|
+
|
|
1260
|
+
def __init__(self, client: "AsyncAnyAPI") -> None:
|
|
1261
|
+
self._client = client
|
|
1262
|
+
|
|
1263
|
+
async def audio_reels(
|
|
1264
|
+
self,
|
|
1265
|
+
*,
|
|
1266
|
+
options: RequestOptions | None = None,
|
|
1267
|
+
**input: Unpack[InstagramAudioReelsInput],
|
|
1268
|
+
) -> RunResult[InstagramAudioReelsData]:
|
|
1269
|
+
"""Instagram Reels by Audio
|
|
1270
|
+
|
|
1271
|
+
List Instagram reels that use a given audio track by audio id, normalized
|
|
1272
|
+
across providers with transparent failover.
|
|
1273
|
+
|
|
1274
|
+
Price: $0.002 per request.
|
|
1275
|
+
|
|
1276
|
+
Example:
|
|
1277
|
+
res = client.instagram.audio_reels(audioId="1392969992841787")
|
|
1278
|
+
"""
|
|
1279
|
+
raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
|
|
1280
|
+
"instagram.audio_reels", dict(input), options
|
|
1281
|
+
)
|
|
1282
|
+
return RunResult[InstagramAudioReelsData].model_validate(raw)
|
|
1283
|
+
|
|
1284
|
+
def iter_audio_reels(
|
|
1285
|
+
self,
|
|
1286
|
+
*,
|
|
1287
|
+
options: RequestOptions | None = None,
|
|
1288
|
+
**input: Unpack[InstagramAudioReelsInput],
|
|
1289
|
+
) -> AsyncPaginator[InstagramAudioReelsReel, InstagramAudioReelsData]:
|
|
1290
|
+
"""Iterate Instagram Reels by Audio results, following pagination cursors.
|
|
1291
|
+
|
|
1292
|
+
Yields validated `InstagramAudioReelsReel` items from the `reels` field of
|
|
1293
|
+
each page. Use `.pages()` on the returned paginator to walk whole
|
|
1294
|
+
`RunResult` pages.
|
|
1295
|
+
"""
|
|
1296
|
+
return apaginate(
|
|
1297
|
+
self._client,
|
|
1298
|
+
"instagram.audio_reels",
|
|
1299
|
+
dict(input),
|
|
1300
|
+
"reels",
|
|
1301
|
+
item_model=InstagramAudioReelsReel,
|
|
1302
|
+
data_model=InstagramAudioReelsData,
|
|
1303
|
+
bare=False,
|
|
1304
|
+
options=options,
|
|
1305
|
+
)
|
|
1306
|
+
|
|
1307
|
+
async def basic_profile(
|
|
1308
|
+
self,
|
|
1309
|
+
*,
|
|
1310
|
+
options: RequestOptions | None = None,
|
|
1311
|
+
**input: Unpack[InstagramBasicProfileInput],
|
|
1312
|
+
) -> RunResult[InstagramBasicProfileData]:
|
|
1313
|
+
"""Instagram Basic Profile
|
|
1314
|
+
|
|
1315
|
+
Fetch an Instagram account's core public profile fields (followers, posts,
|
|
1316
|
+
bio, verification) by user id, normalized across providers with transparent
|
|
1317
|
+
failover.
|
|
1318
|
+
|
|
1319
|
+
Price: $0.002 per request.
|
|
1320
|
+
|
|
1321
|
+
Example:
|
|
1322
|
+
res = client.instagram.basic_profile(userId="314216")
|
|
1323
|
+
"""
|
|
1324
|
+
raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
|
|
1325
|
+
"instagram.basic_profile", dict(input), options
|
|
1326
|
+
)
|
|
1327
|
+
return RunResult[InstagramBasicProfileData].model_validate(raw)
|
|
1328
|
+
|
|
1329
|
+
async def embed(
|
|
1330
|
+
self,
|
|
1331
|
+
*,
|
|
1332
|
+
options: RequestOptions | None = None,
|
|
1333
|
+
**input: Unpack[InstagramEmbedInput],
|
|
1334
|
+
) -> RunResult[InstagramEmbedData]:
|
|
1335
|
+
"""Instagram Profile Embed
|
|
1336
|
+
|
|
1337
|
+
Fetch the public embed HTML for an Instagram profile by handle, normalized
|
|
1338
|
+
across providers with transparent failover.
|
|
1339
|
+
|
|
1340
|
+
Price: $0.002 per request.
|
|
1341
|
+
|
|
1342
|
+
Example:
|
|
1343
|
+
res = client.instagram.embed(handle="nasa")
|
|
1344
|
+
"""
|
|
1345
|
+
raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
|
|
1346
|
+
"instagram.embed", dict(input), options
|
|
1347
|
+
)
|
|
1348
|
+
return RunResult[InstagramEmbedData].model_validate(raw)
|
|
1349
|
+
|
|
1350
|
+
async def followers(
|
|
1351
|
+
self,
|
|
1352
|
+
*,
|
|
1353
|
+
options: RequestOptions | None = None,
|
|
1354
|
+
**input: Unpack[InstagramFollowersInput],
|
|
1355
|
+
) -> RunResult[InstagramFollowersData]:
|
|
1356
|
+
"""Instagram Followers
|
|
1357
|
+
|
|
1358
|
+
List the followers of any public Instagram account by username - follower
|
|
1359
|
+
usernames, names, and profile details - at a flat per-request USD price.
|
|
1360
|
+
|
|
1361
|
+
Price: $0.01625 per request.
|
|
1362
|
+
|
|
1363
|
+
Example:
|
|
1364
|
+
res = client.instagram.followers(limit=50, username="nasa")
|
|
1365
|
+
"""
|
|
1366
|
+
raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
|
|
1367
|
+
"instagram.followers", dict(input), options
|
|
1368
|
+
)
|
|
1369
|
+
return RunResult[InstagramFollowersData].model_validate(raw)
|
|
1370
|
+
|
|
1371
|
+
def iter_followers(
|
|
1372
|
+
self,
|
|
1373
|
+
*,
|
|
1374
|
+
options: RequestOptions | None = None,
|
|
1375
|
+
**input: Unpack[InstagramFollowersInput],
|
|
1376
|
+
) -> AsyncPaginator[InstagramFollowersItem, InstagramFollowersData]:
|
|
1377
|
+
"""Iterate Instagram Followers results, following pagination cursors.
|
|
1378
|
+
|
|
1379
|
+
Yields validated `InstagramFollowersItem` items from the `items` field of
|
|
1380
|
+
each page. Use `.pages()` on the returned paginator to walk whole
|
|
1381
|
+
`RunResult` pages.
|
|
1382
|
+
"""
|
|
1383
|
+
return apaginate(
|
|
1384
|
+
self._client,
|
|
1385
|
+
"instagram.followers",
|
|
1386
|
+
dict(input),
|
|
1387
|
+
"items",
|
|
1388
|
+
item_model=InstagramFollowersItem,
|
|
1389
|
+
data_model=InstagramFollowersData,
|
|
1390
|
+
bare=False,
|
|
1391
|
+
options=options,
|
|
1392
|
+
)
|
|
1393
|
+
|
|
1394
|
+
async def following(
|
|
1395
|
+
self,
|
|
1396
|
+
*,
|
|
1397
|
+
options: RequestOptions | None = None,
|
|
1398
|
+
**input: Unpack[InstagramFollowingInput],
|
|
1399
|
+
) -> RunResult[InstagramFollowingData]:
|
|
1400
|
+
"""Instagram Following
|
|
1401
|
+
|
|
1402
|
+
List the accounts a public Instagram user follows - usernames, names, and
|
|
1403
|
+
profile details - at a flat per-request USD price.
|
|
1404
|
+
|
|
1405
|
+
Price: $0.01625 per request.
|
|
1406
|
+
|
|
1407
|
+
Example:
|
|
1408
|
+
res = client.instagram.following(limit=50, username="nasa")
|
|
1409
|
+
"""
|
|
1410
|
+
raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
|
|
1411
|
+
"instagram.following", dict(input), options
|
|
1412
|
+
)
|
|
1413
|
+
return RunResult[InstagramFollowingData].model_validate(raw)
|
|
1414
|
+
|
|
1415
|
+
def iter_following(
|
|
1416
|
+
self,
|
|
1417
|
+
*,
|
|
1418
|
+
options: RequestOptions | None = None,
|
|
1419
|
+
**input: Unpack[InstagramFollowingInput],
|
|
1420
|
+
) -> AsyncPaginator[InstagramFollowingItem, InstagramFollowingData]:
|
|
1421
|
+
"""Iterate Instagram Following results, following pagination cursors.
|
|
1422
|
+
|
|
1423
|
+
Yields validated `InstagramFollowingItem` items from the `items` field of
|
|
1424
|
+
each page. Use `.pages()` on the returned paginator to walk whole
|
|
1425
|
+
`RunResult` pages.
|
|
1426
|
+
"""
|
|
1427
|
+
return apaginate(
|
|
1428
|
+
self._client,
|
|
1429
|
+
"instagram.following",
|
|
1430
|
+
dict(input),
|
|
1431
|
+
"items",
|
|
1432
|
+
item_model=InstagramFollowingItem,
|
|
1433
|
+
data_model=InstagramFollowingData,
|
|
1434
|
+
bare=False,
|
|
1435
|
+
options=options,
|
|
1436
|
+
)
|
|
1437
|
+
|
|
1438
|
+
async def hashtag_analytics(
|
|
1439
|
+
self,
|
|
1440
|
+
*,
|
|
1441
|
+
options: RequestOptions | None = None,
|
|
1442
|
+
**input: Unpack[InstagramHashtagAnalyticsInput],
|
|
1443
|
+
) -> RunResult[InstagramHashtagAnalyticsData]:
|
|
1444
|
+
"""Instagram Hashtag Analytics
|
|
1445
|
+
|
|
1446
|
+
Get analytics for any Instagram hashtag - total post count, related
|
|
1447
|
+
hashtags, and usage signals - normalized and priced per request in USD.
|
|
1448
|
+
|
|
1449
|
+
Price: $0.001 per request plus $0.0017 per result.
|
|
1450
|
+
|
|
1451
|
+
Example:
|
|
1452
|
+
res = client.instagram.hashtag_analytics(hashtag="travel", limit=5)
|
|
1453
|
+
"""
|
|
1454
|
+
raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
|
|
1455
|
+
"instagram.hashtag_analytics", dict(input), options
|
|
1456
|
+
)
|
|
1457
|
+
return RunResult[InstagramHashtagAnalyticsData].model_validate(raw)
|
|
1458
|
+
|
|
1459
|
+
async def highlight_detail(
|
|
1460
|
+
self,
|
|
1461
|
+
*,
|
|
1462
|
+
options: RequestOptions | None = None,
|
|
1463
|
+
**input: Unpack[InstagramHighlightDetailInput],
|
|
1464
|
+
) -> RunResult[InstagramHighlightDetailData]:
|
|
1465
|
+
"""Instagram Highlight Detail
|
|
1466
|
+
|
|
1467
|
+
Fetch the details and media items of a single Instagram story highlight by
|
|
1468
|
+
id, normalized across providers with transparent failover.
|
|
1469
|
+
|
|
1470
|
+
Price: $0.002 per request.
|
|
1471
|
+
|
|
1472
|
+
Example:
|
|
1473
|
+
res = client.instagram.highlight_detail(id="18201653992314974")
|
|
1474
|
+
"""
|
|
1475
|
+
raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
|
|
1476
|
+
"instagram.highlight_detail", dict(input), options
|
|
1477
|
+
)
|
|
1478
|
+
return RunResult[InstagramHighlightDetailData].model_validate(raw)
|
|
1479
|
+
|
|
1480
|
+
async def media_transcript(
|
|
1481
|
+
self,
|
|
1482
|
+
*,
|
|
1483
|
+
options: RequestOptions | None = None,
|
|
1484
|
+
**input: Unpack[InstagramMediaTranscriptInput],
|
|
1485
|
+
) -> RunResult[InstagramMediaTranscriptData]:
|
|
1486
|
+
"""Instagram Media Transcript
|
|
1487
|
+
|
|
1488
|
+
Get the spoken-audio transcript text for an Instagram post or reel by URL,
|
|
1489
|
+
normalized across providers with transparent failover.
|
|
1490
|
+
|
|
1491
|
+
Price: $0.002 per request.
|
|
1492
|
+
|
|
1493
|
+
Example:
|
|
1494
|
+
res = client.instagram.media_transcript(url="https://www.instagram.com/reel/DHsD6HGqJhp/")
|
|
1495
|
+
"""
|
|
1496
|
+
raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
|
|
1497
|
+
"instagram.media_transcript", dict(input), options
|
|
1498
|
+
)
|
|
1499
|
+
return RunResult[InstagramMediaTranscriptData].model_validate(raw)
|
|
1500
|
+
|
|
1501
|
+
async def post(
|
|
1502
|
+
self,
|
|
1503
|
+
*,
|
|
1504
|
+
options: RequestOptions | None = None,
|
|
1505
|
+
**input: Unpack[InstagramPostInput],
|
|
1506
|
+
) -> RunResult[InstagramPostData]:
|
|
1507
|
+
"""Instagram Post
|
|
1508
|
+
|
|
1509
|
+
Fetch a single Instagram post or reel by URL (media URLs, like count, owner,
|
|
1510
|
+
type) as normalized JSON, across providers with transparent failover.
|
|
1511
|
+
|
|
1512
|
+
Price: $0.002 per request.
|
|
1513
|
+
|
|
1514
|
+
Example:
|
|
1515
|
+
res = client.instagram.post(url="https://www.instagram.com/reel/DWzrfE2kaY8/")
|
|
1516
|
+
"""
|
|
1517
|
+
raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
|
|
1518
|
+
"instagram.post", dict(input), options
|
|
1519
|
+
)
|
|
1520
|
+
return RunResult[InstagramPostData].model_validate(raw)
|
|
1521
|
+
|
|
1522
|
+
async def post_comments(
|
|
1523
|
+
self,
|
|
1524
|
+
*,
|
|
1525
|
+
options: RequestOptions | None = None,
|
|
1526
|
+
**input: Unpack[InstagramPostCommentsInput],
|
|
1527
|
+
) -> RunResult[InstagramPostCommentsData]:
|
|
1528
|
+
"""Instagram Post Comments
|
|
1529
|
+
|
|
1530
|
+
List the comments on an Instagram post or reel by URL with cursor pagination
|
|
1531
|
+
(text, author, likes), normalized across providers.
|
|
1532
|
+
|
|
1533
|
+
Price: $0.002 per request.
|
|
1534
|
+
|
|
1535
|
+
Example:
|
|
1536
|
+
res = client.instagram.post_comments(url="https://www.instagram.com/reel/DWzrfE2kaY8/")
|
|
1537
|
+
"""
|
|
1538
|
+
raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
|
|
1539
|
+
"instagram.post_comments", dict(input), options
|
|
1540
|
+
)
|
|
1541
|
+
return RunResult[InstagramPostCommentsData].model_validate(raw)
|
|
1542
|
+
|
|
1543
|
+
async def profile(
|
|
1544
|
+
self,
|
|
1545
|
+
*,
|
|
1546
|
+
options: RequestOptions | None = None,
|
|
1547
|
+
**input: Unpack[InstagramProfileInput],
|
|
1548
|
+
) -> RunResult[InstagramProfileData]:
|
|
1549
|
+
"""Instagram Profile
|
|
1550
|
+
|
|
1551
|
+
Fetch an Instagram account's public profile (followers, posts, bio,
|
|
1552
|
+
verification) by handle, normalized across providers with transparent
|
|
1553
|
+
failover.
|
|
1554
|
+
|
|
1555
|
+
Price: $0.002 per request.
|
|
1556
|
+
|
|
1557
|
+
Example:
|
|
1558
|
+
res = client.instagram.profile(handle="nasa")
|
|
1559
|
+
"""
|
|
1560
|
+
raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
|
|
1561
|
+
"instagram.profile", dict(input), options
|
|
1562
|
+
)
|
|
1563
|
+
return RunResult[InstagramProfileData].model_validate(raw)
|
|
1564
|
+
|
|
1565
|
+
async def reel_transcript(
|
|
1566
|
+
self,
|
|
1567
|
+
*,
|
|
1568
|
+
options: RequestOptions | None = None,
|
|
1569
|
+
**input: Unpack[InstagramReelTranscriptInput],
|
|
1570
|
+
) -> RunResult[InstagramReelTranscriptData]:
|
|
1571
|
+
"""Instagram Reel Transcript
|
|
1572
|
+
|
|
1573
|
+
Turn any public Instagram reel or video post into a full speech transcript,
|
|
1574
|
+
with optional word-level timestamps - priced per request in USD.
|
|
1575
|
+
|
|
1576
|
+
Price: $0.005 per request plus $0.02 per result.
|
|
1577
|
+
|
|
1578
|
+
Example:
|
|
1579
|
+
res = client.instagram.reel_transcript(url="https://www.instagram.com/reel/DWzrfE2kaY8/", wordTimestamps=False)
|
|
1580
|
+
"""
|
|
1581
|
+
raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
|
|
1582
|
+
"instagram.reel_transcript", dict(input), options
|
|
1583
|
+
)
|
|
1584
|
+
return RunResult[InstagramReelTranscriptData].model_validate(raw)
|
|
1585
|
+
|
|
1586
|
+
async def reels_search(
|
|
1587
|
+
self,
|
|
1588
|
+
*,
|
|
1589
|
+
options: RequestOptions | None = None,
|
|
1590
|
+
**input: Unpack[InstagramReelsSearchInput],
|
|
1591
|
+
) -> RunResult[InstagramReelsSearchData]:
|
|
1592
|
+
"""Instagram Reels Search
|
|
1593
|
+
|
|
1594
|
+
Search Instagram Reels by keyword and get matching reels - caption, views,
|
|
1595
|
+
likes, creator, and duration - normalized across providers with transparent
|
|
1596
|
+
failover.
|
|
1597
|
+
|
|
1598
|
+
Price: $0.002 per request.
|
|
1599
|
+
|
|
1600
|
+
Example:
|
|
1601
|
+
res = client.instagram.reels_search(query="travel")
|
|
1602
|
+
"""
|
|
1603
|
+
raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
|
|
1604
|
+
"instagram.reels_search", dict(input), options
|
|
1605
|
+
)
|
|
1606
|
+
return RunResult[InstagramReelsSearchData].model_validate(raw)
|
|
1607
|
+
|
|
1608
|
+
async def search(
|
|
1609
|
+
self,
|
|
1610
|
+
*,
|
|
1611
|
+
options: RequestOptions | None = None,
|
|
1612
|
+
**input: Unpack[InstagramSearchInput],
|
|
1613
|
+
) -> RunResult[InstagramSearchData]:
|
|
1614
|
+
"""Instagram Search
|
|
1615
|
+
|
|
1616
|
+
Search Instagram for users, hashtags, or places by keyword and get matching
|
|
1617
|
+
results with names, counts, and links - flat per-request USD pricing.
|
|
1618
|
+
|
|
1619
|
+
Price: $0.00325 per request.
|
|
1620
|
+
|
|
1621
|
+
Example:
|
|
1622
|
+
res = client.instagram.search(query="nasa")
|
|
1623
|
+
"""
|
|
1624
|
+
raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
|
|
1625
|
+
"instagram.search", dict(input), options
|
|
1626
|
+
)
|
|
1627
|
+
return RunResult[InstagramSearchData].model_validate(raw)
|
|
1628
|
+
|
|
1629
|
+
async def search_hashtag(
|
|
1630
|
+
self,
|
|
1631
|
+
*,
|
|
1632
|
+
options: RequestOptions | None = None,
|
|
1633
|
+
**input: Unpack[InstagramSearchHashtagInput],
|
|
1634
|
+
) -> RunResult[InstagramSearchHashtagData]:
|
|
1635
|
+
"""Instagram Hashtag Search
|
|
1636
|
+
|
|
1637
|
+
List recent Instagram posts under a hashtag (caption, type, media URL),
|
|
1638
|
+
normalized across providers with transparent failover.
|
|
1639
|
+
|
|
1640
|
+
Price: $0.002 per request.
|
|
1641
|
+
|
|
1642
|
+
Example:
|
|
1643
|
+
res = client.instagram.search_hashtag(hashtag="travel")
|
|
1644
|
+
"""
|
|
1645
|
+
raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
|
|
1646
|
+
"instagram.search_hashtag", dict(input), options
|
|
1647
|
+
)
|
|
1648
|
+
return RunResult[InstagramSearchHashtagData].model_validate(raw)
|
|
1649
|
+
|
|
1650
|
+
async def search_profiles(
|
|
1651
|
+
self,
|
|
1652
|
+
*,
|
|
1653
|
+
options: RequestOptions | None = None,
|
|
1654
|
+
**input: Unpack[InstagramSearchProfilesInput],
|
|
1655
|
+
) -> RunResult[InstagramSearchProfilesData]:
|
|
1656
|
+
"""Instagram Profile Search
|
|
1657
|
+
|
|
1658
|
+
Search public Instagram profiles by a bio or caption keyword, normalized
|
|
1659
|
+
across providers with transparent failover.
|
|
1660
|
+
|
|
1661
|
+
Price: $0.002 per request.
|
|
1662
|
+
|
|
1663
|
+
Example:
|
|
1664
|
+
res = client.instagram.search_profiles(query="coffee roaster")
|
|
1665
|
+
"""
|
|
1666
|
+
raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
|
|
1667
|
+
"instagram.search_profiles", dict(input), options
|
|
1668
|
+
)
|
|
1669
|
+
return RunResult[InstagramSearchProfilesData].model_validate(raw)
|
|
1670
|
+
|
|
1671
|
+
def iter_search_profiles(
|
|
1672
|
+
self,
|
|
1673
|
+
*,
|
|
1674
|
+
options: RequestOptions | None = None,
|
|
1675
|
+
**input: Unpack[InstagramSearchProfilesInput],
|
|
1676
|
+
) -> AsyncPaginator[InstagramSearchProfilesProfile, InstagramSearchProfilesData]:
|
|
1677
|
+
"""Iterate Instagram Profile Search results, following pagination cursors.
|
|
1678
|
+
|
|
1679
|
+
Yields validated `InstagramSearchProfilesProfile` items from the `profiles` field of
|
|
1680
|
+
each page. Use `.pages()` on the returned paginator to walk whole
|
|
1681
|
+
`RunResult` pages.
|
|
1682
|
+
"""
|
|
1683
|
+
return apaginate(
|
|
1684
|
+
self._client,
|
|
1685
|
+
"instagram.search_profiles",
|
|
1686
|
+
dict(input),
|
|
1687
|
+
"profiles",
|
|
1688
|
+
item_model=InstagramSearchProfilesProfile,
|
|
1689
|
+
data_model=InstagramSearchProfilesData,
|
|
1690
|
+
bare=False,
|
|
1691
|
+
options=options,
|
|
1692
|
+
)
|
|
1693
|
+
|
|
1694
|
+
async def stories_full(
|
|
1695
|
+
self,
|
|
1696
|
+
*,
|
|
1697
|
+
options: RequestOptions | None = None,
|
|
1698
|
+
**input: Unpack[InstagramStoriesFullInput],
|
|
1699
|
+
) -> RunResult[InstagramStoriesFullData]:
|
|
1700
|
+
"""Instagram Stories (full)
|
|
1701
|
+
|
|
1702
|
+
Fetch public Instagram accounts' currently live stories with the full record
|
|
1703
|
+
- media (image and video), type, dimensions, posting time, 24h expiry, and
|
|
1704
|
+
caption. Priced per username (a flat run fee is shared across the batch), so
|
|
1705
|
+
request several at once to lower the cost per account. Up to 100 usernames
|
|
1706
|
+
per request.
|
|
1707
|
+
|
|
1708
|
+
Price: $0.099 per request plus $0.003 per username.
|
|
1709
|
+
|
|
1710
|
+
Example:
|
|
1711
|
+
res = client.instagram.stories_full(usernames=["natgeo"])
|
|
1712
|
+
"""
|
|
1713
|
+
raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
|
|
1714
|
+
"instagram.stories_full", dict(input), options
|
|
1715
|
+
)
|
|
1716
|
+
return RunResult[InstagramStoriesFullData].model_validate(raw)
|
|
1717
|
+
|
|
1718
|
+
async def stories_thin(
|
|
1719
|
+
self,
|
|
1720
|
+
*,
|
|
1721
|
+
options: RequestOptions | None = None,
|
|
1722
|
+
**input: Unpack[InstagramStoriesThinInput],
|
|
1723
|
+
) -> RunResult[InstagramStoriesThinData]:
|
|
1724
|
+
"""Instagram Stories (basic)
|
|
1725
|
+
|
|
1726
|
+
Fetch a public Instagram account's currently live stories - media URL,
|
|
1727
|
+
owner, and posting time - by username. Lightweight projection; for media
|
|
1728
|
+
type, dimensions, and the 24h expiry time use instagram.stories_full.
|
|
1729
|
+
|
|
1730
|
+
Price: $0.01625 per request.
|
|
1731
|
+
|
|
1732
|
+
Example:
|
|
1733
|
+
res = client.instagram.stories_thin(username="natgeo")
|
|
1734
|
+
"""
|
|
1735
|
+
raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
|
|
1736
|
+
"instagram.stories_thin", dict(input), options
|
|
1737
|
+
)
|
|
1738
|
+
return RunResult[InstagramStoriesThinData].model_validate(raw)
|
|
1739
|
+
|
|
1740
|
+
async def trending_reels(
|
|
1741
|
+
self,
|
|
1742
|
+
*,
|
|
1743
|
+
options: RequestOptions | None = None,
|
|
1744
|
+
**input: Unpack[InstagramTrendingReelsInput],
|
|
1745
|
+
) -> RunResult[InstagramTrendingReelsData]:
|
|
1746
|
+
"""Instagram Trending Reels
|
|
1747
|
+
|
|
1748
|
+
List currently trending Instagram reels, normalized across providers with
|
|
1749
|
+
transparent failover.
|
|
1750
|
+
|
|
1751
|
+
Price: $0.002 per request.
|
|
1752
|
+
|
|
1753
|
+
Example:
|
|
1754
|
+
res = client.instagram.trending_reels()
|
|
1755
|
+
"""
|
|
1756
|
+
raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
|
|
1757
|
+
"instagram.trending_reels", dict(input), options
|
|
1758
|
+
)
|
|
1759
|
+
return RunResult[InstagramTrendingReelsData].model_validate(raw)
|
|
1760
|
+
|
|
1761
|
+
async def user_highlights(
|
|
1762
|
+
self,
|
|
1763
|
+
*,
|
|
1764
|
+
options: RequestOptions | None = None,
|
|
1765
|
+
**input: Unpack[InstagramUserHighlightsInput],
|
|
1766
|
+
) -> RunResult[InstagramUserHighlightsData]:
|
|
1767
|
+
"""Instagram User Highlights
|
|
1768
|
+
|
|
1769
|
+
List an Instagram account's story highlight reels by handle, normalized
|
|
1770
|
+
across providers with transparent failover.
|
|
1771
|
+
|
|
1772
|
+
Price: $0.002 per request.
|
|
1773
|
+
|
|
1774
|
+
Example:
|
|
1775
|
+
res = client.instagram.user_highlights(handle="nasa")
|
|
1776
|
+
"""
|
|
1777
|
+
raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
|
|
1778
|
+
"instagram.user_highlights", dict(input), options
|
|
1779
|
+
)
|
|
1780
|
+
return RunResult[InstagramUserHighlightsData].model_validate(raw)
|
|
1781
|
+
|
|
1782
|
+
async def user_posts(
|
|
1783
|
+
self,
|
|
1784
|
+
*,
|
|
1785
|
+
options: RequestOptions | None = None,
|
|
1786
|
+
**input: Unpack[InstagramUserPostsInput],
|
|
1787
|
+
) -> RunResult[InstagramUserPostsData]:
|
|
1788
|
+
"""Instagram User Posts
|
|
1789
|
+
|
|
1790
|
+
List an Instagram account's recent posts (likes, comments, captions) by
|
|
1791
|
+
handle with cursor pagination, normalized across providers.
|
|
1792
|
+
|
|
1793
|
+
Price: $0.002 per request.
|
|
1794
|
+
|
|
1795
|
+
Example:
|
|
1796
|
+
res = client.instagram.user_posts(handle="nasa")
|
|
1797
|
+
"""
|
|
1798
|
+
raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
|
|
1799
|
+
"instagram.user_posts", dict(input), options
|
|
1800
|
+
)
|
|
1801
|
+
return RunResult[InstagramUserPostsData].model_validate(raw)
|
|
1802
|
+
|
|
1803
|
+
def iter_user_posts(
|
|
1804
|
+
self,
|
|
1805
|
+
*,
|
|
1806
|
+
options: RequestOptions | None = None,
|
|
1807
|
+
**input: Unpack[InstagramUserPostsInput],
|
|
1808
|
+
) -> AsyncPaginator[InstagramUserPostsPost, InstagramUserPostsData]:
|
|
1809
|
+
"""Iterate Instagram User Posts results, following pagination cursors.
|
|
1810
|
+
|
|
1811
|
+
Yields validated `InstagramUserPostsPost` items from the `posts` field of
|
|
1812
|
+
each page. Use `.pages()` on the returned paginator to walk whole
|
|
1813
|
+
`RunResult` pages.
|
|
1814
|
+
"""
|
|
1815
|
+
return apaginate(
|
|
1816
|
+
self._client,
|
|
1817
|
+
"instagram.user_posts",
|
|
1818
|
+
dict(input),
|
|
1819
|
+
"posts",
|
|
1820
|
+
item_model=InstagramUserPostsPost,
|
|
1821
|
+
data_model=InstagramUserPostsData,
|
|
1822
|
+
bare=False,
|
|
1823
|
+
options=options,
|
|
1824
|
+
)
|
|
1825
|
+
|
|
1826
|
+
async def user_reels(
|
|
1827
|
+
self,
|
|
1828
|
+
*,
|
|
1829
|
+
options: RequestOptions | None = None,
|
|
1830
|
+
**input: Unpack[InstagramUserReelsInput],
|
|
1831
|
+
) -> RunResult[InstagramUserReelsData]:
|
|
1832
|
+
"""Instagram User Reels
|
|
1833
|
+
|
|
1834
|
+
List an Instagram account's reels by handle with cursor pagination (caption,
|
|
1835
|
+
plays, likes, comments), normalized across providers.
|
|
1836
|
+
|
|
1837
|
+
Price: $0.002 per request.
|
|
1838
|
+
|
|
1839
|
+
Example:
|
|
1840
|
+
res = client.instagram.user_reels(handle="nasa")
|
|
1841
|
+
"""
|
|
1842
|
+
raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
|
|
1843
|
+
"instagram.user_reels", dict(input), options
|
|
1844
|
+
)
|
|
1845
|
+
return RunResult[InstagramUserReelsData].model_validate(raw)
|
|
1846
|
+
|
|
1847
|
+
def iter_user_reels(
|
|
1848
|
+
self,
|
|
1849
|
+
*,
|
|
1850
|
+
options: RequestOptions | None = None,
|
|
1851
|
+
**input: Unpack[InstagramUserReelsInput],
|
|
1852
|
+
) -> AsyncPaginator[InstagramUserReelsReel, InstagramUserReelsData]:
|
|
1853
|
+
"""Iterate Instagram User Reels results, following pagination cursors.
|
|
1854
|
+
|
|
1855
|
+
Yields validated `InstagramUserReelsReel` items from the `reels` field of
|
|
1856
|
+
each page. Use `.pages()` on the returned paginator to walk whole
|
|
1857
|
+
`RunResult` pages.
|
|
1858
|
+
"""
|
|
1859
|
+
return apaginate(
|
|
1860
|
+
self._client,
|
|
1861
|
+
"instagram.user_reels",
|
|
1862
|
+
dict(input),
|
|
1863
|
+
"reels",
|
|
1864
|
+
item_model=InstagramUserReelsReel,
|
|
1865
|
+
data_model=InstagramUserReelsData,
|
|
1866
|
+
bare=False,
|
|
1867
|
+
options=options,
|
|
1868
|
+
)
|