scavio 0.21.0 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,11 +1,10 @@
1
1
  # Scavio
2
2
 
3
- TypeScript SDK for the [Scavio API](https://scavio.dev?utm_source=npm-scavio-js&utm_medium=package&utm_campaign=readme) — real-time web scraping
4
- and data extraction across 36 platforms on one API key, plus `extract()` to read
3
+ TypeScript SDK for the [Scavio API](https://scavio.dev?utm_source=npm-scavio-js&utm_medium=package&utm_campaign=readme) — real-time structured web
4
+ data across 36 platforms on one API key, plus `extract()` to read
5
5
  any URL as clean Markdown.
6
6
 
7
- Structured JSON in, structured JSON out. No proxies, no headless browsers, no
8
- per-site parsers to maintain.
7
+ Structured JSON in, structured JSON out. No per-site parsers to maintain.
9
8
 
10
9
  - **Search and SERP** — Google (organic, news, maps, shopping, flights, hotels, trends, AI Mode)
11
10
  - **E-commerce** — Amazon, Walmart, Costco, Mercado Libre, eBay, Target, Home Depot, TikTok Shop
@@ -93,11 +92,11 @@ Credits depend on `mode`, not on a flat per-call price: `normal` costs 1,
93
92
  `advanced` costs 1, `ultra` costs 2. Billing happens only on a successful
94
93
  extraction — a dead link, bot wall or timeout costs nothing.
95
94
 
96
- - `normal` is a plain datacenter fetch. Start here.
97
- - `advanced` renders the page in a headless browser. Use it when the content is
98
- built client-side.
99
- - `ultra` goes through residential IPs. Use it only when a bot wall blocks the
100
- other two.
95
+ - `normal` is the default. Start here.
96
+ - `advanced` renders the page's JavaScript. Use it when the content is built
97
+ client-side.
98
+ - `ultra` is the hardest-page tier. Use it only when a page blocks the other
99
+ two.
101
100
 
102
101
  `html` is the raw page. `markdown` is a readability extraction with the
103
102
  boilerplate stripped. `text` is that markdown flattened to plain text. URLs are
@@ -169,8 +168,8 @@ silently does nothing.
169
168
 
170
169
  #### Amazon changed in 0.12.0 (breaking)
171
170
 
172
- Amazon moved to a new upstream and the API now returns a normalized shape
173
- instead of the previous raw provider payload.
171
+ The Amazon API now returns a normalized shape instead of the previous raw
172
+ payload.
174
173
 
175
174
  - `search` returns `{query, page, total_results, total_results_text, count, products[], filters[], related_searches[]}`.
176
175
  Each product is `{asin, title, url, image, price, currency, rating, reviews_count, is_sponsored, position, badge, sales_volume, delivery{is_free, date, fastest_date}}`.
@@ -308,12 +307,12 @@ warehouses on us and 2 per warehouse on ca). The clearance price codes are the
308
307
  member-community decode of Costco shelf prices; Costco does not publish them,
309
308
  and only items Costco lists online are covered.
310
309
 
311
- ### Mercado Libre
310
+ ### [Mercado Libre](https://scavio.dev/docs/mercadolibre-search?utm_source=npm-scavio-js&utm_medium=package&utm_campaign=readme)
312
311
 
313
312
  Five endpoints, new in 0.21.0: `reviews` costs 1 credit, the other four 2. The
314
313
  `best-sellers` endpoint is `bestSellers()`. Mexico (`mx`), Brazil (`br`,
315
314
  Mercado Livre), Argentina (`ar`) and Colombia (`co`); prices come back in MXN,
316
- BRL, ARS or COP. Chile is not supported.
315
+ BRL, ARS or COP. Chile is not supported. Docs: [search](https://scavio.dev/docs/mercadolibre-search?utm_source=npm-scavio-js&utm_medium=package&utm_campaign=readme), [product](https://scavio.dev/docs/mercadolibre-product?utm_source=npm-scavio-js&utm_medium=package&utm_campaign=readme), [reviews](https://scavio.dev/docs/mercadolibre-reviews?utm_source=npm-scavio-js&utm_medium=package&utm_campaign=readme), [questions](https://scavio.dev/docs/mercadolibre-questions?utm_source=npm-scavio-js&utm_medium=package&utm_campaign=readme), [best sellers](https://scavio.dev/docs/mercadolibre-best-sellers?utm_source=npm-scavio-js&utm_medium=package&utm_campaign=readme); overview at the [Mercado Libre API](https://scavio.dev/mercadolibre-api?utm_source=npm-scavio-js&utm_medium=package&utm_campaign=readme) page.
317
316
 
318
317
  ```typescript
319
318
  // Keyword search: about 48 rows per page, up to 42 pages.
@@ -357,7 +356,7 @@ nickname, or a listing with no public questions, is a billed 404.
357
356
 
358
357
  ### YouTube
359
358
 
360
- Credit cost varies by endpoint: `transcript` costs 8; `streams` costs 3;
359
+ Credit cost varies by endpoint: `transcript` costs 5; `streams` costs 3;
361
360
  `search` and `shorts` cost 2; every other YouTube endpoint costs 1.
362
361
 
363
362
  ```typescript
@@ -403,6 +402,10 @@ await client.youtube.channelVideos({ channel_id: "UC..." });
403
402
  await client.youtube.channelShorts({ channel_id: "UC..." });
404
403
  await client.youtube.channelCommunity({ channel_id: "UC..." });
405
404
  await client.youtube.channelResolve({ channel: "@mkbhd" }); // handle/URL -> id
405
+
406
+ // One community post (text, author, likes, images, comments_cursor) and its comments
407
+ await client.youtube.communityPost({ post_id: "Ugkx_PqHZYEoCCP7e8WIOrh-1HCvtKoFMzVp" });
408
+ await client.youtube.communityPostComments({ post_id: "Ugkx_PqHZYEoCCP7e8WIOrh-1HCvtKoFMzVp" });
406
409
  ```
407
410
 
408
411
  ### Reddit
@@ -410,7 +413,8 @@ await client.youtube.channelResolve({ channel: "@mkbhd" }); // handle/URL -> id
410
413
  Every Reddit endpoint costs 1 credit.
411
414
 
412
415
  `search()` takes only `query` and `cursor` — there is no result-type or sort
413
- filter upstream, so anything else is dropped server-side. It returns
416
+ filter, so anything else is dropped server-side. `searchComments()` does sort
417
+ (`RELEVANCE`, `HOT`, `TOP` or `NEW`). It returns
414
418
  `data.results` with `next_cursor` and `has_more`. `post()` returns a flat post
415
419
  object under `data` and carries no comments; use `postComments()` for those.
416
420
  The subreddit and user feeds return `data.posts`.
@@ -445,6 +449,10 @@ await client.reddit.userComments({ username: "spez" });
445
449
  // Site-wide popular feed and trending searches
446
450
  await client.reddit.popular();
447
451
  await client.reddit.trending();
452
+
453
+ // Comment search (each result carries its post and subreddit) and subreddit search
454
+ await client.reddit.searchComments({ query: "web scraping api", sort: "NEW" });
455
+ await client.reddit.searchSubreddits({ query: "web scraping" });
448
456
  ```
449
457
 
450
458
  ### X
@@ -468,8 +476,15 @@ await client.x.userFollowings({ screen_name: "elonmusk" });
468
476
 
469
477
  // Trending topics
470
478
  await client.x.trending({ country: "UnitedStates" });
479
+
480
+ // Communities: search, details (rules, member count), and posts
481
+ await client.x.searchCommunities({ keyword: "crypto" });
482
+ await client.x.community({ community_id: "1508567430188126209" });
483
+ await client.x.communityTweets({ community_id: "1508567430188126209", ranking: "Recency" });
471
484
  ```
472
485
 
486
+ Every X endpoint costs 1 credit.
487
+
473
488
  ### LinkedIn
474
489
 
475
490
  ```typescript
@@ -496,9 +511,9 @@ Credit cost varies by endpoint: `job` costs 30; `personPosts`, `companyPosts`,
496
511
  `searchJobs` and `postComments` cost 10 per page; `person`, `personAbout`,
497
512
  `company` and `post` cost 1.
498
513
 
499
- > **Retired endpoints.** The upstream provider withdrew the datasets behind
500
- > `personContact`, `companyPeople`, `companyJobs`, `searchPeople` and
501
- > `searchPosts`. They remain callable but always return HTTP 410 and are never
514
+ > **Retired endpoints.** The LinkedIn data behind `personContact`,
515
+ > `companyPeople`, `companyJobs`, `searchPeople` and `searchPosts` is no longer
516
+ > available. They remain callable but always return HTTP 410 and are never
502
517
  > billed. `company()` returns `featured_employees` (a small sample of staff), and
503
518
  > `searchJobs()` with a company name substitutes for `companyJobs()`.
504
519
 
@@ -542,14 +557,45 @@ await client.tiktok.userFollowers({ sec_user_id: "abc123" });
542
557
 
543
558
  // User followings
544
559
  await client.tiktok.userFollowings({ sec_user_id: "abc123" });
560
+
561
+ // Trending searches and a sample of trending videos (about 6 per call)
562
+ await client.tiktok.trendingSearches();
563
+ await client.tiktok.trendingVideos();
564
+
565
+ // Search autocomplete
566
+ await client.tiktok.searchSuggestions({ keyword: "cooking" });
567
+
568
+ // Sounds: detail, videos using a sound, search, Top 50 / Viral 50 chart
569
+ await client.tiktok.music({ music_id: "7364498342501435408" });
570
+ await client.tiktok.musicVideos({ music_id: "7364498342501435408" });
571
+ await client.tiktok.searchMusic({ keyword: "espresso" });
572
+ await client.tiktok.musicChart({ chart: "viral" });
573
+
574
+ // Similar creators, playlists and the videos in one
575
+ await client.tiktok.userSimilar({ sec_user_id: "abc123" });
576
+ await client.tiktok.userPlaylists({ sec_user_id: "abc123" });
577
+ await client.tiktok.playlistVideos({ playlist_id: "7596415294902389534" });
578
+
579
+ // Live status and account region (region also returns sec_user_id)
580
+ await client.tiktok.userLive({ username: "mrbeast" });
581
+ await client.tiktok.userRegion({ username: "mrbeast" });
545
582
  ```
546
583
 
584
+ Every TikTok endpoint costs 1 credit. The trending, sound, similar, playlist,
585
+ live and region endpoints return TikTok's raw payload: large numeric ids can
586
+ lose precision when parsed as JSON numbers, so use the string forms (`id_str`,
587
+ `sec_uid`, `sec_user_id`). `trendingVideos()` returns about 6 videos per call
588
+ whatever `count` is set to, and `musicVideos()` ignores `count` (about 14 per
589
+ page). Search suggestions can be empty for long-tail keywords and still bill.
590
+ An unknown username is a billed 404 on `userLive()` and an unbilled 404 on
591
+ `userRegion()`.
592
+
547
593
  ### TikTok Shop
548
594
 
549
595
  Every TikTok Shop endpoint costs 1 credit. Two limits to design around:
550
596
 
551
597
  - `product()` resolves only about 44% of the product ids returned by `search()`.
552
- Upstream has no detail data for the rest, so an HTTP 404 is a normal outcome, not an
598
+ TikTok Shop has no detail data for the rest, so an HTTP 404 is a normal outcome, not an
553
599
  error — skip the item instead of retrying. Search to product is not a reliable
554
600
  pipeline. `product()` **throws** `NotFoundError` on that 404 (there is no `data`
555
601
  field in the body to test), so a loop over search ids must catch it:
@@ -561,7 +607,7 @@ Every TikTok Shop endpoint costs 1 credit. Two limits to design around:
561
607
  try {
562
608
  const detail = await client.tiktokShop.product({ product_id: productId });
563
609
  } catch (e) {
564
- if (e instanceof NotFoundError) continue; // no detail upstream; skip
610
+ if (e instanceof NotFoundError) continue; // no detail data; skip
565
611
  throw e;
566
612
  }
567
613
  }
@@ -570,7 +616,7 @@ Every TikTok Shop endpoint costs 1 credit. Two limits to design around:
570
616
  `productReviews()` often works for ids `product()` cannot resolve: of 8 such ids
571
617
  tested, 8 returned HTTP 200 and 7 carried at least one review, so it is a useful
572
618
  fallback source of product detail.
573
- - `product()` does not return a price; upstream masks it on the product page. Exact
619
+ - `product()` does not return a price; TikTok masks it on the product page. Exact
574
620
  prices come from `search()`, `shopProducts()`, and `categoryProducts()`.
575
621
 
576
622
  ```typescript
@@ -613,9 +659,6 @@ Credit cost varies by endpoint, in three tiers:
613
659
  | 8 | `post`, `commentReplies` |
614
660
  | 10 | `profile`, `userReels`, `userTagged`, `userStories`, `postComments`, `searchUsers`, `searchHashtags`, `userFollowers`, `userFollowings` |
615
661
 
616
- The 10-credit endpoints run two upstream providers in parallel and bill both
617
- legs; the 8-credit ones have no fallback leg to hedge against.
618
-
619
662
  ```typescript
620
663
  // User profile
621
664
  await client.instagram.profile({ username: "instagram" });
@@ -647,8 +690,8 @@ await client.instagram.userFollowings({ username: "instagram" });
647
690
  ### Threads
648
691
 
649
692
  Six endpoints, and the credit cost is a function of the body: **2 credits when
650
- you address a user by `user_id`, 4 when you address them by `username`.** The
651
- upstream handle lookup is dead, so a handle buys a second call. Only `profile`,
693
+ you address a user by `user_id`, 4 when you address them by `username`.** A
694
+ handle needs an extra lookup, so it costs a second call. Only `profile`,
652
695
  `userPosts` and `userReplies` are username-keyed; `post`, `postComments` and
653
696
  `searchUsers` always cost 2.
654
697
 
@@ -856,8 +899,8 @@ await client.booking.reviews({ hotel: "the-independente" });
856
899
  1 credit per call. `checkin` and `checkout` must be sent together — Booking
857
900
  ignores a lone check-in and prices its own date range. `hotel` and `reviews`
858
901
  take dates for the same reason: Booking prices a stay, and the response echoes
859
- whichever dates were used. `currency` defaults to USD; without it Booking prices
860
- off the proxy exit and two identical requests disagree. A search with neither
902
+ whichever dates were used. `currency` defaults to USD; without it Booking picks
903
+ a currency itself and two identical requests can disagree. A search with neither
861
904
  `destination` nor `dest_id` returns Booking's homepage and still costs a credit.
862
905
 
863
906
  ### Airbnb
@@ -909,7 +952,7 @@ await client.yelp.reviews({ business_id: "...", page: 2 }); // page 2, not 1
909
952
  ```
910
953
 
911
954
  2 credits per call. `location` is effectively required — without it Yelp
912
- geolocates off the proxy exit and the same request answers about a different
955
+ picks a location itself and the same request can answer about a different
913
956
  metro run to run. **Reviews page 1 is redundant**: it re-fetches the document
914
957
  `business()` already returned and costs another 2 credits, so start at page 2.
915
958
  Page size is fixed at 10 and a page past the last is a 404.
@@ -944,7 +987,7 @@ only exists inside Glassdoor's `/Overview/` URLs.
944
987
  const hits = await client.glassdoor.companies({ query: "Stripe" });
945
988
  const company = await client.glassdoor.company({ employer_id: "671932" });
946
989
 
947
- // Pass the URLs the company response returns - halves the upstream work
990
+ // Pass the URLs the company response returns - saves a lookup
948
991
  await client.glassdoor.reviews({ url: company.reviews_url as string });
949
992
  await client.glassdoor.salaries({ url: company.salaries_url as string });
950
993
  ```
@@ -952,8 +995,8 @@ await client.glassdoor.salaries({ url: company.salaries_url as string });
952
995
  1 credit per call. Glassdoor's login wall caps `reviews` at **three reviews per
953
996
  response** — there is deliberately no `page` param; move the window with
954
997
  `category` and `employment_status` and read `filtered_review_count` to see how
955
- many match. Addressing `reviews` or `salaries` by `employer_id` costs two
956
- upstream fetches because the slugs are case-sensitive and must be read off the
998
+ many match. Addressing `reviews` or `salaries` by `employer_id` needs an
999
+ extra lookup because the slugs are case-sensitive and must be read off the
957
1000
  profile, so prefer the `reviews_url` / `salaries_url` the company response hands
958
1001
  back. These endpoints are slow and flaky by nature (company about 3-47s, reviews
959
1002
  about 75s, salaries about 41s) — raise `timeout` and keep retries on.
@@ -997,9 +1040,9 @@ await client.g2.product({ product_id: "notion" });
997
1040
  await client.g2.reviews({ product_id: "notion", page: 2, company_size: "enterprise" });
998
1041
  ```
999
1042
 
1000
- **5 credits per call — the most expensive platform in the SDK**, because g2.com
1001
- bills 25 upstream credits per fetch. Retries are deliberately conservative for
1002
- that reason, and a bot wall arrives as a billed 200 rather than an error. G2
1043
+ **5 credits per call — the most expensive platform in the SDK.** Retries are
1044
+ deliberately conservative for that reason, and a blocked page arrives as a
1045
+ billed 200 rather than an error. G2
1003
1046
  loads review text in a separate frame, so `product` carries no reviews — call
1004
1047
  `reviews`, which is also the only place with exact per-star counts, pros/cons by
1005
1048
  theme, and company-size / role / industry / region facets.
@@ -1080,9 +1123,9 @@ await client.sec.search({ query: "climate risk", form: "10-K" });
1080
1123
  ```
1081
1124
 
1082
1125
  1 credit per call, including `include_history: true`, which is the one call that
1083
- can buy up to 10 upstream fetches. Both `cik` and `ticker` accept either
1084
- spelling. XBRL concept tags are **case-sensitive** — `netincomeloss` is a 404
1085
- upstream, so use `facts()` to see what a filer actually reports. EDGAR's
1126
+ can take up to 10 lookups. Both `cik` and `ticker` accept either
1127
+ spelling. XBRL concept tags are **case-sensitive** — `netincomeloss` is a 404,
1128
+ so use `facts()` to see what a filer actually reports. EDGAR's
1086
1129
  "recent" block is not a fixed window: a decade for a quiet filer, about a year
1087
1130
  for a prolific one.
1088
1131
 
@@ -1180,7 +1223,7 @@ All error classes:
1180
1223
  | `BadRequestError` | 400, 422 | Invalid request parameters |
1181
1224
  | `InvalidAPIKeyError` | 401 | Invalid API key |
1182
1225
  | `InsufficientCreditsError` | 402 | No credits remaining |
1183
- | `NotFoundError` | 404 | No data upstream for that id (see TikTok Shop above) |
1226
+ | `NotFoundError` | 404 | No data for that id (see TikTok Shop above) |
1184
1227
  | `RateLimitError` | 429 | Rate limit exceeded |
1185
1228
  | `ScavioAPIError` | other | Catch-all (has `.statusCode`) |
1186
1229
 
@@ -1210,7 +1253,7 @@ MIT
1210
1253
 
1211
1254
  [Scavio](https://scavio.dev?utm_source=npm-scavio-js&utm_medium=package&utm_campaign=readme) is a unified web data and
1212
1255
  [search API for AI agents](https://scavio.dev/search-api-for-ai-agents?utm_source=npm-scavio-js&utm_medium=package&utm_campaign=readme) — one API
1213
- key, structured JSON, no proxies or browser farms to run. It is a real-time
1256
+ key, structured JSON. It is a real-time
1214
1257
  [Tavily alternative](https://scavio.dev/alternatives/tavily?utm_source=npm-scavio-js&utm_medium=package&utm_campaign=readme) and
1215
1258
  [SerpAPI alternative](https://scavio.dev/alternatives/serpapi?utm_source=npm-scavio-js&utm_medium=package&utm_campaign=readme), and with
1216
1259
  `extract()` it also covers the read-any-URL job people reach for Firecrawl to do.
package/dist/index.cjs CHANGED
@@ -203,7 +203,7 @@ function parseRetryAfter(header) {
203
203
  var BASE_URL = "https://api.scavio.dev";
204
204
  var DEFAULT_TIMEOUT = 3e4;
205
205
  var DEFAULT_MAX_RETRIES = 2;
206
- var SDK_VERSION = true ? "0.21.0" : "0.0.0";
206
+ var SDK_VERSION = true ? "0.22.0" : "0.0.0";
207
207
  var USER_AGENT = `scavio-js/${SDK_VERSION}`;
208
208
  function isServerRuntime() {
209
209
  const g = globalThis;
@@ -493,6 +493,21 @@ var RedditNamespace = class {
493
493
  async trending() {
494
494
  return this.client._post("/api/v1/reddit/trending", {});
495
495
  }
496
+ /**
497
+ * Search Reddit comments by keyword. Each result carries the comment text,
498
+ * author, score and date, plus the post and subreddit it was left on.
499
+ * Costs 1 credit.
500
+ */
501
+ async searchComments(options) {
502
+ return this.client._post("/api/v1/reddit/search/comments", options);
503
+ }
504
+ /**
505
+ * Find subreddits by keyword, with subscriber counts, descriptions and NSFW
506
+ * flags. Costs 1 credit.
507
+ */
508
+ async searchSubreddits(options) {
509
+ return this.client._post("/api/v1/reddit/search/subreddits", options);
510
+ }
496
511
  };
497
512
 
498
513
  // src/namespaces/tiktok.ts
@@ -534,6 +549,107 @@ var TikTokNamespace = class {
534
549
  async userFollowings(options) {
535
550
  return this.client._post("/api/v1/tiktok/user/followings", options);
536
551
  }
552
+ /**
553
+ * Search terms trending on TikTok now (about 90 per call, US-weighted, no
554
+ * region filter). Costs 1 credit.
555
+ */
556
+ async trendingSearches() {
557
+ return this.client._post("/api/v1/tiktok/trending/searches", {});
558
+ }
559
+ /**
560
+ * A sample of videos trending on TikTok now, with author, stats, sound and
561
+ * hashtags. Each call returns about 6 videos whatever `count` is set to;
562
+ * call again for a fresh sample. No region filter. Costs 1 credit.
563
+ * Returns TikTok's raw payload: large numeric ids can lose precision as JSON
564
+ * numbers, so use the string forms (`id_str`, `sec_uid`).
565
+ */
566
+ async trendingVideos(options = {}) {
567
+ return this.client._post("/api/v1/tiktok/trending/videos", options);
568
+ }
569
+ /**
570
+ * TikTok search autocomplete suggestions for a keyword. Long-tail keywords
571
+ * can return none, which is still a billed answer. Costs 1 credit.
572
+ */
573
+ async searchSuggestions(options) {
574
+ return this.client._post("/api/v1/tiktok/search/suggestions", options);
575
+ }
576
+ /**
577
+ * A TikTok sound by id: title, artist, album, duration, how many videos use
578
+ * it, original vs commercial, play URL, cover, and chart rank when charting.
579
+ * Costs 1 credit.
580
+ * Returns TikTok's raw payload: large numeric ids can lose precision as JSON
581
+ * numbers, so use the string forms (`id_str`, `sec_uid`).
582
+ */
583
+ async music(options) {
584
+ return this.client._post("/api/v1/tiktok/music", options);
585
+ }
586
+ /**
587
+ * Videos that use a TikTok sound, about 14 per page (`count` is ignored
588
+ * upstream). Costs 1 credit.
589
+ * Returns TikTok's raw payload: large numeric ids can lose precision as JSON
590
+ * numbers, so use the string forms (`id_str`, `sec_uid`).
591
+ */
592
+ async musicVideos(options) {
593
+ return this.client._post("/api/v1/tiktok/music/videos", options);
594
+ }
595
+ /**
596
+ * Search TikTok sounds by keyword: id, title, artist, duration, usage count
597
+ * and play URL. Costs 1 credit.
598
+ * Returns TikTok's raw payload: large numeric ids can lose precision as JSON
599
+ * numbers, so use the string forms (`id_str`, `sec_uid`).
600
+ */
601
+ async searchMusic(options) {
602
+ return this.client._post("/api/v1/tiktok/search/music", options);
603
+ }
604
+ /**
605
+ * TikTok's Top 50 or Viral 50 sound chart, with each sound's details and
606
+ * trend. One global chart, no region filter. Costs 1 credit.
607
+ * Returns TikTok's raw payload: large numeric ids can lose precision as JSON
608
+ * numbers, so use the string forms (`id_str`, `sec_uid`).
609
+ */
610
+ async musicChart(options = {}) {
611
+ return this.client._post("/api/v1/tiktok/music/chart", options);
612
+ }
613
+ /**
614
+ * Creators similar to a TikTok user (about 30 per page), with follower,
615
+ * following, video and like counts, bio and verification. Costs 1 credit.
616
+ * Returns TikTok's raw payload: large numeric ids can lose precision as JSON
617
+ * numbers, so use the string forms (`id_str`, `sec_uid`).
618
+ */
619
+ async userSimilar(options) {
620
+ return this.client._post("/api/v1/tiktok/user/similar", options);
621
+ }
622
+ /**
623
+ * A TikTok user's playlists (series): id, name, video count and cover.
624
+ * Accounts without playlists return an empty list. Costs 1 credit.
625
+ */
626
+ async userPlaylists(options) {
627
+ return this.client._post("/api/v1/tiktok/user/playlists", options);
628
+ }
629
+ /**
630
+ * Videos in a TikTok playlist, with pagination. Costs 1 credit.
631
+ * Returns TikTok's raw payload: large numeric ids can lose precision as JSON
632
+ * numbers, so use the string forms (`id_str`, `sec_uid`).
633
+ */
634
+ async playlistVideos(options) {
635
+ return this.client._post("/api/v1/tiktok/playlist/videos", options);
636
+ }
637
+ /**
638
+ * Whether a TikTok user is live now: the user, live room status (2 = live,
639
+ * 4 = not live), title, start time and viewer counts. An unknown username is
640
+ * a billed 404. Costs 1 credit.
641
+ */
642
+ async userLive(options) {
643
+ return this.client._post("/api/v1/tiktok/user/live", options);
644
+ }
645
+ /**
646
+ * The region a TikTok account is registered in (ISO country code, not the
647
+ * creator's nationality), plus its user id and sec_user_id. An unknown
648
+ * username is a 404 and is not billed. Costs 1 credit.
649
+ */
650
+ async userRegion(options) {
651
+ return this.client._post("/api/v1/tiktok/user/region", options);
652
+ }
537
653
  };
538
654
 
539
655
  // src/namespaces/tiktok-shop.ts
@@ -826,6 +942,7 @@ var YouTubeNamespace = class {
826
942
  async commentReplies(options) {
827
943
  return this.client._post("/api/v1/youtube/comments/replies", options);
828
944
  }
945
+ /** Transcript / captions for a YouTube video. Costs 5 credits. */
829
946
  async transcript(options) {
830
947
  return this.client._post("/api/v1/youtube/transcript", options);
831
948
  }
@@ -857,6 +974,21 @@ var YouTubeNamespace = class {
857
974
  async streams(options) {
858
975
  return this.client._post("/api/v1/youtube/streams", options);
859
976
  }
977
+ /**
978
+ * A single YouTube community post: text, author, likes, comment count,
979
+ * attached images, and a comments_cursor for communityPostComments.
980
+ * Costs 1 credit.
981
+ */
982
+ async communityPost(options) {
983
+ return this.client._post("/api/v1/youtube/community/post", options);
984
+ }
985
+ /**
986
+ * Comments on a YouTube community post, with likes, reply counts and
987
+ * pagination. Costs 1 credit.
988
+ */
989
+ async communityPostComments(options) {
990
+ return this.client._post("/api/v1/youtube/community/post/comments", options);
991
+ }
860
992
  };
861
993
 
862
994
  // src/namespaces/x.ts
@@ -898,6 +1030,27 @@ var XNamespace = class {
898
1030
  async trending(options = {}) {
899
1031
  return this.client._post("/api/v1/x/trending", options);
900
1032
  }
1033
+ /**
1034
+ * Find X Communities by keyword, with member counts, topic and NSFW flag.
1035
+ * Costs 1 credit.
1036
+ */
1037
+ async searchCommunities(options) {
1038
+ return this.client._post("/api/v1/x/search/communities", options);
1039
+ }
1040
+ /**
1041
+ * An X Community: name, description, creation date, member count, topic and
1042
+ * rules. Costs 1 credit.
1043
+ */
1044
+ async community(options) {
1045
+ return this.client._post("/api/v1/x/community", options);
1046
+ }
1047
+ /**
1048
+ * Posts in an X Community, by relevance or recency, with pagination.
1049
+ * Costs 1 credit.
1050
+ */
1051
+ async communityTweets(options) {
1052
+ return this.client._post("/api/v1/x/community/tweets", options);
1053
+ }
901
1054
  };
902
1055
 
903
1056
  // src/namespaces/linkedin.ts