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.
Files changed (68) hide show
  1. getanyapi/__init__.py +76 -0
  2. getanyapi/_account.py +132 -0
  3. getanyapi/_async_client.py +215 -0
  4. getanyapi/_client.py +274 -0
  5. getanyapi/_errors.py +115 -0
  6. getanyapi/_pagination.py +295 -0
  7. getanyapi/_transport.py +239 -0
  8. getanyapi/platforms/__init__.py +89 -0
  9. getanyapi/platforms/ahrefs.py +384 -0
  10. getanyapi/platforms/airbnb.py +120 -0
  11. getanyapi/platforms/alibaba.py +95 -0
  12. getanyapi/platforms/amazon.py +442 -0
  13. getanyapi/platforms/appstore.py +95 -0
  14. getanyapi/platforms/bluesky.py +215 -0
  15. getanyapi/platforms/booking.py +128 -0
  16. getanyapi/platforms/coinmarketcap.py +113 -0
  17. getanyapi/platforms/congress.py +106 -0
  18. getanyapi/platforms/dexscreener.py +104 -0
  19. getanyapi/platforms/ebay.py +215 -0
  20. getanyapi/platforms/email.py +166 -0
  21. getanyapi/platforms/facebook.py +2324 -0
  22. getanyapi/platforms/fiverr.py +122 -0
  23. getanyapi/platforms/github.py +954 -0
  24. getanyapi/platforms/glassdoor.py +93 -0
  25. getanyapi/platforms/google.py +232 -0
  26. getanyapi/platforms/google_ads.py +380 -0
  27. getanyapi/platforms/google_finance.py +170 -0
  28. getanyapi/platforms/google_shopping.py +103 -0
  29. getanyapi/platforms/hackernews.py +276 -0
  30. getanyapi/platforms/indeed.py +114 -0
  31. getanyapi/platforms/instagram.py +1868 -0
  32. getanyapi/platforms/linkedin.py +1064 -0
  33. getanyapi/platforms/maps.py +412 -0
  34. getanyapi/platforms/pandaexpress.py +262 -0
  35. getanyapi/platforms/person.py +96 -0
  36. getanyapi/platforms/pinterest.py +96 -0
  37. getanyapi/platforms/playstore.py +99 -0
  38. getanyapi/platforms/polymarket.py +109 -0
  39. getanyapi/platforms/realtor.py +104 -0
  40. getanyapi/platforms/reddit.py +582 -0
  41. getanyapi/platforms/redfin.py +95 -0
  42. getanyapi/platforms/rednote.py +807 -0
  43. getanyapi/platforms/sec.py +118 -0
  44. getanyapi/platforms/semrush.py +358 -0
  45. getanyapi/platforms/snapchat.py +146 -0
  46. getanyapi/platforms/social.py +105 -0
  47. getanyapi/platforms/spotify.py +588 -0
  48. getanyapi/platforms/substack.py +142 -0
  49. getanyapi/platforms/threads.py +358 -0
  50. getanyapi/platforms/tiktok.py +1827 -0
  51. getanyapi/platforms/tiktok_shop.py +536 -0
  52. getanyapi/platforms/tripadvisor.py +180 -0
  53. getanyapi/platforms/trustpilot.py +114 -0
  54. getanyapi/platforms/truthsocial.py +226 -0
  55. getanyapi/platforms/twitter.py +798 -0
  56. getanyapi/platforms/upwork.py +119 -0
  57. getanyapi/platforms/walmart.py +93 -0
  58. getanyapi/platforms/web.py +264 -0
  59. getanyapi/platforms/whatsapp.py +91 -0
  60. getanyapi/platforms/yahoo_finance.py +95 -0
  61. getanyapi/platforms/yelp.py +141 -0
  62. getanyapi/platforms/youtube.py +1452 -0
  63. getanyapi/platforms/zillow.py +218 -0
  64. getanyapi/py.typed +0 -0
  65. getanyapi/types.py +170 -0
  66. getanyapi-0.1.0.dist-info/METADATA +155 -0
  67. getanyapi-0.1.0.dist-info/RECORD +68 -0
  68. getanyapi-0.1.0.dist-info/WHEEL +4 -0
