@getanyapi/sdk 0.36.0 → 0.37.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/dist/index.cjs CHANGED
@@ -3128,7 +3128,7 @@ var GoogleNamespace = class {
3128
3128
  *
3129
3129
  * Run a Google web search and get the organic results (title, link, snippet, position) as clean JSON. Returns about 10 results per call - Google stopped honoring bulk result counts in September 2025, so a limit above 10 is accepted but returns no more than a page. Pass the returned nextCursor back as cursor to walk further, or use google.search_100 for up to 100 ranked results in one call, which is cheaper past roughly 20 results.
3130
3130
  *
3131
- * Price: $0.00099 per request.
3131
+ * Price: $0.0009 per request.
3132
3132
  *
3133
3133
  * @example
3134
3134
  * const res = await client.google.search({ query: "best coffee maker", gl: "us", hl: "en", limit: 10 });
@@ -3629,7 +3629,7 @@ var InstagramNamespace = class {
3629
3629
  *
3630
3630
  * Fetch a single Instagram post or reel by URL (media URLs, like count, owner, type) as normalized JSON.
3631
3631
  *
3632
- * Price: $0.0009 per request.
3632
+ * Price: $0.0015 per request.
3633
3633
  *
3634
3634
  * @example
3635
3635
  * const res = await client.instagram.post({ url: "https://www.instagram.com/reel/DWzrfE2kaY8/" });
@@ -3642,7 +3642,7 @@ var InstagramNamespace = class {
3642
3642
  *
3643
3643
  * List the comments on an Instagram post or reel by URL with cursor pagination (text, author, likes).
3644
3644
  *
3645
- * Price: $0.0015 per request.
3645
+ * Price: $0.00144 per request.
3646
3646
  *
3647
3647
  * @example
3648
3648
  * const res = await client.instagram.postComments({ url: "https://www.instagram.com/reel/DWzrfE2kaY8/" });
@@ -3734,7 +3734,7 @@ var InstagramNamespace = class {
3734
3734
  /**
3735
3735
  * Instagram Hashtag Search
3736
3736
  *
3737
- * Search posts under an Instagram hashtag through a web search index rather than Instagram's own hashtag feed. That is what lets it filter by date and media type and return reels whose like counts have settled, and it is also why results skew older (median around three months) and stop at roughly 110 per hashtag. For Instagram's own live ranking of a tag use instagram.hashtag_top_posts, and for the chronological feed use instagram.hashtag_recent_posts.
3737
+ * Search posts under an Instagram hashtag through a web search index rather than Instagram's own hashtag feed. That is what lets it filter by date and media type and return reels whose like counts have settled, and it is also why results skew older (median around three months) and stop at roughly 110 per hashtag. If that web search index is unavailable, a first-page request that sets no date and no media type is served from Instagram's own live top feed instead. For Instagram's own live ranking of a tag use instagram.hashtag_top_posts, and for the chronological feed use instagram.hashtag_recent_posts.
3738
3738
  *
3739
3739
  * Price: $0.002 per request.
3740
3740
  *
@@ -4350,10 +4350,10 @@ var MapsNamespace = class {
4350
4350
  *
4351
4351
  * Fetch up to 100 Google Maps reviews for a place by place ID, sorted the way you need, in one normalized response.
4352
4352
  *
4353
- * Price: $0.00006 per request plus $0.00044 per result (maximum $0.0441).
4353
+ * Price: $0.0035 per request.
4354
4354
  *
4355
4355
  * @example
4356
- * const res = await client.maps.reviews({ placeId: "ChIJN1t_tDeuEmsRUsoyG83frY4", limit: 3, postedLimit: "year" });
4356
+ * const res = await client.maps.reviews({ placeId: "ChIJN1t_tDeuEmsRUsoyG83frY4", limit: 3 });
4357
4357
  */
4358
4358
  reviews(input, options) {
4359
4359
  return this._core.run("maps.reviews", input, options);
@@ -4630,7 +4630,7 @@ var PerplexityNamespace = class {
4630
4630
  *
4631
4631
  * Ask Perplexity a web-grounded question and receive an answer with source citations.
4632
4632
  *
4633
- * Price: $0.00006 per request plus $0.011 per result (maximum $0.0111).
4633
+ * Price: $0.0036 per request.
4634
4634
  *
4635
4635
  * @example
4636
4636
  * const res = await client.perplexity.search({ prompt: "What is AnyAPI at getanyapi.com, and what does it offer?" });
@@ -4872,7 +4872,7 @@ var RedditNamespace = class {
4872
4872
  *
4873
4873
  * Fetch a single Reddit post by URL, including its full body text, score, comment count, upvote ratio, and subreddit, as normalized JSON.
4874
4874
  *
4875
- * Price: $0.0009 per request.
4875
+ * Price: $0.0012 per request.
4876
4876
  *
4877
4877
  * @example
4878
4878
  * const res = await client.reddit.post({ url: "https://www.reddit.com/r/IAmA/comments/z1c9z/i_am_barack_obama_president_of_the_united_states/" });
@@ -4940,7 +4940,7 @@ var RedditNamespace = class {
4940
4940
  *
4941
4941
  * Search Reddit posts across all subreddits by query.
4942
4942
  *
4943
- * Price: $0.0009 per request.
4943
+ * Price: $0.0012 per request.
4944
4944
  *
4945
4945
  * @example
4946
4946
  * const res = await client.reddit.search({ query: "mechanical keyboard" });
@@ -6557,7 +6557,7 @@ var TripadvisorNamespace = class {
6557
6557
  *
6558
6558
  * Fetch the latest reviews for any Tripadvisor hotel, restaurant, or attraction by its page URL: rating, text, date, and trip details as normalized JSON.
6559
6559
  *
6560
- * Price: $0.0036 per request.
6560
+ * Price: $0.003 per request.
6561
6561
  *
6562
6562
  * @example
6563
6563
  * const res = await client.tripadvisor.reviews({ url: "https://www.tripadvisor.com/Hotel_Review-g60763-d93450-Reviews-The_Plaza-New_York_City_New_York.html", limit: 3 });
@@ -6570,7 +6570,7 @@ var TripadvisorNamespace = class {
6570
6570
  *
6571
6571
  * Search Tripadvisor for hotels, restaurants, and attractions in any destination and get rich place records (ratings, review counts, contact details, pricing) as normalized JSON.
6572
6572
  *
6573
- * Price: $0.0036 per request.
6573
+ * Price: $0.003 per request.
6574
6574
  *
6575
6575
  * @example
6576
6576
  * const res = await client.tripadvisor.search({ query: "Paris", limit: 3 });
@@ -7228,7 +7228,7 @@ var YelpNamespace = class {
7228
7228
  *
7229
7229
  * Search Yelp for businesses by keyword and location: up to 20 listings with ratings, categories, and core business info per request.
7230
7230
  *
7231
- * Price: $0.044 per request plus $0.00083 per result (maximum $0.0605).
7231
+ * Price: $0.0035 per request.
7232
7232
  *
7233
7233
  * @example
7234
7234
  * const res = await client.yelp.search({ location: "Chicago, IL", query: "pizza", limit: 5 });
@@ -7512,6 +7512,35 @@ var YoutubeNamespace = class {
7512
7512
  options
7513
7513
  );
7514
7514
  }
7515
+ /**
7516
+ * YouTube Shorts Search
7517
+ *
7518
+ * Search YouTube Shorts by keyword and get matching Shorts (title, views, URL) with cursor pagination as normalized JSON.
7519
+ *
7520
+ * Price: $0.002 per request.
7521
+ *
7522
+ * @example
7523
+ * const res = await client.youtube.searchShorts({ query: "cats" });
7524
+ */
7525
+ searchShorts(input, options) {
7526
+ return this._core.run("youtube.search_shorts", input, options);
7527
+ }
7528
+ /**
7529
+ * Iterate every result of YouTube Shorts Search across pages.
7530
+ *
7531
+ * Yields items directly; call `.pages()` on the return value to walk whole
7532
+ * result pages instead (each carries its own costUsd).
7533
+ */
7534
+ iterSearchShorts(input, options) {
7535
+ return paginate(
7536
+ this._core,
7537
+ "youtube.search_shorts",
7538
+ input,
7539
+ "shorts",
7540
+ false,
7541
+ options
7542
+ );
7543
+ }
7515
7544
  /**
7516
7545
  * YouTube Trending Shorts
7517
7546
  *
@@ -7528,7 +7557,7 @@ var YoutubeNamespace = class {
7528
7557
  /**
7529
7558
  * YouTube Video
7530
7559
  *
7531
- * Fetch a YouTube video's metadata (title, channel, views, likes, duration, publish date) by URL or ID.
7560
+ * Fetch a YouTube video or Short's metadata (title, channel, views, likes, duration, publish date) by URL or ID.
7532
7561
  *
7533
7562
  * Price: $0.00125 per request.
7534
7563
  *
@@ -7541,7 +7570,7 @@ var YoutubeNamespace = class {
7541
7570
  /**
7542
7571
  * YouTube Video Comments
7543
7572
  *
7544
- * List the comments on a YouTube video by URL with cursor pagination (text, author, likes, reply count).
7573
+ * List the comments on a YouTube video or Short by URL with cursor pagination (text, author, likes, reply count).
7545
7574
  *
7546
7575
  * Price: $0.002 per request.
7547
7576
  *
@@ -7583,7 +7612,7 @@ var YoutubeNamespace = class {
7583
7612
  /**
7584
7613
  * YouTube Video Transcript
7585
7614
  *
7586
- * Fetch the transcript/captions of a YouTube video by URL or ID.
7615
+ * Fetch the transcript/captions of a YouTube video or Short by URL or ID.
7587
7616
  *
7588
7617
  * Price: $0.00125 per request.
7589
7618
  *
@@ -7596,9 +7625,9 @@ var YoutubeNamespace = class {
7596
7625
  /**
7597
7626
  * YouTube Video Transcript (Provenance)
7598
7627
  *
7599
- * Fetch a YouTube transcript with timed segments and its provenance: whether the words are creator-written captions or machine speech recognition.
7628
+ * Fetch a YouTube video or Short transcript with timed segments and its provenance: whether the words are creator-written captions or machine speech recognition.
7600
7629
  *
7601
- * Price: $0.00308 per request plus $0 per result (maximum $0.00308).
7630
+ * Price: $0.001 per request.
7602
7631
  *
7603
7632
  * @example
7604
7633
  * const res = await client.youtube.videoTranscriptFull({ url: "https://www.youtube.com/watch?v=dQw4w9WgXcQ" });