@getanyapi/sdk 0.36.0 → 0.37.1
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 +44 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +144 -44
- package/dist/index.d.ts +144 -44
- package/dist/index.js +44 -15
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3013,7 +3013,7 @@ var GoogleNamespace = class {
|
|
|
3013
3013
|
*
|
|
3014
3014
|
* 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.
|
|
3015
3015
|
*
|
|
3016
|
-
* Price: $0.
|
|
3016
|
+
* Price: $0.0009 per request.
|
|
3017
3017
|
*
|
|
3018
3018
|
* @example
|
|
3019
3019
|
* const res = await client.google.search({ query: "best coffee maker", gl: "us", hl: "en", limit: 10 });
|
|
@@ -3514,7 +3514,7 @@ var InstagramNamespace = class {
|
|
|
3514
3514
|
*
|
|
3515
3515
|
* Fetch a single Instagram post or reel by URL (media URLs, like count, owner, type) as normalized JSON.
|
|
3516
3516
|
*
|
|
3517
|
-
* Price: $0.
|
|
3517
|
+
* Price: $0.0015 per request.
|
|
3518
3518
|
*
|
|
3519
3519
|
* @example
|
|
3520
3520
|
* const res = await client.instagram.post({ url: "https://www.instagram.com/reel/DWzrfE2kaY8/" });
|
|
@@ -3527,7 +3527,7 @@ var InstagramNamespace = class {
|
|
|
3527
3527
|
*
|
|
3528
3528
|
* List the comments on an Instagram post or reel by URL with cursor pagination (text, author, likes).
|
|
3529
3529
|
*
|
|
3530
|
-
* Price: $0.
|
|
3530
|
+
* Price: $0.00144 per request.
|
|
3531
3531
|
*
|
|
3532
3532
|
* @example
|
|
3533
3533
|
* const res = await client.instagram.postComments({ url: "https://www.instagram.com/reel/DWzrfE2kaY8/" });
|
|
@@ -3619,7 +3619,7 @@ var InstagramNamespace = class {
|
|
|
3619
3619
|
/**
|
|
3620
3620
|
* Instagram Hashtag Search
|
|
3621
3621
|
*
|
|
3622
|
-
* 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.
|
|
3622
|
+
* 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.
|
|
3623
3623
|
*
|
|
3624
3624
|
* Price: $0.002 per request.
|
|
3625
3625
|
*
|
|
@@ -4235,10 +4235,10 @@ var MapsNamespace = class {
|
|
|
4235
4235
|
*
|
|
4236
4236
|
* Fetch up to 100 Google Maps reviews for a place by place ID, sorted the way you need, in one normalized response.
|
|
4237
4237
|
*
|
|
4238
|
-
* Price: $0.
|
|
4238
|
+
* Price: $0.0035 per request.
|
|
4239
4239
|
*
|
|
4240
4240
|
* @example
|
|
4241
|
-
* const res = await client.maps.reviews({ placeId: "ChIJN1t_tDeuEmsRUsoyG83frY4", limit: 3
|
|
4241
|
+
* const res = await client.maps.reviews({ placeId: "ChIJN1t_tDeuEmsRUsoyG83frY4", limit: 3 });
|
|
4242
4242
|
*/
|
|
4243
4243
|
reviews(input, options) {
|
|
4244
4244
|
return this._core.run("maps.reviews", input, options);
|
|
@@ -4515,7 +4515,7 @@ var PerplexityNamespace = class {
|
|
|
4515
4515
|
*
|
|
4516
4516
|
* Ask Perplexity a web-grounded question and receive an answer with source citations.
|
|
4517
4517
|
*
|
|
4518
|
-
* Price: $0.
|
|
4518
|
+
* Price: $0.0036 per request.
|
|
4519
4519
|
*
|
|
4520
4520
|
* @example
|
|
4521
4521
|
* const res = await client.perplexity.search({ prompt: "What is AnyAPI at getanyapi.com, and what does it offer?" });
|
|
@@ -6442,7 +6442,7 @@ var TripadvisorNamespace = class {
|
|
|
6442
6442
|
*
|
|
6443
6443
|
* Fetch the latest reviews for any Tripadvisor hotel, restaurant, or attraction by its page URL: rating, text, date, and trip details as normalized JSON.
|
|
6444
6444
|
*
|
|
6445
|
-
* Price: $0.
|
|
6445
|
+
* Price: $0.003 per request.
|
|
6446
6446
|
*
|
|
6447
6447
|
* @example
|
|
6448
6448
|
* 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 });
|
|
@@ -6455,7 +6455,7 @@ var TripadvisorNamespace = class {
|
|
|
6455
6455
|
*
|
|
6456
6456
|
* Search Tripadvisor for hotels, restaurants, and attractions in any destination and get rich place records (ratings, review counts, contact details, pricing) as normalized JSON.
|
|
6457
6457
|
*
|
|
6458
|
-
* Price: $0.
|
|
6458
|
+
* Price: $0.003 per request.
|
|
6459
6459
|
*
|
|
6460
6460
|
* @example
|
|
6461
6461
|
* const res = await client.tripadvisor.search({ query: "Paris", limit: 3 });
|
|
@@ -7113,7 +7113,7 @@ var YelpNamespace = class {
|
|
|
7113
7113
|
*
|
|
7114
7114
|
* Search Yelp for businesses by keyword and location: up to 20 listings with ratings, categories, and core business info per request.
|
|
7115
7115
|
*
|
|
7116
|
-
* Price: $0.
|
|
7116
|
+
* Price: $0.0035 per request.
|
|
7117
7117
|
*
|
|
7118
7118
|
* @example
|
|
7119
7119
|
* const res = await client.yelp.search({ location: "Chicago, IL", query: "pizza", limit: 5 });
|
|
@@ -7397,6 +7397,35 @@ var YoutubeNamespace = class {
|
|
|
7397
7397
|
options
|
|
7398
7398
|
);
|
|
7399
7399
|
}
|
|
7400
|
+
/**
|
|
7401
|
+
* YouTube Shorts Search
|
|
7402
|
+
*
|
|
7403
|
+
* Search YouTube Shorts by keyword and get matching Shorts (title, views, URL) with cursor pagination as normalized JSON.
|
|
7404
|
+
*
|
|
7405
|
+
* Price: $0.002 per request.
|
|
7406
|
+
*
|
|
7407
|
+
* @example
|
|
7408
|
+
* const res = await client.youtube.searchShorts({ query: "cats" });
|
|
7409
|
+
*/
|
|
7410
|
+
searchShorts(input, options) {
|
|
7411
|
+
return this._core.run("youtube.search_shorts", input, options);
|
|
7412
|
+
}
|
|
7413
|
+
/**
|
|
7414
|
+
* Iterate every result of YouTube Shorts Search across pages.
|
|
7415
|
+
*
|
|
7416
|
+
* Yields items directly; call `.pages()` on the return value to walk whole
|
|
7417
|
+
* result pages instead (each carries its own costUsd).
|
|
7418
|
+
*/
|
|
7419
|
+
iterSearchShorts(input, options) {
|
|
7420
|
+
return paginate(
|
|
7421
|
+
this._core,
|
|
7422
|
+
"youtube.search_shorts",
|
|
7423
|
+
input,
|
|
7424
|
+
"shorts",
|
|
7425
|
+
false,
|
|
7426
|
+
options
|
|
7427
|
+
);
|
|
7428
|
+
}
|
|
7400
7429
|
/**
|
|
7401
7430
|
* YouTube Trending Shorts
|
|
7402
7431
|
*
|
|
@@ -7413,7 +7442,7 @@ var YoutubeNamespace = class {
|
|
|
7413
7442
|
/**
|
|
7414
7443
|
* YouTube Video
|
|
7415
7444
|
*
|
|
7416
|
-
* Fetch a YouTube video's metadata (title, channel, views, likes, duration, publish date) by URL or ID.
|
|
7445
|
+
* Fetch a YouTube video or Short's metadata (title, channel, views, likes, duration, publish date) by URL or ID.
|
|
7417
7446
|
*
|
|
7418
7447
|
* Price: $0.00125 per request.
|
|
7419
7448
|
*
|
|
@@ -7426,7 +7455,7 @@ var YoutubeNamespace = class {
|
|
|
7426
7455
|
/**
|
|
7427
7456
|
* YouTube Video Comments
|
|
7428
7457
|
*
|
|
7429
|
-
* List the comments on a YouTube video by URL with cursor pagination (text, author, likes, reply count).
|
|
7458
|
+
* List the comments on a YouTube video or Short by URL with cursor pagination (text, author, likes, reply count).
|
|
7430
7459
|
*
|
|
7431
7460
|
* Price: $0.002 per request.
|
|
7432
7461
|
*
|
|
@@ -7468,7 +7497,7 @@ var YoutubeNamespace = class {
|
|
|
7468
7497
|
/**
|
|
7469
7498
|
* YouTube Video Transcript
|
|
7470
7499
|
*
|
|
7471
|
-
* Fetch the transcript/captions of a YouTube video by URL or ID.
|
|
7500
|
+
* Fetch the transcript/captions of a YouTube video or Short by URL or ID.
|
|
7472
7501
|
*
|
|
7473
7502
|
* Price: $0.00125 per request.
|
|
7474
7503
|
*
|
|
@@ -7481,9 +7510,9 @@ var YoutubeNamespace = class {
|
|
|
7481
7510
|
/**
|
|
7482
7511
|
* YouTube Video Transcript (Provenance)
|
|
7483
7512
|
*
|
|
7484
|
-
* Fetch a YouTube transcript with timed segments and its provenance: whether the words are creator-written captions or machine speech recognition.
|
|
7513
|
+
* Fetch a YouTube video or Short transcript with timed segments and its provenance: whether the words are creator-written captions or machine speech recognition.
|
|
7485
7514
|
*
|
|
7486
|
-
* Price: $0.
|
|
7515
|
+
* Price: $0.001 per request.
|
|
7487
7516
|
*
|
|
7488
7517
|
* @example
|
|
7489
7518
|
* const res = await client.youtube.videoTranscriptFull({ url: "https://www.youtube.com/watch?v=dQw4w9WgXcQ" });
|