@@ -0,0 +1,2324 @@
1
+ # Generated - do not edit. Regenerate with: pnpm generate
2
+ """Generated namespace module for the facebook 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 FacebookAdDetailsInput(TypedDict, total=False):
25
+ """Input for Facebook Ad Details."""
26
+
27
+ id: NotRequired[str]
28
+ """Meta Ad Library ad ID (e.g. "702369045530963"). Provide either id or url."""
29
+ url: NotRequired[str]
30
+ """Meta Ad Library ad URL (e.g. "https://www.facebook.com/ads/library?id=1185617869915074"). Provide either id or url."""
31
+
32
+
33
+ class FacebookAdTranscriptInput(TypedDict, total=False):
34
+ """Input for Facebook Ad Transcript."""
35
+
36
+ id: NotRequired[str]
37
+ """Meta Ad Library ad ID (e.g. "1020359190509080"). Provide either id or url."""
38
+ url: NotRequired[str]
39
+ """Meta Ad Library ad URL (e.g. "https://www.facebook.com/ads/library?id=1020359190509080"). Provide either id or url."""
40
+
41
+
42
+ class FacebookAdsSearchInput(TypedDict, total=False):
43
+ """Input for Facebook Ad Search."""
44
+
45
+ country: NotRequired[str]
46
+ """Two-letter country code to scope results. Omit for all countries."""
47
+ cursor: NotRequired[str]
48
+ """Opaque pagination cursor from a previous response's nextCursor."""
49
+ mediaType: NotRequired[
50
+ Literal["ALL", "IMAGE", "VIDEO", "MEME", "IMAGE_AND_MEME", "NONE"]
51
+ ]
52
+ """Creative media type filter."""
53
+ query: Required[str]
54
+ """Keyword to search the Meta Ad Library for (e.g. "protein powder")."""
55
+ status: NotRequired[Literal["ALL", "ACTIVE", "INACTIVE"]]
56
+ """Ad status filter. Default: ACTIVE."""
57
+
58
+
59
+ class FacebookCommentRepliesInput(TypedDict, total=False):
60
+ """Input for Facebook Comment Replies."""
61
+
62
+ cursor: NotRequired[str]
63
+ """Pagination cursor from a previous response."""
64
+ expansionToken: Required[str]
65
+ """The expansion_token of the comment, from the post comments endpoint."""
66
+ feedbackId: Required[str]
67
+ """The feedback_id of the comment (not the comment id)."""
68
+
69
+
70
+ class FacebookCompanyAdsInput(TypedDict, total=False):
71
+ """Input for Facebook Company Ads."""
72
+
73
+ companyName: NotRequired[str]
74
+ """Company name to search (e.g. "nike"). Provide either pageId or companyName."""
75
+ country: NotRequired[str]
76
+ """Two-letter country code to scope results. Defaults to all countries."""
77
+ cursor: NotRequired[str]
78
+ """Opaque pagination cursor from a previous response's nextCursor."""
79
+ mediaType: NotRequired[
80
+ Literal["ALL", "IMAGE", "VIDEO", "MEME", "IMAGE_AND_MEME", "NONE"]
81
+ ]
82
+ """Creative media type filter."""
83
+ pageId: NotRequired[str]
84
+ """Company's Ad Library page ID. Provide either pageId or companyName."""
85
+ status: NotRequired[Literal["ALL", "ACTIVE", "INACTIVE"]]
86
+ """Ad status filter. Defaults to ACTIVE."""
87
+
88
+
89
+ class FacebookEventDetailsInput(TypedDict, total=False):
90
+ """Input for Facebook Event Details."""
91
+
92
+ id: NotRequired[str]
93
+ """The event's numeric identifier."""
94
+ url: NotRequired[str]
95
+ """The event's Facebook URL."""
96
+
97
+
98
+ class FacebookEventsInput(TypedDict, total=False):
99
+ """Input for Facebook Events."""
100
+
101
+ cursor: NotRequired[str]
102
+ """Pagination cursor from a previous response to fetch the next page."""
103
+ time: NotRequired[Literal["today", "this_week", "next_week"]]
104
+ """Timeframe filter for the returned events. Defaults to all time."""
105
+ url: Required[str]
106
+ """URL of a city's or place's Facebook Events page (e.g. https://www.facebook.com/events/explore/saint-petersburg-florida/111326725552547)."""
107
+
108
+
109
+ class FacebookEventsSearchInput(TypedDict, total=False):
110
+ """Input for Facebook Events Search."""
111
+
112
+ cursor: NotRequired[str]
113
+ """Pagination cursor from a previous response."""
114
+ query: Required[str]
115
+ """The query to search events for."""
116
+
117
+
118
+ class FacebookFollowersInput(TypedDict, total=False):
119
+ """Input for Facebook Followers."""
120
+
121
+ followType: NotRequired[str]
122
+ """Which relation to fetch: 'follower' or 'following' (e.g. follower). Default: follower."""
123
+ limit: NotRequired[int]
124
+ """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."""
125
+ url: Required[str]
126
+ """Facebook page or profile URL to list follows for (e.g. https://www.facebook.com/nasa)."""
127
+
128
+
129
+ class FacebookGroupPostsInput(TypedDict, total=False):
130
+ """Input for Facebook Group Posts."""
131
+
132
+ cursor: NotRequired[str]
133
+ """Pagination cursor from a previous response to fetch the next page."""
134
+ sort: NotRequired[
135
+ Literal[
136
+ "TOP_POSTS", "RECENT_ACTIVITY", "CHRONOLOGICAL", "CHRONOLOGICAL_LISTINGS"
137
+ ]
138
+ ]
139
+ """Ordering for the returned posts (e.g. TOP_POSTS)."""
140
+ url: Required[str]
141
+ """The URL of a public Facebook group to fetch posts from (e.g. https://www.facebook.com/groups/1270525996445602/)."""
142
+
143
+
144
+ class FacebookMarketplaceInput(TypedDict, total=False):
145
+ """Input for Facebook Marketplace."""
146
+
147
+ cursor: NotRequired[str]
148
+ """Pagination cursor from a previous response to fetch the next page."""
149
+ lat: Required[str]
150
+ """Latitude of the search location (e.g. '30.2677')."""
151
+ lng: Required[str]
152
+ """Longitude of the search location (e.g. '-97.7475')."""
153
+ query: Required[str]
154
+ """Search keyword for Marketplace listings (e.g. 'bike')."""
155
+ sort: NotRequired[
156
+ Literal[
157
+ "suggested",
158
+ "distance_ascend",
159
+ "creation_time_descend",
160
+ "price_ascend",
161
+ "price_descend",
162
+ ]
163
+ ]
164
+ """Sort order for the returned listings (e.g. price_ascend)."""
165
+
166
+
167
+ class FacebookMarketplaceItemInput(TypedDict, total=False):
168
+ """Input for Facebook Marketplace Item."""
169
+
170
+ id: NotRequired[str]
171
+ """Facebook Marketplace item ID."""
172
+ url: NotRequired[str]
173
+ """Facebook Marketplace item URL."""
174
+
175
+
176
+ class FacebookMarketplaceLocationSearchInput(TypedDict, total=False):
177
+ """Input for Facebook Marketplace Location Search."""
178
+
179
+ query: Required[str]
180
+ """Location search query (e.g. a city name)."""
181
+
182
+
183
+ class FacebookPageContactInput(TypedDict, total=False):
184
+ """Input for Facebook Page Contact Info."""
185
+
186
+ language: NotRequired[str]
187
+ """Locale code for the returned data (e.g. en-US). Default: en-US."""
188
+ page: Required[str]
189
+ """Facebook Page URL or page ID to look up (e.g. https://www.facebook.com/nasa)."""
190
+
191
+
192
+ class FacebookPhotosInput(TypedDict, total=False):
193
+ """Input for Facebook Page Photos."""
194
+
195
+ cursor: NotRequired[str]
196
+ """Pagination cursor from a previous response to fetch the next page."""
197
+ url: Required[str]
198
+ """URL of the public Facebook page or profile to fetch photos from (e.g. https://www.facebook.com/Spurs)."""
199
+
200
+
201
+ class FacebookPostInput(TypedDict, total=False):
202
+ """Input for Facebook Post."""
203
+
204
+ url: Required[str]
205
+ """Full Facebook post URL."""
206
+
207
+
208
+ class FacebookPostCommentsInput(TypedDict, total=False):
209
+ """Input for Facebook Post Comments."""
210
+
211
+ cursor: NotRequired[str]
212
+ """Pagination cursor from a previous response's nextCursor."""
213
+ feedbackId: NotRequired[str]
214
+ """Facebook feedback id for the post (alternative to url)."""
215
+ url: NotRequired[str]
216
+ """Full Facebook post URL."""
217
+
218
+
219
+ class FacebookPostTranscriptInput(TypedDict, total=False):
220
+ """Input for Facebook Post Transcript."""
221
+
222
+ url: Required[str]
223
+ """The Facebook post or video URL."""
224
+
225
+
226
+ class FacebookProfileInput(TypedDict, total=False):
227
+ """Input for Facebook Profile."""
228
+
229
+ handle: NotRequired[str]
230
+ """Facebook page handle/username."""
231
+ url: NotRequired[str]
232
+ """Full Facebook page URL."""
233
+
234
+
235
+ class FacebookProfileEventsInput(TypedDict, total=False):
236
+ """Input for Facebook Page Events."""
237
+
238
+ cursor: NotRequired[str]
239
+ """Pagination cursor from a previous response."""
240
+ url: Required[str]
241
+ """The Facebook page URL."""
242
+
243
+
244
+ class FacebookProfilePostsInput(TypedDict, total=False):
245
+ """Input for Facebook Profile Posts."""
246
+
247
+ cursor: NotRequired[str]
248
+ """Pagination cursor from a previous response."""
249
+ pageId: NotRequired[str]
250
+ """Facebook page id."""
251
+ url: NotRequired[str]
252
+ """Full Facebook page/profile URL."""
253
+
254
+
255
+ class FacebookProfileReelsInput(TypedDict, total=False):
256
+ """Input for Facebook Profile Reels."""
257
+
258
+ cursor: NotRequired[str]
259
+ """Pagination cursor from a previous response."""
260
+ url: Required[str]
261
+ """Full Facebook page/profile URL."""
262
+
263
+
264
+ class FacebookSearchCompaniesInput(TypedDict, total=False):
265
+ """Input for Facebook Company Search."""
266
+
267
+ query: Required[str]
268
+ """Keyword to search advertiser pages for (e.g. "nike")."""
269
+
270
+
271
+ class FacebookSearchPagesInput(TypedDict, total=False):
272
+ """Input for Facebook Page Search."""
273
+
274
+ limit: NotRequired[int]
275
+ """Maximum number of results to return (1-10, default 10). You are billed per result returned, so a lower limit costs less. Range: 1 to 10."""
276
+ location: NotRequired[str]
277
+ """Optional free-text location to narrow the search - a city, province, or country (e.g. 'Berlin')."""
278
+ query: Required[str]
279
+ """Keyword to search Facebook Pages for (e.g. 'coffee roasters')."""
280
+
281
+
282
+ class FacebookSearchPostsInput(TypedDict, total=False):
283
+ """Input for Facebook Post Search."""
284
+
285
+ limit: NotRequired[int]
286
+ """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."""
287
+ location: NotRequired[str]
288
+ """Optional location to narrow results; include both city and country for best matches (e.g. 'Paris, France')."""
289
+ query: Required[str]
290
+ """Keyword or phrase to search Facebook posts for (e.g. 'product launch')."""
291
+
292
+
293
+ class FacebookAdDetailsData(BaseModel):
294
+ model_config = ConfigDict(extra="allow", populate_by_name=True)
295
+
296
+ active: bool | None = Field(
297
+ default=None, description="Whether the ad is currently running."
298
+ )
299
+ ad_archive_id: str = Field(
300
+ alias="adArchiveId", description="Ad Library archive ID (stable identity)."
301
+ )
302
+ cta_text: str | None = Field(
303
+ default=None,
304
+ alias="ctaText",
305
+ description="Call-to-action label. Present whenever the upstream returns this record.",
306
+ )
307
+ currency: str | None = Field(
308
+ default=None, description="Spend currency, may be empty."
309
+ )
310
+ display_format: str | None = Field(
311
+ default=None,
312
+ alias="displayFormat",
313
+ description="Ad creative format. Present whenever the upstream returns this record.",
314
+ )
315
+ end_date: int | None = Field(
316
+ default=None, alias="endDate", description="Run end, epoch seconds."
317
+ )
318
+ link_url: str | None = Field(
319
+ default=None,
320
+ alias="linkUrl",
321
+ description="Creative destination URL. Present whenever the upstream returns this record.",
322
+ )
323
+ page_id: str = Field(
324
+ alias="pageId", description="Advertiser page ID (stable identity)."
325
+ )
326
+ page_name: str | None = Field(
327
+ default=None,
328
+ alias="pageName",
329
+ description="Advertiser page name. Present whenever the upstream returns this record.",
330
+ )
331
+ platforms: list[str] | None = Field(
332
+ default=None,
333
+ description="Publisher platforms the ad runs on. Present whenever the upstream returns this record.",
334
+ )
335
+ start_date: int | None = Field(
336
+ default=None,
337
+ alias="startDate",
338
+ description="Run start, epoch seconds. Present whenever the upstream returns this record.",
339
+ )
340
+ text: str | None = Field(
341
+ default=None,
342
+ description="Ad body text. Present whenever the upstream returns this record.",
343
+ )
344
+ title: str | None = Field(
345
+ default=None,
346
+ description="Creative title. Present whenever the upstream returns this record.",
347
+ )
348
+
349
+
350
+ class FacebookAdTranscriptData(BaseModel):
351
+ model_config = ConfigDict(extra="allow", populate_by_name=True)
352
+
353
+ ad_id: str = Field(alias="adId")
354
+ transcript: str = Field(description="Transcribed ad audio text.")
355
+ transcript_available: bool = Field(alias="transcriptAvailable")
356
+ url: str
357
+
358
+
359
+ class FacebookAdsSearchData(BaseModel):
360
+ model_config = ConfigDict(populate_by_name=True)
361
+
362
+ ads: list[FacebookAdsSearchAd]
363
+ next_cursor: str = Field(alias="nextCursor")
364
+ total_results: int = Field(alias="totalResults")
365
+
366
+
367
+ class FacebookAdsSearchAd(BaseModel):
368
+ model_config = ConfigDict(extra="allow", populate_by_name=True)
369
+
370
+ active: bool
371
+ ad_count: int = Field(
372
+ alias="adCount", description="Number of ads in this campaign (collation count)."
373
+ )
374
+ cta_text: str = Field(alias="ctaText")
375
+ cta_type: str = Field(alias="ctaType")
376
+ display_format: str = Field(alias="displayFormat")
377
+ end_date: int = Field(alias="endDate", description="Epoch seconds.")
378
+ id: str = Field(description="Ad Library archive ID.")
379
+ link_url: str = Field(alias="linkUrl")
380
+ page_id: str = Field(alias="pageId")
381
+ page_name: str = Field(alias="pageName")
382
+ platforms: list[str]
383
+ start_date: int = Field(alias="startDate", description="Epoch seconds.")
384
+ text: str = Field(description="Ad body text.")
385
+ title: str
386
+
387
+
388
+ class FacebookCommentRepliesData(BaseModel):
389
+ model_config = ConfigDict(populate_by_name=True)
390
+
391
+ has_next_page: bool = Field(alias="hasNextPage")
392
+ next_cursor: str = Field(alias="nextCursor")
393
+ replies: list[FacebookCommentRepliesReplie]
394
+
395
+
396
+ class FacebookCommentRepliesReplie(BaseModel):
397
+ model_config = ConfigDict(extra="allow", populate_by_name=True)
398
+
399
+ author_id: str = Field(alias="authorId")
400
+ author_name: str = Field(alias="authorName")
401
+ author_profile_picture: str = Field(alias="authorProfilePicture")
402
+ created_at: str = Field(alias="createdAt")
403
+ expansion_token: str | None = Field(default=None, alias="expansionToken")
404
+ feedback_id: str = Field(alias="feedbackId")
405
+ id: str
406
+ reaction_count: int = Field(alias="reactionCount")
407
+ reply_count: int = Field(alias="replyCount")
408
+ text: str
409
+
410
+
411
+ class FacebookCompanyAdsData(BaseModel):
412
+ model_config = ConfigDict(populate_by_name=True)
413
+
414
+ ads: list[FacebookCompanyAdsAd]
415
+ next_cursor: str = Field(alias="nextCursor")
416
+
417
+
418
+ class FacebookCompanyAdsAd(BaseModel):
419
+ model_config = ConfigDict(extra="allow", populate_by_name=True)
420
+
421
+ active: bool
422
+ ad_count: int = Field(
423
+ alias="adCount", description="Number of ads in this campaign (collation count)."
424
+ )
425
+ currency: str
426
+ display_format: str = Field(alias="displayFormat")
427
+ end_date: int = Field(alias="endDate", description="Epoch seconds.")
428
+ id: str = Field(description="Ad Library archive ID.")
429
+ page_id: str = Field(alias="pageId")
430
+ page_name: str = Field(alias="pageName")
431
+ platforms: list[str]
432
+ start_date: int = Field(alias="startDate", description="Epoch seconds.")
433
+ text: str = Field(description="Ad body text.")
434
+
435
+
436
+ class FacebookEventDetailsData(BaseModel):
437
+ model_config = ConfigDict(extra="allow", populate_by_name=True)
438
+
439
+ city: str
440
+ cover_photo_url: str = Field(alias="coverPhotoUrl")
441
+ day_time_sentence: str = Field(alias="dayTimeSentence")
442
+ description: str
443
+ end_time: str = Field(alias="endTime")
444
+ going_count: int = Field(alias="goingCount")
445
+ id: str
446
+ interested_count: int = Field(alias="interestedCount")
447
+ is_canceled: bool = Field(alias="isCanceled")
448
+ is_online: bool = Field(alias="isOnline")
449
+ location_name: str = Field(alias="locationName")
450
+ name: str
451
+ start_time: str = Field(alias="startTime")
452
+ url: str
453
+
454
+
455
+ class FacebookEventsData(BaseModel):
456
+ model_config = ConfigDict(populate_by_name=True)
457
+
458
+ events: list[FacebookEventsEvent]
459
+ next_cursor: str = Field(alias="nextCursor")
460
+
461
+
462
+ class FacebookEventsEvent(BaseModel):
463
+ model_config = ConfigDict(extra="allow", populate_by_name=True)
464
+
465
+ day_time_sentence: str = Field(alias="dayTimeSentence")
466
+ going_count: int = Field(alias="goingCount")
467
+ id: str
468
+ interested_count: int = Field(alias="interestedCount")
469
+ is_online: bool = Field(alias="isOnline")
470
+ name: str
471
+ place_name: str = Field(alias="placeName")
472
+ start_timestamp: int = Field(alias="startTimestamp")
473
+ url: str
474
+
475
+
476
+ class FacebookEventsSearchData(BaseModel):
477
+ model_config = ConfigDict(populate_by_name=True)
478
+
479
+ events: list[FacebookEventsSearchEvent]
480
+ next_cursor: str = Field(alias="nextCursor")
481
+
482
+
483
+ class FacebookEventsSearchEvent(BaseModel):
484
+ model_config = ConfigDict(extra="allow", populate_by_name=True)
485
+
486
+ cover_image: str = Field(alias="coverImage")
487
+ day_time_sentence: str = Field(alias="dayTimeSentence")
488
+ going_count: int = Field(alias="goingCount")
489
+ id: str
490
+ interested_count: int = Field(alias="interestedCount")
491
+ is_online: bool = Field(alias="isOnline")
492
+ is_past: bool = Field(alias="isPast")
493
+ name: str
494
+ place_name: str = Field(alias="placeName")
495
+ price_range_text: str = Field(alias="priceRangeText")
496
+ start_timestamp: int = Field(alias="startTimestamp")
497
+ url: str
498
+
499
+
500
+ class FacebookFollowersData(BaseModel):
501
+ items: list[FacebookFollowersItem] = Field(
502
+ description="Follower or following records: profile name, profile URL, and picture for each account."
503
+ )
504
+
505
+
506
+ class FacebookFollowersItem(BaseModel):
507
+ model_config = ConfigDict(extra="allow")
508
+
509
+ id: str
510
+ name: str | None = Field(
511
+ default=None, description="Present whenever the upstream returns this record."
512
+ )
513
+ url: str
514
+
515
+
516
+ class FacebookGroupPostsData(BaseModel):
517
+ model_config = ConfigDict(populate_by_name=True)
518
+
519
+ next_cursor: str = Field(alias="nextCursor")
520
+ posts: list[FacebookGroupPostsPost]
521
+
522
+
523
+ class FacebookGroupPostsPost(BaseModel):
524
+ model_config = ConfigDict(extra="allow", populate_by_name=True)
525
+
526
+ author_id: str = Field(alias="authorId")
527
+ author_name: str = Field(alias="authorName")
528
+ comment_count: int = Field(alias="commentCount")
529
+ id: str
530
+ permalink: str
531
+ publish_time: int = Field(alias="publishTime")
532
+ reaction_count: int = Field(alias="reactionCount")
533
+ text: str
534
+ url: str
535
+
536
+
537
+ class FacebookMarketplaceData(BaseModel):
538
+ model_config = ConfigDict(populate_by_name=True)
539
+
540
+ has_next_page: bool = Field(alias="hasNextPage")
541
+ listings: list[FacebookMarketplaceListing]
542
+ next_cursor: str = Field(alias="nextCursor")
543
+
544
+
545
+ class FacebookMarketplaceListing(BaseModel):
546
+ model_config = ConfigDict(extra="allow", populate_by_name=True)
547
+
548
+ id: str
549
+ is_sold: bool = Field(alias="isSold")
550
+ location_name: str = Field(alias="locationName")
551
+ photo_url: str = Field(alias="photoUrl")
552
+ price_amount: float = Field(alias="priceAmount")
553
+ price_formatted: str = Field(alias="priceFormatted")
554
+ title: str
555
+ url: str
556
+
557
+
558
+ class FacebookMarketplaceItemData(BaseModel):
559
+ model_config = ConfigDict(extra="allow", populate_by_name=True)
560
+
561
+ category_id: str = Field(alias="categoryId")
562
+ creation_time: str = Field(alias="creationTime")
563
+ currency: str
564
+ description: str
565
+ id: str
566
+ is_live: bool = Field(alias="isLive")
567
+ is_sold: bool = Field(alias="isSold")
568
+ location_text: str = Field(alias="locationText")
569
+ price_amount: float = Field(alias="priceAmount")
570
+ price_formatted: str = Field(alias="priceFormatted")
571
+ title: str
572
+ url: str
573
+
574
+
575
+ class FacebookMarketplaceLocationSearchData(BaseModel):
576
+ locations: list[FacebookMarketplaceLocationSearchLocation]
577
+
578
+
579
+ class FacebookMarketplaceLocationSearchLocation(BaseModel):
580
+ model_config = ConfigDict(extra="allow", populate_by_name=True)
581
+
582
+ city: str
583
+ latitude: float
584
+ longitude: float
585
+ name: str
586
+ page_id: str = Field(alias="pageId")
587
+ postal_code: str = Field(alias="postalCode")
588
+ subtitle: str
589
+
590
+
591
+ class FacebookPageContactData(BaseModel):
592
+ items: list[FacebookPageContactItem] = Field(
593
+ description="Page contact records: page name, email, phone, website, physical address, and category."
594
+ )
595
+
596
+
597
+ class FacebookPageContactItem(BaseModel):
598
+ model_config = ConfigDict(extra="allow")
599
+
600
+ address: str | None = None
601
+ category: str | None = Field(
602
+ default=None, description="Present whenever the upstream returns this record."
603
+ )
604
+ email: str | None = None
605
+ phone: str | None = None
606
+ title: str
607
+ url: str
608
+ website: str | None = None
609
+
610
+
611
+ class FacebookPhotosData(BaseModel):
612
+ model_config = ConfigDict(populate_by_name=True)
613
+
614
+ next_cursor: str = Field(alias="nextCursor")
615
+ next_page_id: str = Field(alias="nextPageId")
616
+ photos: list[FacebookPhotosPhoto]
617
+
618
+
619
+ class FacebookPhotosPhoto(BaseModel):
620
+ model_config = ConfigDict(extra="allow", populate_by_name=True)
621
+
622
+ caption: str
623
+ id: str
624
+ image_height: int = Field(alias="imageHeight")
625
+ image_url: str = Field(alias="imageUrl")
626
+ image_width: int = Field(alias="imageWidth")
627
+ photo_id: str = Field(alias="photoId")
628
+ thumbnail: str
629
+ url: str
630
+
631
+
632
+ class FacebookPostData(BaseModel):
633
+ model_config = ConfigDict(extra="allow")
634
+
635
+ comments: int
636
+ id: str
637
+ likes: int
638
+ shares: int
639
+ text: str
640
+ views: int
641
+
642
+
643
+ class FacebookPostCommentsData(BaseModel):
644
+ model_config = ConfigDict(populate_by_name=True)
645
+
646
+ comments: list[FacebookPostCommentsComment]
647
+ next_cursor: str = Field(alias="nextCursor")
648
+
649
+
650
+ class FacebookPostCommentsComment(BaseModel):
651
+ model_config = ConfigDict(extra="allow", populate_by_name=True)
652
+
653
+ author: str
654
+ created_at: str = Field(alias="createdAt")
655
+ id: str
656
+ reactions: int
657
+ replies: int
658
+ text: str
659
+
660
+
661
+ class FacebookPostTranscriptData(BaseModel):
662
+ model_config = ConfigDict(extra="allow")
663
+
664
+ transcript: str
665
+
666
+
667
+ class FacebookProfileData(BaseModel):
668
+ model_config = ConfigDict(extra="allow", populate_by_name=True)
669
+
670
+ about: str
671
+ avatar_url: str = Field(alias="avatarUrl")
672
+ category: str
673
+ followers: int
674
+ likes: int
675
+ name: str
676
+
677
+
678
+ class FacebookProfileEventsData(BaseModel):
679
+ model_config = ConfigDict(populate_by_name=True)
680
+
681
+ events: list[FacebookProfileEventsEvent]
682
+ has_next_page: bool = Field(alias="hasNextPage")
683
+ next_cursor: str = Field(alias="nextCursor")
684
+ total_count: int = Field(alias="totalCount")
685
+
686
+
687
+ class FacebookProfileEventsEvent(BaseModel):
688
+ model_config = ConfigDict(extra="allow", populate_by_name=True)
689
+
690
+ city: str
691
+ creator_name: str = Field(alias="creatorName")
692
+ day_time_sentence: str = Field(alias="dayTimeSentence")
693
+ id: str
694
+ is_canceled: bool = Field(alias="isCanceled")
695
+ is_online: bool = Field(alias="isOnline")
696
+ is_past: bool = Field(alias="isPast")
697
+ name: str
698
+ place_name: str = Field(alias="placeName")
699
+ start_timestamp: int = Field(alias="startTimestamp")
700
+ url: str
701
+
702
+
703
+ class FacebookProfilePostsData(BaseModel):
704
+ posts: list[FacebookProfilePostsPost]
705
+
706
+
707
+ class FacebookProfilePostsPost(BaseModel):
708
+ model_config = ConfigDict(extra="allow")
709
+
710
+ author: str
711
+ id: str
712
+ text: str
713
+ url: str
714
+
715
+
716
+ class FacebookProfileReelsData(BaseModel):
717
+ reels: list[FacebookProfileReelsReel]
718
+
719
+
720
+ class FacebookProfileReelsReel(BaseModel):
721
+ model_config = ConfigDict(extra="allow", populate_by_name=True)
722
+
723
+ caption: str
724
+ created_at: str = Field(alias="createdAt")
725
+ id: str
726
+ thumbnail: str
727
+ url: str
728
+ views: int
729
+
730
+
731
+ class FacebookSearchCompaniesData(BaseModel):
732
+ companies: list[FacebookSearchCompaniesCompanie]
733
+
734
+
735
+ class FacebookSearchCompaniesCompanie(BaseModel):
736
+ model_config = ConfigDict(extra="allow", populate_by_name=True)
737
+
738
+ category: str
739
+ country: str
740
+ entity_type: str = Field(alias="entityType")
741
+ ig_followers: int = Field(alias="igFollowers")
742
+ ig_username: str = Field(alias="igUsername")
743
+ image_url: str = Field(alias="imageUrl")
744
+ likes: int
745
+ name: str
746
+ page_alias: str = Field(alias="pageAlias")
747
+ page_id: str = Field(alias="pageId")
748
+ verification: str
749
+
750
+
751
+ class FacebookSearchPagesData(BaseModel):
752
+ items: list[FacebookSearchPagesItem] = Field(
753
+ description="Page profile records: page name, category, follower/like counts, contact details, and page URL."
754
+ )
755
+
756
+
757
+ class FacebookSearchPagesItem(BaseModel):
758
+ model_config = ConfigDict(extra="allow")
759
+
760
+ title: str
761
+ url: str
762
+
763
+
764
+ class FacebookSearchPostsData(BaseModel):
765
+ items: list[FacebookSearchPostsItem] = Field(
766
+ description="Post records: post text, author, timestamp, engagement counts (reactions, comments, shares), and post URL."
767
+ )
768
+
769
+
770
+ class FacebookSearchPostsItem(BaseModel):
771
+ model_config = ConfigDict(extra="allow")
772
+
773
+ text: str
774
+ url: str
775
+
776
+
777
+ class FacebookNamespace:
778
+ """Typed methods for this platform. Attached lazily to the client."""
779
+
780
+ def __init__(self, client: "AnyAPI") -> None:
781
+ self._client = client
782
+
783
+ def ad_details(
784
+ self,
785
+ *,
786
+ options: RequestOptions | None = None,
787
+ **input: Unpack[FacebookAdDetailsInput],
788
+ ) -> RunResult[FacebookAdDetailsData]:
789
+ """Facebook Ad Details
790
+
791
+ Look up a single Meta Ad Library ad by ID or URL and get the advertiser,
792
+ creative text, call-to-action, platforms, and run dates as clean JSON,
793
+ billed per request in USD.
794
+
795
+ Price: $0.002 per request.
796
+
797
+ Example:
798
+ res = client.facebook.ad_details(id="1869276447125570")
799
+ """
800
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
801
+ "facebook.ad_details", dict(input), options
802
+ )
803
+ return RunResult[FacebookAdDetailsData].model_validate(raw)
804
+
805
+ def ad_transcript(
806
+ self,
807
+ *,
808
+ options: RequestOptions | None = None,
809
+ **input: Unpack[FacebookAdTranscriptInput],
810
+ ) -> RunResult[FacebookAdTranscriptData]:
811
+ """Facebook Ad Transcript
812
+
813
+ Get the spoken-word transcript of a Meta Ad Library video ad by ad ID or
814
+ URL, billed per request in USD.
815
+
816
+ Price: $0.002 per request.
817
+
818
+ Example:
819
+ res = client.facebook.ad_transcript(id="931919822778200")
820
+ """
821
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
822
+ "facebook.ad_transcript", dict(input), options
823
+ )
824
+ return RunResult[FacebookAdTranscriptData].model_validate(raw)
825
+
826
+ def ads_search(
827
+ self,
828
+ *,
829
+ options: RequestOptions | None = None,
830
+ **input: Unpack[FacebookAdsSearchInput],
831
+ ) -> RunResult[FacebookAdsSearchData]:
832
+ """Facebook Ad Search
833
+
834
+ Search the Meta Ad Library by keyword and get matching ads - advertiser,
835
+ creative text, CTA, platforms, and run dates - with cursor pagination and
836
+ transparent failover.
837
+
838
+ Price: $0.002 per request.
839
+
840
+ Example:
841
+ res = client.facebook.ads_search(country="US", query="nike")
842
+ """
843
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
844
+ "facebook.ads_search", dict(input), options
845
+ )
846
+ return RunResult[FacebookAdsSearchData].model_validate(raw)
847
+
848
+ def iter_ads_search(
849
+ self,
850
+ *,
851
+ options: RequestOptions | None = None,
852
+ **input: Unpack[FacebookAdsSearchInput],
853
+ ) -> Paginator[FacebookAdsSearchAd, FacebookAdsSearchData]:
854
+ """Iterate Facebook Ad Search results, following pagination cursors.
855
+
856
+ Yields validated `FacebookAdsSearchAd` items from the `ads` field of
857
+ each page. Use `.pages()` on the returned paginator to walk whole
858
+ `RunResult` pages.
859
+ """
860
+ return paginate(
861
+ self._client,
862
+ "facebook.ads_search",
863
+ dict(input),
864
+ "ads",
865
+ item_model=FacebookAdsSearchAd,
866
+ data_model=FacebookAdsSearchData,
867
+ bare=False,
868
+ options=options,
869
+ )
870
+
871
+ def comment_replies(
872
+ self,
873
+ *,
874
+ options: RequestOptions | None = None,
875
+ **input: Unpack[FacebookCommentRepliesInput],
876
+ ) -> RunResult[FacebookCommentRepliesData]:
877
+ """Facebook Comment Replies
878
+
879
+ List the replies to a Facebook post comment - text, author, reactions, and
880
+ timestamps - as normalized JSON at a flat USD price per request.
881
+
882
+ Price: $0.002 per request.
883
+
884
+ Example:
885
+ res = client.facebook.comment_replies(expansionToken="MjoxNzgzMjI4OTY4OgF_o5zrjDnpemv4bwPtpsShXutqvKIw2bKs2YuJksL1Ak8n8YG-_KPSQGkIks5oW6wdRfhb_cRv9q5OX0NHjFJwEupYNZi9pcMV-FYLWLp47u-eusMkZFOMwbkISsTln7gtSvQrOzlffyavOTIL85PECYzGfunU2IAEkd13CIikxu06Mw10UJ1ShcFAmz8175R1uJfYy_iOixWZukqfrWhUfVOXApXznxx7qXvUxPwct76qe6p7-nVWQrPC_SZc2xh9Z8ggL3WMjgTzSq4oWFSsyZuuVsyVVjSgdjRQiDqtJSeEUlSjTr6vOnKsvKV-GpnBRaeA0BCaNRhqpB4xDZoduBuO5ZYrFvWLJdJLryDhCPI2Ss-Z33cEM2Vz7pLf1wJzE7TuizXPwICSn1DA_Prca-BItTbOUjAjfiySap1LXYkGuuDC2ziUdiEsmE5XhevMP8XtF_2WQlMNcGbXMEQyAWDUawtPAxXgMeRrCO9YGSweFQ4OZumoIlSGa3Vfjy-euUOHT1IAsNbV2A8rAq4HJNU3jCXQTn0vfW9xvbVQhL-53Mhw2YPjhlvUj6QpnGA25N8", feedbackId="ZmVlZGJhY2s6MTM5MzQ2MTExNTQ4MTkyN18yMDgyNjUzMjQ1ODA5Mzg2")
886
+ """
887
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
888
+ "facebook.comment_replies", dict(input), options
889
+ )
890
+ return RunResult[FacebookCommentRepliesData].model_validate(raw)
891
+
892
+ def iter_comment_replies(
893
+ self,
894
+ *,
895
+ options: RequestOptions | None = None,
896
+ **input: Unpack[FacebookCommentRepliesInput],
897
+ ) -> Paginator[FacebookCommentRepliesReplie, FacebookCommentRepliesData]:
898
+ """Iterate Facebook Comment Replies results, following pagination cursors.
899
+
900
+ Yields validated `FacebookCommentRepliesReplie` items from the `replies` field of
901
+ each page. Use `.pages()` on the returned paginator to walk whole
902
+ `RunResult` pages.
903
+ """
904
+ return paginate(
905
+ self._client,
906
+ "facebook.comment_replies",
907
+ dict(input),
908
+ "replies",
909
+ item_model=FacebookCommentRepliesReplie,
910
+ data_model=FacebookCommentRepliesData,
911
+ bare=False,
912
+ options=options,
913
+ )
914
+
915
+ def company_ads(
916
+ self,
917
+ *,
918
+ options: RequestOptions | None = None,
919
+ **input: Unpack[FacebookCompanyAdsInput],
920
+ ) -> RunResult[FacebookCompanyAdsData]:
921
+ """Facebook Company Ads
922
+
923
+ List the Meta Ad Library ads a company is running by page ID or company name
924
+ - creative text, format, platforms, and run dates - with cursor pagination,
925
+ billed per request in USD.
926
+
927
+ Price: $0.002 per request.
928
+
929
+ Example:
930
+ res = client.facebook.company_ads(companyName="nike")
931
+ """
932
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
933
+ "facebook.company_ads", dict(input), options
934
+ )
935
+ return RunResult[FacebookCompanyAdsData].model_validate(raw)
936
+
937
+ def iter_company_ads(
938
+ self,
939
+ *,
940
+ options: RequestOptions | None = None,
941
+ **input: Unpack[FacebookCompanyAdsInput],
942
+ ) -> Paginator[FacebookCompanyAdsAd, FacebookCompanyAdsData]:
943
+ """Iterate Facebook Company Ads results, following pagination cursors.
944
+
945
+ Yields validated `FacebookCompanyAdsAd` items from the `ads` field of
946
+ each page. Use `.pages()` on the returned paginator to walk whole
947
+ `RunResult` pages.
948
+ """
949
+ return paginate(
950
+ self._client,
951
+ "facebook.company_ads",
952
+ dict(input),
953
+ "ads",
954
+ item_model=FacebookCompanyAdsAd,
955
+ data_model=FacebookCompanyAdsData,
956
+ bare=False,
957
+ options=options,
958
+ )
959
+
960
+ def event_details(
961
+ self,
962
+ *,
963
+ options: RequestOptions | None = None,
964
+ **input: Unpack[FacebookEventDetailsInput],
965
+ ) -> RunResult[FacebookEventDetailsData]:
966
+ """Facebook Event Details
967
+
968
+ Fetch full details for a single Facebook event by ID or URL - name,
969
+ schedule, venue, hosts, and attendance - as normalized JSON at a flat USD
970
+ price per request.
971
+
972
+ Price: $0.002 per request.
973
+
974
+ Example:
975
+ res = client.facebook.event_details(id="4045709448982422")
976
+ """
977
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
978
+ "facebook.event_details", dict(input), options
979
+ )
980
+ return RunResult[FacebookEventDetailsData].model_validate(raw)
981
+
982
+ def events(
983
+ self,
984
+ *,
985
+ options: RequestOptions | None = None,
986
+ **input: Unpack[FacebookEventsInput],
987
+ ) -> RunResult[FacebookEventsData]:
988
+ """Facebook Events
989
+
990
+ List public Facebook events for a city or place by its events-page URL -
991
+ event name, date, venue, and attendance - as normalized JSON at a flat USD
992
+ price per request.
993
+
994
+ Price: $0.002 per request.
995
+
996
+ Example:
997
+ res = client.facebook.events(url="https://www.facebook.com/events/explore/saint-petersburg-florida/111326725552547")
998
+ """
999
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
1000
+ "facebook.events", dict(input), options
1001
+ )
1002
+ return RunResult[FacebookEventsData].model_validate(raw)
1003
+
1004
+ def iter_events(
1005
+ self,
1006
+ *,
1007
+ options: RequestOptions | None = None,
1008
+ **input: Unpack[FacebookEventsInput],
1009
+ ) -> Paginator[FacebookEventsEvent, FacebookEventsData]:
1010
+ """Iterate Facebook Events results, following pagination cursors.
1011
+
1012
+ Yields validated `FacebookEventsEvent` items from the `events` field of
1013
+ each page. Use `.pages()` on the returned paginator to walk whole
1014
+ `RunResult` pages.
1015
+ """
1016
+ return paginate(
1017
+ self._client,
1018
+ "facebook.events",
1019
+ dict(input),
1020
+ "events",
1021
+ item_model=FacebookEventsEvent,
1022
+ data_model=FacebookEventsData,
1023
+ bare=False,
1024
+ options=options,
1025
+ )
1026
+
1027
+ def events_search(
1028
+ self,
1029
+ *,
1030
+ options: RequestOptions | None = None,
1031
+ **input: Unpack[FacebookEventsSearchInput],
1032
+ ) -> RunResult[FacebookEventsSearchData]:
1033
+ """Facebook Events Search
1034
+
1035
+ Search public Facebook events by keyword and get structured event records -
1036
+ name, schedule, venue, pricing, and attendance - as normalized JSON at a
1037
+ flat USD price per request.
1038
+
1039
+ Price: $0.002 per request.
1040
+
1041
+ Example:
1042
+ res = client.facebook.events_search(query="music festival")
1043
+ """
1044
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
1045
+ "facebook.events_search", dict(input), options
1046
+ )
1047
+ return RunResult[FacebookEventsSearchData].model_validate(raw)
1048
+
1049
+ def iter_events_search(
1050
+ self,
1051
+ *,
1052
+ options: RequestOptions | None = None,
1053
+ **input: Unpack[FacebookEventsSearchInput],
1054
+ ) -> Paginator[FacebookEventsSearchEvent, FacebookEventsSearchData]:
1055
+ """Iterate Facebook Events Search results, following pagination cursors.
1056
+
1057
+ Yields validated `FacebookEventsSearchEvent` items from the `events` field of
1058
+ each page. Use `.pages()` on the returned paginator to walk whole
1059
+ `RunResult` pages.
1060
+ """
1061
+ return paginate(
1062
+ self._client,
1063
+ "facebook.events_search",
1064
+ dict(input),
1065
+ "events",
1066
+ item_model=FacebookEventsSearchEvent,
1067
+ data_model=FacebookEventsSearchData,
1068
+ bare=False,
1069
+ options=options,
1070
+ )
1071
+
1072
+ def followers(
1073
+ self,
1074
+ *,
1075
+ options: RequestOptions | None = None,
1076
+ **input: Unpack[FacebookFollowersInput],
1077
+ ) -> RunResult[FacebookFollowersData]:
1078
+ """Facebook Followers
1079
+
1080
+ List the public followers - or accounts followed - of any Facebook page or
1081
+ profile URL as normalized JSON records, priced per request in USD.
1082
+
1083
+ Price: $0.006 per result.
1084
+
1085
+ Example:
1086
+ res = client.facebook.followers(limit=3, url="https://www.facebook.com/nike")
1087
+ """
1088
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
1089
+ "facebook.followers", dict(input), options
1090
+ )
1091
+ return RunResult[FacebookFollowersData].model_validate(raw)
1092
+
1093
+ def group_posts(
1094
+ self,
1095
+ *,
1096
+ options: RequestOptions | None = None,
1097
+ **input: Unpack[FacebookGroupPostsInput],
1098
+ ) -> RunResult[FacebookGroupPostsData]:
1099
+ """Facebook Group Posts
1100
+
1101
+ Fetch recent posts from any public Facebook group by URL - text, author,
1102
+ reactions, and comment counts - at a flat per-request USD price.
1103
+
1104
+ Price: $0.002 per request.
1105
+
1106
+ Example:
1107
+ res = client.facebook.group_posts(url="https://www.facebook.com/groups/1270525996445602/")
1108
+ """
1109
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
1110
+ "facebook.group_posts", dict(input), options
1111
+ )
1112
+ return RunResult[FacebookGroupPostsData].model_validate(raw)
1113
+
1114
+ def iter_group_posts(
1115
+ self,
1116
+ *,
1117
+ options: RequestOptions | None = None,
1118
+ **input: Unpack[FacebookGroupPostsInput],
1119
+ ) -> Paginator[FacebookGroupPostsPost, FacebookGroupPostsData]:
1120
+ """Iterate Facebook Group Posts results, following pagination cursors.
1121
+
1122
+ Yields validated `FacebookGroupPostsPost` items from the `posts` field of
1123
+ each page. Use `.pages()` on the returned paginator to walk whole
1124
+ `RunResult` pages.
1125
+ """
1126
+ return paginate(
1127
+ self._client,
1128
+ "facebook.group_posts",
1129
+ dict(input),
1130
+ "posts",
1131
+ item_model=FacebookGroupPostsPost,
1132
+ data_model=FacebookGroupPostsData,
1133
+ bare=False,
1134
+ options=options,
1135
+ )
1136
+
1137
+ def marketplace(
1138
+ self,
1139
+ *,
1140
+ options: RequestOptions | None = None,
1141
+ **input: Unpack[FacebookMarketplaceInput],
1142
+ ) -> RunResult[FacebookMarketplaceData]:
1143
+ """Facebook Marketplace
1144
+
1145
+ Search Facebook Marketplace listings by keyword near a location - title,
1146
+ price, location, and image - as normalized JSON at a flat USD price per
1147
+ request.
1148
+
1149
+ Price: $0.002 per request.
1150
+
1151
+ Example:
1152
+ res = client.facebook.marketplace(lat="30.2677", lng="-97.7475", query="bike")
1153
+ """
1154
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
1155
+ "facebook.marketplace", dict(input), options
1156
+ )
1157
+ return RunResult[FacebookMarketplaceData].model_validate(raw)
1158
+
1159
+ def iter_marketplace(
1160
+ self,
1161
+ *,
1162
+ options: RequestOptions | None = None,
1163
+ **input: Unpack[FacebookMarketplaceInput],
1164
+ ) -> Paginator[FacebookMarketplaceListing, FacebookMarketplaceData]:
1165
+ """Iterate Facebook Marketplace results, following pagination cursors.
1166
+
1167
+ Yields validated `FacebookMarketplaceListing` items from the `listings` field of
1168
+ each page. Use `.pages()` on the returned paginator to walk whole
1169
+ `RunResult` pages.
1170
+ """
1171
+ return paginate(
1172
+ self._client,
1173
+ "facebook.marketplace",
1174
+ dict(input),
1175
+ "listings",
1176
+ item_model=FacebookMarketplaceListing,
1177
+ data_model=FacebookMarketplaceData,
1178
+ bare=False,
1179
+ options=options,
1180
+ )
1181
+
1182
+ def marketplace_item(
1183
+ self,
1184
+ *,
1185
+ options: RequestOptions | None = None,
1186
+ **input: Unpack[FacebookMarketplaceItemInput],
1187
+ ) -> RunResult[FacebookMarketplaceItemData]:
1188
+ """Facebook Marketplace Item
1189
+
1190
+ Fetch full details for a single Facebook Marketplace listing by ID or URL -
1191
+ title, price, location, photos, and attributes - as normalized JSON at a
1192
+ flat USD price per request.
1193
+
1194
+ Price: $0.002 per request.
1195
+
1196
+ Example:
1197
+ res = client.facebook.marketplace_item(url="https://www.facebook.com/marketplace/item/1656586118821988/")
1198
+ """
1199
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
1200
+ "facebook.marketplace_item", dict(input), options
1201
+ )
1202
+ return RunResult[FacebookMarketplaceItemData].model_validate(raw)
1203
+
1204
+ def marketplace_location_search(
1205
+ self,
1206
+ *,
1207
+ options: RequestOptions | None = None,
1208
+ **input: Unpack[FacebookMarketplaceLocationSearchInput],
1209
+ ) -> RunResult[FacebookMarketplaceLocationSearchData]:
1210
+ """Facebook Marketplace Location Search
1211
+
1212
+ Resolve a place name to Facebook Marketplace locations with coordinates and
1213
+ metadata as normalized JSON at a flat USD price per request.
1214
+
1215
+ Price: $0.002 per request.
1216
+
1217
+ Example:
1218
+ res = client.facebook.marketplace_location_search(query="Austin")
1219
+ """
1220
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
1221
+ "facebook.marketplace_location_search", dict(input), options
1222
+ )
1223
+ return RunResult[FacebookMarketplaceLocationSearchData].model_validate(raw)
1224
+
1225
+ def page_contact(
1226
+ self,
1227
+ *,
1228
+ options: RequestOptions | None = None,
1229
+ **input: Unpack[FacebookPageContactInput],
1230
+ ) -> RunResult[FacebookPageContactData]:
1231
+ """Facebook Page Contact Info
1232
+
1233
+ Look up a Facebook Page's public contact details - email, phone, website,
1234
+ and address - by page URL or ID, with transparent per-request USD pricing.
1235
+
1236
+ Price: $0.002 per request.
1237
+
1238
+ Example:
1239
+ res = client.facebook.page_contact(page="https://www.facebook.com/joesstonecrab")
1240
+ """
1241
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
1242
+ "facebook.page_contact", dict(input), options
1243
+ )
1244
+ return RunResult[FacebookPageContactData].model_validate(raw)
1245
+
1246
+ def photos(
1247
+ self,
1248
+ *,
1249
+ options: RequestOptions | None = None,
1250
+ **input: Unpack[FacebookPhotosInput],
1251
+ ) -> RunResult[FacebookPhotosData]:
1252
+ """Facebook Page Photos
1253
+
1254
+ Fetch recent photos posted by any public Facebook page or profile - image
1255
+ URLs, captions, and dimensions - as normalized JSON at a flat USD price per
1256
+ request.
1257
+
1258
+ Price: $0.002 per request.
1259
+
1260
+ Example:
1261
+ res = client.facebook.photos(url="https://www.facebook.com/Spurs")
1262
+ """
1263
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
1264
+ "facebook.photos", dict(input), options
1265
+ )
1266
+ return RunResult[FacebookPhotosData].model_validate(raw)
1267
+
1268
+ def iter_photos(
1269
+ self,
1270
+ *,
1271
+ options: RequestOptions | None = None,
1272
+ **input: Unpack[FacebookPhotosInput],
1273
+ ) -> Paginator[FacebookPhotosPhoto, FacebookPhotosData]:
1274
+ """Iterate Facebook Page Photos results, following pagination cursors.
1275
+
1276
+ Yields validated `FacebookPhotosPhoto` items from the `photos` field of
1277
+ each page. Use `.pages()` on the returned paginator to walk whole
1278
+ `RunResult` pages.
1279
+ """
1280
+ return paginate(
1281
+ self._client,
1282
+ "facebook.photos",
1283
+ dict(input),
1284
+ "photos",
1285
+ item_model=FacebookPhotosPhoto,
1286
+ data_model=FacebookPhotosData,
1287
+ bare=False,
1288
+ options=options,
1289
+ )
1290
+
1291
+ def post(
1292
+ self,
1293
+ *,
1294
+ options: RequestOptions | None = None,
1295
+ **input: Unpack[FacebookPostInput],
1296
+ ) -> RunResult[FacebookPostData]:
1297
+ """Facebook Post
1298
+
1299
+ Fetch a single Facebook post by URL with its text and engagement counts
1300
+ (likes, comments, shares, views), normalized across providers.
1301
+
1302
+ Price: $0.002 per request.
1303
+
1304
+ Example:
1305
+ res = client.facebook.post(url="https://www.facebook.com/reel/2166091230582141/")
1306
+ """
1307
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
1308
+ "facebook.post", dict(input), options
1309
+ )
1310
+ return RunResult[FacebookPostData].model_validate(raw)
1311
+
1312
+ def post_comments(
1313
+ self,
1314
+ *,
1315
+ options: RequestOptions | None = None,
1316
+ **input: Unpack[FacebookPostCommentsInput],
1317
+ ) -> RunResult[FacebookPostCommentsData]:
1318
+ """Facebook Post Comments
1319
+
1320
+ List the comments on a Facebook post by URL with cursor pagination (text,
1321
+ author, reactions, reply count), normalized across providers.
1322
+
1323
+ Price: $0.002 per request.
1324
+
1325
+ Example:
1326
+ res = client.facebook.post_comments(url="https://www.facebook.com/reel/2166091230582141/")
1327
+ """
1328
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
1329
+ "facebook.post_comments", dict(input), options
1330
+ )
1331
+ return RunResult[FacebookPostCommentsData].model_validate(raw)
1332
+
1333
+ def iter_post_comments(
1334
+ self,
1335
+ *,
1336
+ options: RequestOptions | None = None,
1337
+ **input: Unpack[FacebookPostCommentsInput],
1338
+ ) -> Paginator[FacebookPostCommentsComment, FacebookPostCommentsData]:
1339
+ """Iterate Facebook Post Comments results, following pagination cursors.
1340
+
1341
+ Yields validated `FacebookPostCommentsComment` items from the `comments` field of
1342
+ each page. Use `.pages()` on the returned paginator to walk whole
1343
+ `RunResult` pages.
1344
+ """
1345
+ return paginate(
1346
+ self._client,
1347
+ "facebook.post_comments",
1348
+ dict(input),
1349
+ "comments",
1350
+ item_model=FacebookPostCommentsComment,
1351
+ data_model=FacebookPostCommentsData,
1352
+ bare=False,
1353
+ options=options,
1354
+ )
1355
+
1356
+ def post_transcript(
1357
+ self,
1358
+ *,
1359
+ options: RequestOptions | None = None,
1360
+ **input: Unpack[FacebookPostTranscriptInput],
1361
+ ) -> RunResult[FacebookPostTranscriptData]:
1362
+ """Facebook Post Transcript
1363
+
1364
+ Get the spoken-word transcript of any public Facebook video post by URL as
1365
+ normalized JSON at a flat USD price per request.
1366
+
1367
+ Price: $0.002 per request.
1368
+
1369
+ Example:
1370
+ res = client.facebook.post_transcript(url="https://www.facebook.com/reel/2166091230582141/")
1371
+ """
1372
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
1373
+ "facebook.post_transcript", dict(input), options
1374
+ )
1375
+ return RunResult[FacebookPostTranscriptData].model_validate(raw)
1376
+
1377
+ def profile(
1378
+ self,
1379
+ *,
1380
+ options: RequestOptions | None = None,
1381
+ **input: Unpack[FacebookProfileInput],
1382
+ ) -> RunResult[FacebookProfileData]:
1383
+ """Facebook Profile
1384
+
1385
+ Fetch a Facebook page's public profile (likes, followers, category, about)
1386
+ by URL or handle, normalized across providers.
1387
+
1388
+ Price: $0.002 per request.
1389
+
1390
+ Example:
1391
+ res = client.facebook.profile(url="https://www.facebook.com/nike")
1392
+ """
1393
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
1394
+ "facebook.profile", dict(input), options
1395
+ )
1396
+ return RunResult[FacebookProfileData].model_validate(raw)
1397
+
1398
+ def profile_events(
1399
+ self,
1400
+ *,
1401
+ options: RequestOptions | None = None,
1402
+ **input: Unpack[FacebookProfileEventsInput],
1403
+ ) -> RunResult[FacebookProfileEventsData]:
1404
+ """Facebook Page Events
1405
+
1406
+ List upcoming and past events hosted by any public Facebook page by URL -
1407
+ name, schedule, venue, and host - as normalized JSON at a flat USD price per
1408
+ request.
1409
+
1410
+ Price: $0.002 per request.
1411
+
1412
+ Example:
1413
+ res = client.facebook.profile_events(url="https://www.facebook.com/brickyardoldtown")
1414
+ """
1415
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
1416
+ "facebook.profile_events", dict(input), options
1417
+ )
1418
+ return RunResult[FacebookProfileEventsData].model_validate(raw)
1419
+
1420
+ def iter_profile_events(
1421
+ self,
1422
+ *,
1423
+ options: RequestOptions | None = None,
1424
+ **input: Unpack[FacebookProfileEventsInput],
1425
+ ) -> Paginator[FacebookProfileEventsEvent, FacebookProfileEventsData]:
1426
+ """Iterate Facebook Page Events results, following pagination cursors.
1427
+
1428
+ Yields validated `FacebookProfileEventsEvent` items from the `events` field of
1429
+ each page. Use `.pages()` on the returned paginator to walk whole
1430
+ `RunResult` pages.
1431
+ """
1432
+ return paginate(
1433
+ self._client,
1434
+ "facebook.profile_events",
1435
+ dict(input),
1436
+ "events",
1437
+ item_model=FacebookProfileEventsEvent,
1438
+ data_model=FacebookProfileEventsData,
1439
+ bare=False,
1440
+ options=options,
1441
+ )
1442
+
1443
+ def profile_posts(
1444
+ self,
1445
+ *,
1446
+ options: RequestOptions | None = None,
1447
+ **input: Unpack[FacebookProfilePostsInput],
1448
+ ) -> RunResult[FacebookProfilePostsData]:
1449
+ """Facebook Profile Posts
1450
+
1451
+ List a Facebook page's recent posts by URL or page id with cursor pagination
1452
+ (text, author, permalink), normalized across providers.
1453
+
1454
+ Price: $0.002 per request.
1455
+
1456
+ Example:
1457
+ res = client.facebook.profile_posts(url="https://www.facebook.com/nike")
1458
+ """
1459
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
1460
+ "facebook.profile_posts", dict(input), options
1461
+ )
1462
+ return RunResult[FacebookProfilePostsData].model_validate(raw)
1463
+
1464
+ def profile_reels(
1465
+ self,
1466
+ *,
1467
+ options: RequestOptions | None = None,
1468
+ **input: Unpack[FacebookProfileReelsInput],
1469
+ ) -> RunResult[FacebookProfileReelsData]:
1470
+ """Facebook Profile Reels
1471
+
1472
+ List a Facebook page's reels by URL with cursor pagination (caption, view
1473
+ count, permalink, thumbnail), normalized across providers.
1474
+
1475
+ Price: $0.002 per request.
1476
+
1477
+ Example:
1478
+ res = client.facebook.profile_reels(url="https://www.facebook.com/nike")
1479
+ """
1480
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
1481
+ "facebook.profile_reels", dict(input), options
1482
+ )
1483
+ return RunResult[FacebookProfileReelsData].model_validate(raw)
1484
+
1485
+ def search_companies(
1486
+ self,
1487
+ *,
1488
+ options: RequestOptions | None = None,
1489
+ **input: Unpack[FacebookSearchCompaniesInput],
1490
+ ) -> RunResult[FacebookSearchCompaniesData]:
1491
+ """Facebook Company Search
1492
+
1493
+ Search the Meta Ad Library for advertisers by keyword and get matching pages
1494
+ - page ID, category, verification, follower counts, and linked Instagram -
1495
+ billed per request in USD.
1496
+
1497
+ Price: $0.002 per request.
1498
+
1499
+ Example:
1500
+ res = client.facebook.search_companies(query="nike")
1501
+ """
1502
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
1503
+ "facebook.search_companies", dict(input), options
1504
+ )
1505
+ return RunResult[FacebookSearchCompaniesData].model_validate(raw)
1506
+
1507
+ def search_pages(
1508
+ self,
1509
+ *,
1510
+ options: RequestOptions | None = None,
1511
+ **input: Unpack[FacebookSearchPagesInput],
1512
+ ) -> RunResult[FacebookSearchPagesData]:
1513
+ """Facebook Page Search
1514
+
1515
+ Search Facebook Pages by keyword, optionally narrowed to a location, and get
1516
+ structured page profiles (name, category, followers, contact details) at a
1517
+ flat USD price per request.
1518
+
1519
+ Price: $0.001 per request plus $0.011 per result.
1520
+
1521
+ Example:
1522
+ res = client.facebook.search_pages(limit=3, query="nike")
1523
+ """
1524
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
1525
+ "facebook.search_pages", dict(input), options
1526
+ )
1527
+ return RunResult[FacebookSearchPagesData].model_validate(raw)
1528
+
1529
+ def search_posts(
1530
+ self,
1531
+ *,
1532
+ options: RequestOptions | None = None,
1533
+ **input: Unpack[FacebookSearchPostsInput],
1534
+ ) -> RunResult[FacebookSearchPostsData]:
1535
+ """Facebook Post Search
1536
+
1537
+ Search public Facebook posts by keyword, optionally filtered by location,
1538
+ and get structured post records (text, author, engagement) with transparent
1539
+ per-request USD pricing.
1540
+
1541
+ Price: $0.003 per result.
1542
+
1543
+ Example:
1544
+ res = client.facebook.search_posts(limit=3, query="nike")
1545
+ """
1546
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
1547
+ "facebook.search_posts", dict(input), options
1548
+ )
1549
+ return RunResult[FacebookSearchPostsData].model_validate(raw)
1550
+
1551
+
1552
+ class AsyncFacebookNamespace:
1553
+ """Typed methods for this platform. Attached lazily to the client."""
1554
+
1555
+ def __init__(self, client: "AsyncAnyAPI") -> None:
1556
+ self._client = client
1557
+
1558
+ async def ad_details(
1559
+ self,
1560
+ *,
1561
+ options: RequestOptions | None = None,
1562
+ **input: Unpack[FacebookAdDetailsInput],
1563
+ ) -> RunResult[FacebookAdDetailsData]:
1564
+ """Facebook Ad Details
1565
+
1566
+ Look up a single Meta Ad Library ad by ID or URL and get the advertiser,
1567
+ creative text, call-to-action, platforms, and run dates as clean JSON,
1568
+ billed per request in USD.
1569
+
1570
+ Price: $0.002 per request.
1571
+
1572
+ Example:
1573
+ res = client.facebook.ad_details(id="1869276447125570")
1574
+ """
1575
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
1576
+ "facebook.ad_details", dict(input), options
1577
+ )
1578
+ return RunResult[FacebookAdDetailsData].model_validate(raw)
1579
+
1580
+ async def ad_transcript(
1581
+ self,
1582
+ *,
1583
+ options: RequestOptions | None = None,
1584
+ **input: Unpack[FacebookAdTranscriptInput],
1585
+ ) -> RunResult[FacebookAdTranscriptData]:
1586
+ """Facebook Ad Transcript
1587
+
1588
+ Get the spoken-word transcript of a Meta Ad Library video ad by ad ID or
1589
+ URL, billed per request in USD.
1590
+
1591
+ Price: $0.002 per request.
1592
+
1593
+ Example:
1594
+ res = client.facebook.ad_transcript(id="931919822778200")
1595
+ """
1596
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
1597
+ "facebook.ad_transcript", dict(input), options
1598
+ )
1599
+ return RunResult[FacebookAdTranscriptData].model_validate(raw)
1600
+
1601
+ async def ads_search(
1602
+ self,
1603
+ *,
1604
+ options: RequestOptions | None = None,
1605
+ **input: Unpack[FacebookAdsSearchInput],
1606
+ ) -> RunResult[FacebookAdsSearchData]:
1607
+ """Facebook Ad Search
1608
+
1609
+ Search the Meta Ad Library by keyword and get matching ads - advertiser,
1610
+ creative text, CTA, platforms, and run dates - with cursor pagination and
1611
+ transparent failover.
1612
+
1613
+ Price: $0.002 per request.
1614
+
1615
+ Example:
1616
+ res = client.facebook.ads_search(country="US", query="nike")
1617
+ """
1618
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
1619
+ "facebook.ads_search", dict(input), options
1620
+ )
1621
+ return RunResult[FacebookAdsSearchData].model_validate(raw)
1622
+
1623
+ def iter_ads_search(
1624
+ self,
1625
+ *,
1626
+ options: RequestOptions | None = None,
1627
+ **input: Unpack[FacebookAdsSearchInput],
1628
+ ) -> AsyncPaginator[FacebookAdsSearchAd, FacebookAdsSearchData]:
1629
+ """Iterate Facebook Ad Search results, following pagination cursors.
1630
+
1631
+ Yields validated `FacebookAdsSearchAd` items from the `ads` field of
1632
+ each page. Use `.pages()` on the returned paginator to walk whole
1633
+ `RunResult` pages.
1634
+ """
1635
+ return apaginate(
1636
+ self._client,
1637
+ "facebook.ads_search",
1638
+ dict(input),
1639
+ "ads",
1640
+ item_model=FacebookAdsSearchAd,
1641
+ data_model=FacebookAdsSearchData,
1642
+ bare=False,
1643
+ options=options,
1644
+ )
1645
+
1646
+ async def comment_replies(
1647
+ self,
1648
+ *,
1649
+ options: RequestOptions | None = None,
1650
+ **input: Unpack[FacebookCommentRepliesInput],
1651
+ ) -> RunResult[FacebookCommentRepliesData]:
1652
+ """Facebook Comment Replies
1653
+
1654
+ List the replies to a Facebook post comment - text, author, reactions, and
1655
+ timestamps - as normalized JSON at a flat USD price per request.
1656
+
1657
+ Price: $0.002 per request.
1658
+
1659
+ Example:
1660
+ res = client.facebook.comment_replies(expansionToken="MjoxNzgzMjI4OTY4OgF_o5zrjDnpemv4bwPtpsShXutqvKIw2bKs2YuJksL1Ak8n8YG-_KPSQGkIks5oW6wdRfhb_cRv9q5OX0NHjFJwEupYNZi9pcMV-FYLWLp47u-eusMkZFOMwbkISsTln7gtSvQrOzlffyavOTIL85PECYzGfunU2IAEkd13CIikxu06Mw10UJ1ShcFAmz8175R1uJfYy_iOixWZukqfrWhUfVOXApXznxx7qXvUxPwct76qe6p7-nVWQrPC_SZc2xh9Z8ggL3WMjgTzSq4oWFSsyZuuVsyVVjSgdjRQiDqtJSeEUlSjTr6vOnKsvKV-GpnBRaeA0BCaNRhqpB4xDZoduBuO5ZYrFvWLJdJLryDhCPI2Ss-Z33cEM2Vz7pLf1wJzE7TuizXPwICSn1DA_Prca-BItTbOUjAjfiySap1LXYkGuuDC2ziUdiEsmE5XhevMP8XtF_2WQlMNcGbXMEQyAWDUawtPAxXgMeRrCO9YGSweFQ4OZumoIlSGa3Vfjy-euUOHT1IAsNbV2A8rAq4HJNU3jCXQTn0vfW9xvbVQhL-53Mhw2YPjhlvUj6QpnGA25N8", feedbackId="ZmVlZGJhY2s6MTM5MzQ2MTExNTQ4MTkyN18yMDgyNjUzMjQ1ODA5Mzg2")
1661
+ """
1662
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
1663
+ "facebook.comment_replies", dict(input), options
1664
+ )
1665
+ return RunResult[FacebookCommentRepliesData].model_validate(raw)
1666
+
1667
+ def iter_comment_replies(
1668
+ self,
1669
+ *,
1670
+ options: RequestOptions | None = None,
1671
+ **input: Unpack[FacebookCommentRepliesInput],
1672
+ ) -> AsyncPaginator[FacebookCommentRepliesReplie, FacebookCommentRepliesData]:
1673
+ """Iterate Facebook Comment Replies results, following pagination cursors.
1674
+
1675
+ Yields validated `FacebookCommentRepliesReplie` items from the `replies` field of
1676
+ each page. Use `.pages()` on the returned paginator to walk whole
1677
+ `RunResult` pages.
1678
+ """
1679
+ return apaginate(
1680
+ self._client,
1681
+ "facebook.comment_replies",
1682
+ dict(input),
1683
+ "replies",
1684
+ item_model=FacebookCommentRepliesReplie,
1685
+ data_model=FacebookCommentRepliesData,
1686
+ bare=False,
1687
+ options=options,
1688
+ )
1689
+
1690
+ async def company_ads(
1691
+ self,
1692
+ *,
1693
+ options: RequestOptions | None = None,
1694
+ **input: Unpack[FacebookCompanyAdsInput],
1695
+ ) -> RunResult[FacebookCompanyAdsData]:
1696
+ """Facebook Company Ads
1697
+
1698
+ List the Meta Ad Library ads a company is running by page ID or company name
1699
+ - creative text, format, platforms, and run dates - with cursor pagination,
1700
+ billed per request in USD.
1701
+
1702
+ Price: $0.002 per request.
1703
+
1704
+ Example:
1705
+ res = client.facebook.company_ads(companyName="nike")
1706
+ """
1707
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
1708
+ "facebook.company_ads", dict(input), options
1709
+ )
1710
+ return RunResult[FacebookCompanyAdsData].model_validate(raw)
1711
+
1712
+ def iter_company_ads(
1713
+ self,
1714
+ *,
1715
+ options: RequestOptions | None = None,
1716
+ **input: Unpack[FacebookCompanyAdsInput],
1717
+ ) -> AsyncPaginator[FacebookCompanyAdsAd, FacebookCompanyAdsData]:
1718
+ """Iterate Facebook Company Ads results, following pagination cursors.
1719
+
1720
+ Yields validated `FacebookCompanyAdsAd` items from the `ads` field of
1721
+ each page. Use `.pages()` on the returned paginator to walk whole
1722
+ `RunResult` pages.
1723
+ """
1724
+ return apaginate(
1725
+ self._client,
1726
+ "facebook.company_ads",
1727
+ dict(input),
1728
+ "ads",
1729
+ item_model=FacebookCompanyAdsAd,
1730
+ data_model=FacebookCompanyAdsData,
1731
+ bare=False,
1732
+ options=options,
1733
+ )
1734
+
1735
+ async def event_details(
1736
+ self,
1737
+ *,
1738
+ options: RequestOptions | None = None,
1739
+ **input: Unpack[FacebookEventDetailsInput],
1740
+ ) -> RunResult[FacebookEventDetailsData]:
1741
+ """Facebook Event Details
1742
+
1743
+ Fetch full details for a single Facebook event by ID or URL - name,
1744
+ schedule, venue, hosts, and attendance - as normalized JSON at a flat USD
1745
+ price per request.
1746
+
1747
+ Price: $0.002 per request.
1748
+
1749
+ Example:
1750
+ res = client.facebook.event_details(id="4045709448982422")
1751
+ """
1752
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
1753
+ "facebook.event_details", dict(input), options
1754
+ )
1755
+ return RunResult[FacebookEventDetailsData].model_validate(raw)
1756
+
1757
+ async def events(
1758
+ self,
1759
+ *,
1760
+ options: RequestOptions | None = None,
1761
+ **input: Unpack[FacebookEventsInput],
1762
+ ) -> RunResult[FacebookEventsData]:
1763
+ """Facebook Events
1764
+
1765
+ List public Facebook events for a city or place by its events-page URL -
1766
+ event name, date, venue, and attendance - as normalized JSON at a flat USD
1767
+ price per request.
1768
+
1769
+ Price: $0.002 per request.
1770
+
1771
+ Example:
1772
+ res = client.facebook.events(url="https://www.facebook.com/events/explore/saint-petersburg-florida/111326725552547")
1773
+ """
1774
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
1775
+ "facebook.events", dict(input), options
1776
+ )
1777
+ return RunResult[FacebookEventsData].model_validate(raw)
1778
+
1779
+ def iter_events(
1780
+ self,
1781
+ *,
1782
+ options: RequestOptions | None = None,
1783
+ **input: Unpack[FacebookEventsInput],
1784
+ ) -> AsyncPaginator[FacebookEventsEvent, FacebookEventsData]:
1785
+ """Iterate Facebook Events results, following pagination cursors.
1786
+
1787
+ Yields validated `FacebookEventsEvent` items from the `events` field of
1788
+ each page. Use `.pages()` on the returned paginator to walk whole
1789
+ `RunResult` pages.
1790
+ """
1791
+ return apaginate(
1792
+ self._client,
1793
+ "facebook.events",
1794
+ dict(input),
1795
+ "events",
1796
+ item_model=FacebookEventsEvent,
1797
+ data_model=FacebookEventsData,
1798
+ bare=False,
1799
+ options=options,
1800
+ )
1801
+
1802
+ async def events_search(
1803
+ self,
1804
+ *,
1805
+ options: RequestOptions | None = None,
1806
+ **input: Unpack[FacebookEventsSearchInput],
1807
+ ) -> RunResult[FacebookEventsSearchData]:
1808
+ """Facebook Events Search
1809
+
1810
+ Search public Facebook events by keyword and get structured event records -
1811
+ name, schedule, venue, pricing, and attendance - as normalized JSON at a
1812
+ flat USD price per request.
1813
+
1814
+ Price: $0.002 per request.
1815
+
1816
+ Example:
1817
+ res = client.facebook.events_search(query="music festival")
1818
+ """
1819
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
1820
+ "facebook.events_search", dict(input), options
1821
+ )
1822
+ return RunResult[FacebookEventsSearchData].model_validate(raw)
1823
+
1824
+ def iter_events_search(
1825
+ self,
1826
+ *,
1827
+ options: RequestOptions | None = None,
1828
+ **input: Unpack[FacebookEventsSearchInput],
1829
+ ) -> AsyncPaginator[FacebookEventsSearchEvent, FacebookEventsSearchData]:
1830
+ """Iterate Facebook Events Search results, following pagination cursors.
1831
+
1832
+ Yields validated `FacebookEventsSearchEvent` items from the `events` field of
1833
+ each page. Use `.pages()` on the returned paginator to walk whole
1834
+ `RunResult` pages.
1835
+ """
1836
+ return apaginate(
1837
+ self._client,
1838
+ "facebook.events_search",
1839
+ dict(input),
1840
+ "events",
1841
+ item_model=FacebookEventsSearchEvent,
1842
+ data_model=FacebookEventsSearchData,
1843
+ bare=False,
1844
+ options=options,
1845
+ )
1846
+
1847
+ async def followers(
1848
+ self,
1849
+ *,
1850
+ options: RequestOptions | None = None,
1851
+ **input: Unpack[FacebookFollowersInput],
1852
+ ) -> RunResult[FacebookFollowersData]:
1853
+ """Facebook Followers
1854
+
1855
+ List the public followers - or accounts followed - of any Facebook page or
1856
+ profile URL as normalized JSON records, priced per request in USD.
1857
+
1858
+ Price: $0.006 per result.
1859
+
1860
+ Example:
1861
+ res = client.facebook.followers(limit=3, url="https://www.facebook.com/nike")
1862
+ """
1863
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
1864
+ "facebook.followers", dict(input), options
1865
+ )
1866
+ return RunResult[FacebookFollowersData].model_validate(raw)
1867
+
1868
+ async def group_posts(
1869
+ self,
1870
+ *,
1871
+ options: RequestOptions | None = None,
1872
+ **input: Unpack[FacebookGroupPostsInput],
1873
+ ) -> RunResult[FacebookGroupPostsData]:
1874
+ """Facebook Group Posts
1875
+
1876
+ Fetch recent posts from any public Facebook group by URL - text, author,
1877
+ reactions, and comment counts - at a flat per-request USD price.
1878
+
1879
+ Price: $0.002 per request.
1880
+
1881
+ Example:
1882
+ res = client.facebook.group_posts(url="https://www.facebook.com/groups/1270525996445602/")
1883
+ """
1884
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
1885
+ "facebook.group_posts", dict(input), options
1886
+ )
1887
+ return RunResult[FacebookGroupPostsData].model_validate(raw)
1888
+
1889
+ def iter_group_posts(
1890
+ self,
1891
+ *,
1892
+ options: RequestOptions | None = None,
1893
+ **input: Unpack[FacebookGroupPostsInput],
1894
+ ) -> AsyncPaginator[FacebookGroupPostsPost, FacebookGroupPostsData]:
1895
+ """Iterate Facebook Group Posts results, following pagination cursors.
1896
+
1897
+ Yields validated `FacebookGroupPostsPost` items from the `posts` field of
1898
+ each page. Use `.pages()` on the returned paginator to walk whole
1899
+ `RunResult` pages.
1900
+ """
1901
+ return apaginate(
1902
+ self._client,
1903
+ "facebook.group_posts",
1904
+ dict(input),
1905
+ "posts",
1906
+ item_model=FacebookGroupPostsPost,
1907
+ data_model=FacebookGroupPostsData,
1908
+ bare=False,
1909
+ options=options,
1910
+ )
1911
+
1912
+ async def marketplace(
1913
+ self,
1914
+ *,
1915
+ options: RequestOptions | None = None,
1916
+ **input: Unpack[FacebookMarketplaceInput],
1917
+ ) -> RunResult[FacebookMarketplaceData]:
1918
+ """Facebook Marketplace
1919
+
1920
+ Search Facebook Marketplace listings by keyword near a location - title,
1921
+ price, location, and image - as normalized JSON at a flat USD price per
1922
+ request.
1923
+
1924
+ Price: $0.002 per request.
1925
+
1926
+ Example:
1927
+ res = client.facebook.marketplace(lat="30.2677", lng="-97.7475", query="bike")
1928
+ """
1929
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
1930
+ "facebook.marketplace", dict(input), options
1931
+ )
1932
+ return RunResult[FacebookMarketplaceData].model_validate(raw)
1933
+
1934
+ def iter_marketplace(
1935
+ self,
1936
+ *,
1937
+ options: RequestOptions | None = None,
1938
+ **input: Unpack[FacebookMarketplaceInput],
1939
+ ) -> AsyncPaginator[FacebookMarketplaceListing, FacebookMarketplaceData]:
1940
+ """Iterate Facebook Marketplace results, following pagination cursors.
1941
+
1942
+ Yields validated `FacebookMarketplaceListing` items from the `listings` field of
1943
+ each page. Use `.pages()` on the returned paginator to walk whole
1944
+ `RunResult` pages.
1945
+ """
1946
+ return apaginate(
1947
+ self._client,
1948
+ "facebook.marketplace",
1949
+ dict(input),
1950
+ "listings",
1951
+ item_model=FacebookMarketplaceListing,
1952
+ data_model=FacebookMarketplaceData,
1953
+ bare=False,
1954
+ options=options,
1955
+ )
1956
+
1957
+ async def marketplace_item(
1958
+ self,
1959
+ *,
1960
+ options: RequestOptions | None = None,
1961
+ **input: Unpack[FacebookMarketplaceItemInput],
1962
+ ) -> RunResult[FacebookMarketplaceItemData]:
1963
+ """Facebook Marketplace Item
1964
+
1965
+ Fetch full details for a single Facebook Marketplace listing by ID or URL -
1966
+ title, price, location, photos, and attributes - as normalized JSON at a
1967
+ flat USD price per request.
1968
+
1969
+ Price: $0.002 per request.
1970
+
1971
+ Example:
1972
+ res = client.facebook.marketplace_item(url="https://www.facebook.com/marketplace/item/1656586118821988/")
1973
+ """
1974
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
1975
+ "facebook.marketplace_item", dict(input), options
1976
+ )
1977
+ return RunResult[FacebookMarketplaceItemData].model_validate(raw)
1978
+
1979
+ async def marketplace_location_search(
1980
+ self,
1981
+ *,
1982
+ options: RequestOptions | None = None,
1983
+ **input: Unpack[FacebookMarketplaceLocationSearchInput],
1984
+ ) -> RunResult[FacebookMarketplaceLocationSearchData]:
1985
+ """Facebook Marketplace Location Search
1986
+
1987
+ Resolve a place name to Facebook Marketplace locations with coordinates and
1988
+ metadata as normalized JSON at a flat USD price per request.
1989
+
1990
+ Price: $0.002 per request.
1991
+
1992
+ Example:
1993
+ res = client.facebook.marketplace_location_search(query="Austin")
1994
+ """
1995
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
1996
+ "facebook.marketplace_location_search", dict(input), options
1997
+ )
1998
+ return RunResult[FacebookMarketplaceLocationSearchData].model_validate(raw)
1999
+
2000
+ async def page_contact(
2001
+ self,
2002
+ *,
2003
+ options: RequestOptions | None = None,
2004
+ **input: Unpack[FacebookPageContactInput],
2005
+ ) -> RunResult[FacebookPageContactData]:
2006
+ """Facebook Page Contact Info
2007
+
2008
+ Look up a Facebook Page's public contact details - email, phone, website,
2009
+ and address - by page URL or ID, with transparent per-request USD pricing.
2010
+
2011
+ Price: $0.002 per request.
2012
+
2013
+ Example:
2014
+ res = client.facebook.page_contact(page="https://www.facebook.com/joesstonecrab")
2015
+ """
2016
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
2017
+ "facebook.page_contact", dict(input), options
2018
+ )
2019
+ return RunResult[FacebookPageContactData].model_validate(raw)
2020
+
2021
+ async def photos(
2022
+ self,
2023
+ *,
2024
+ options: RequestOptions | None = None,
2025
+ **input: Unpack[FacebookPhotosInput],
2026
+ ) -> RunResult[FacebookPhotosData]:
2027
+ """Facebook Page Photos
2028
+
2029
+ Fetch recent photos posted by any public Facebook page or profile - image
2030
+ URLs, captions, and dimensions - as normalized JSON at a flat USD price per
2031
+ request.
2032
+
2033
+ Price: $0.002 per request.
2034
+
2035
+ Example:
2036
+ res = client.facebook.photos(url="https://www.facebook.com/Spurs")
2037
+ """
2038
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
2039
+ "facebook.photos", dict(input), options
2040
+ )
2041
+ return RunResult[FacebookPhotosData].model_validate(raw)
2042
+
2043
+ def iter_photos(
2044
+ self,
2045
+ *,
2046
+ options: RequestOptions | None = None,
2047
+ **input: Unpack[FacebookPhotosInput],
2048
+ ) -> AsyncPaginator[FacebookPhotosPhoto, FacebookPhotosData]:
2049
+ """Iterate Facebook Page Photos results, following pagination cursors.
2050
+
2051
+ Yields validated `FacebookPhotosPhoto` items from the `photos` field of
2052
+ each page. Use `.pages()` on the returned paginator to walk whole
2053
+ `RunResult` pages.
2054
+ """
2055
+ return apaginate(
2056
+ self._client,
2057
+ "facebook.photos",
2058
+ dict(input),
2059
+ "photos",
2060
+ item_model=FacebookPhotosPhoto,
2061
+ data_model=FacebookPhotosData,
2062
+ bare=False,
2063
+ options=options,
2064
+ )
2065
+
2066
+ async def post(
2067
+ self,
2068
+ *,
2069
+ options: RequestOptions | None = None,
2070
+ **input: Unpack[FacebookPostInput],
2071
+ ) -> RunResult[FacebookPostData]:
2072
+ """Facebook Post
2073
+
2074
+ Fetch a single Facebook post by URL with its text and engagement counts
2075
+ (likes, comments, shares, views), normalized across providers.
2076
+
2077
+ Price: $0.002 per request.
2078
+
2079
+ Example:
2080
+ res = client.facebook.post(url="https://www.facebook.com/reel/2166091230582141/")
2081
+ """
2082
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
2083
+ "facebook.post", dict(input), options
2084
+ )
2085
+ return RunResult[FacebookPostData].model_validate(raw)
2086
+
2087
+ async def post_comments(
2088
+ self,
2089
+ *,
2090
+ options: RequestOptions | None = None,
2091
+ **input: Unpack[FacebookPostCommentsInput],
2092
+ ) -> RunResult[FacebookPostCommentsData]:
2093
+ """Facebook Post Comments
2094
+
2095
+ List the comments on a Facebook post by URL with cursor pagination (text,
2096
+ author, reactions, reply count), normalized across providers.
2097
+
2098
+ Price: $0.002 per request.
2099
+
2100
+ Example:
2101
+ res = client.facebook.post_comments(url="https://www.facebook.com/reel/2166091230582141/")
2102
+ """
2103
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
2104
+ "facebook.post_comments", dict(input), options
2105
+ )
2106
+ return RunResult[FacebookPostCommentsData].model_validate(raw)
2107
+
2108
+ def iter_post_comments(
2109
+ self,
2110
+ *,
2111
+ options: RequestOptions | None = None,
2112
+ **input: Unpack[FacebookPostCommentsInput],
2113
+ ) -> AsyncPaginator[FacebookPostCommentsComment, FacebookPostCommentsData]:
2114
+ """Iterate Facebook Post Comments results, following pagination cursors.
2115
+
2116
+ Yields validated `FacebookPostCommentsComment` items from the `comments` field of
2117
+ each page. Use `.pages()` on the returned paginator to walk whole
2118
+ `RunResult` pages.
2119
+ """
2120
+ return apaginate(
2121
+ self._client,
2122
+ "facebook.post_comments",
2123
+ dict(input),
2124
+ "comments",
2125
+ item_model=FacebookPostCommentsComment,
2126
+ data_model=FacebookPostCommentsData,
2127
+ bare=False,
2128
+ options=options,
2129
+ )
2130
+
2131
+ async def post_transcript(
2132
+ self,
2133
+ *,
2134
+ options: RequestOptions | None = None,
2135
+ **input: Unpack[FacebookPostTranscriptInput],
2136
+ ) -> RunResult[FacebookPostTranscriptData]:
2137
+ """Facebook Post Transcript
2138
+
2139
+ Get the spoken-word transcript of any public Facebook video post by URL as
2140
+ normalized JSON at a flat USD price per request.
2141
+
2142
+ Price: $0.002 per request.
2143
+
2144
+ Example:
2145
+ res = client.facebook.post_transcript(url="https://www.facebook.com/reel/2166091230582141/")
2146
+ """
2147
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
2148
+ "facebook.post_transcript", dict(input), options
2149
+ )
2150
+ return RunResult[FacebookPostTranscriptData].model_validate(raw)
2151
+
2152
+ async def profile(
2153
+ self,
2154
+ *,
2155
+ options: RequestOptions | None = None,
2156
+ **input: Unpack[FacebookProfileInput],
2157
+ ) -> RunResult[FacebookProfileData]:
2158
+ """Facebook Profile
2159
+
2160
+ Fetch a Facebook page's public profile (likes, followers, category, about)
2161
+ by URL or handle, normalized across providers.
2162
+
2163
+ Price: $0.002 per request.
2164
+
2165
+ Example:
2166
+ res = client.facebook.profile(url="https://www.facebook.com/nike")
2167
+ """
2168
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
2169
+ "facebook.profile", dict(input), options
2170
+ )
2171
+ return RunResult[FacebookProfileData].model_validate(raw)
2172
+
2173
+ async def profile_events(
2174
+ self,
2175
+ *,
2176
+ options: RequestOptions | None = None,
2177
+ **input: Unpack[FacebookProfileEventsInput],
2178
+ ) -> RunResult[FacebookProfileEventsData]:
2179
+ """Facebook Page Events
2180
+
2181
+ List upcoming and past events hosted by any public Facebook page by URL -
2182
+ name, schedule, venue, and host - as normalized JSON at a flat USD price per
2183
+ request.
2184
+
2185
+ Price: $0.002 per request.
2186
+
2187
+ Example:
2188
+ res = client.facebook.profile_events(url="https://www.facebook.com/brickyardoldtown")
2189
+ """
2190
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
2191
+ "facebook.profile_events", dict(input), options
2192
+ )
2193
+ return RunResult[FacebookProfileEventsData].model_validate(raw)
2194
+
2195
+ def iter_profile_events(
2196
+ self,
2197
+ *,
2198
+ options: RequestOptions | None = None,
2199
+ **input: Unpack[FacebookProfileEventsInput],
2200
+ ) -> AsyncPaginator[FacebookProfileEventsEvent, FacebookProfileEventsData]:
2201
+ """Iterate Facebook Page Events results, following pagination cursors.
2202
+
2203
+ Yields validated `FacebookProfileEventsEvent` items from the `events` field of
2204
+ each page. Use `.pages()` on the returned paginator to walk whole
2205
+ `RunResult` pages.
2206
+ """
2207
+ return apaginate(
2208
+ self._client,
2209
+ "facebook.profile_events",
2210
+ dict(input),
2211
+ "events",
2212
+ item_model=FacebookProfileEventsEvent,
2213
+ data_model=FacebookProfileEventsData,
2214
+ bare=False,
2215
+ options=options,
2216
+ )
2217
+
2218
+ async def profile_posts(
2219
+ self,
2220
+ *,
2221
+ options: RequestOptions | None = None,
2222
+ **input: Unpack[FacebookProfilePostsInput],
2223
+ ) -> RunResult[FacebookProfilePostsData]:
2224
+ """Facebook Profile Posts
2225
+
2226
+ List a Facebook page's recent posts by URL or page id with cursor pagination
2227
+ (text, author, permalink), normalized across providers.
2228
+
2229
+ Price: $0.002 per request.
2230
+
2231
+ Example:
2232
+ res = client.facebook.profile_posts(url="https://www.facebook.com/nike")
2233
+ """
2234
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
2235
+ "facebook.profile_posts", dict(input), options
2236
+ )
2237
+ return RunResult[FacebookProfilePostsData].model_validate(raw)
2238
+
2239
+ async def profile_reels(
2240
+ self,
2241
+ *,
2242
+ options: RequestOptions | None = None,
2243
+ **input: Unpack[FacebookProfileReelsInput],
2244
+ ) -> RunResult[FacebookProfileReelsData]:
2245
+ """Facebook Profile Reels
2246
+
2247
+ List a Facebook page's reels by URL with cursor pagination (caption, view
2248
+ count, permalink, thumbnail), normalized across providers.
2249
+
2250
+ Price: $0.002 per request.
2251
+
2252
+ Example:
2253
+ res = client.facebook.profile_reels(url="https://www.facebook.com/nike")
2254
+ """
2255
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
2256
+ "facebook.profile_reels", dict(input), options
2257
+ )
2258
+ return RunResult[FacebookProfileReelsData].model_validate(raw)
2259
+
2260
+ async def search_companies(
2261
+ self,
2262
+ *,
2263
+ options: RequestOptions | None = None,
2264
+ **input: Unpack[FacebookSearchCompaniesInput],
2265
+ ) -> RunResult[FacebookSearchCompaniesData]:
2266
+ """Facebook Company Search
2267
+
2268
+ Search the Meta Ad Library for advertisers by keyword and get matching pages
2269
+ - page ID, category, verification, follower counts, and linked Instagram -
2270
+ billed per request in USD.
2271
+
2272
+ Price: $0.002 per request.
2273
+
2274
+ Example:
2275
+ res = client.facebook.search_companies(query="nike")
2276
+ """
2277
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
2278
+ "facebook.search_companies", dict(input), options
2279
+ )
2280
+ return RunResult[FacebookSearchCompaniesData].model_validate(raw)
2281
+
2282
+ async def search_pages(
2283
+ self,
2284
+ *,
2285
+ options: RequestOptions | None = None,
2286
+ **input: Unpack[FacebookSearchPagesInput],
2287
+ ) -> RunResult[FacebookSearchPagesData]:
2288
+ """Facebook Page Search
2289
+
2290
+ Search Facebook Pages by keyword, optionally narrowed to a location, and get
2291
+ structured page profiles (name, category, followers, contact details) at a
2292
+ flat USD price per request.
2293
+
2294
+ Price: $0.001 per request plus $0.011 per result.
2295
+
2296
+ Example:
2297
+ res = client.facebook.search_pages(limit=3, query="nike")
2298
+ """
2299
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
2300
+ "facebook.search_pages", dict(input), options
2301
+ )
2302
+ return RunResult[FacebookSearchPagesData].model_validate(raw)
2303
+
2304
+ async def search_posts(
2305
+ self,
2306
+ *,
2307
+ options: RequestOptions | None = None,
2308
+ **input: Unpack[FacebookSearchPostsInput],
2309
+ ) -> RunResult[FacebookSearchPostsData]:
2310
+ """Facebook Post Search
2311
+
2312
+ Search public Facebook posts by keyword, optionally filtered by location,
2313
+ and get structured post records (text, author, engagement) with transparent
2314
+ per-request USD pricing.
2315
+
2316
+ Price: $0.003 per result.
2317
+
2318
+ Example:
2319
+ res = client.facebook.search_posts(limit=3, query="nike")
2320
+ """
2321
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
2322
+ "facebook.search_posts", dict(input), options
2323
+ )
2324
+ return RunResult[FacebookSearchPostsData].model_validate(raw)