@getanyapi/sdk 0.61.2 → 0.64.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 +4 -3
- package/dist/index.cjs +73 -36
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +530 -218
- package/dist/index.d.ts +530 -218
- package/dist/index.js +73 -36
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -187,12 +187,13 @@ Bootstrap a key with no account (for autonomous agents):
|
|
|
187
187
|
```ts
|
|
188
188
|
import { agentSignup } from "@getanyapi/sdk";
|
|
189
189
|
|
|
190
|
-
const { secret, capUsd
|
|
190
|
+
const { secret, capUsd } = await agentSignup({ label: "my-agent" });
|
|
191
191
|
const client = new AnyAPI({ apiKey: secret });
|
|
192
192
|
```
|
|
193
193
|
|
|
194
|
-
The key ships with a small starter balance and a per-key spend cap;
|
|
195
|
-
|
|
194
|
+
The key ships with a small starter balance and a per-key spend cap; to go past the cap, a human
|
|
195
|
+
authorizes an AnyAPI wallet over OAuth, as described in
|
|
196
|
+
[agent self-signup](https://getanyapi.com/docs/agent-self-signup).
|
|
196
197
|
|
|
197
198
|
## Docs
|
|
198
199
|
|
package/dist/index.cjs
CHANGED
|
@@ -306,9 +306,7 @@ async function agentSignup(options = {}) {
|
|
|
306
306
|
const parsed = JSON.parse(text);
|
|
307
307
|
return {
|
|
308
308
|
secret: parsed.secret,
|
|
309
|
-
capUsd: parsed.capUsd
|
|
310
|
-
claimToken: parsed.claimToken,
|
|
311
|
-
claimUrl: parsed.claimUrl
|
|
309
|
+
capUsd: parsed.capUsd
|
|
312
310
|
};
|
|
313
311
|
}
|
|
314
312
|
|
|
@@ -1052,7 +1050,7 @@ function isRequestSnapshot(value) {
|
|
|
1052
1050
|
}
|
|
1053
1051
|
|
|
1054
1052
|
// src/core/types.ts
|
|
1055
|
-
var NOT_FOUND_REASONS = ["not_found", "suspended"];
|
|
1053
|
+
var NOT_FOUND_REASONS = ["not_found", "suspended", "unavailable"];
|
|
1056
1054
|
var OUTPUT_NOT_RETAINED = "the run output was not retained: this response is an idempotent replay whose stored payload has expired or was too large to store, so only the run metadata came back. Re-run the request without the idempotency key (or with a fresh one) to fetch the data again.";
|
|
1057
1055
|
function unwrap(result) {
|
|
1058
1056
|
const output = result.output;
|
|
@@ -2824,7 +2822,7 @@ var FacebookNamespace = class {
|
|
|
2824
2822
|
*
|
|
2825
2823
|
* Search public Facebook posts by keyword, optionally filtered by location, and get structured post records (text, author, engagement).
|
|
2826
2824
|
*
|
|
2827
|
-
* Price: $0 per request plus $0.
|
|
2825
|
+
* Price: $0.00006 per request plus $0.0033 per result (maximum $0.0661).
|
|
2828
2826
|
*
|
|
2829
2827
|
* @example
|
|
2830
2828
|
* const res = await client.facebook.searchPosts({ query: "nike", limit: 3 });
|
|
@@ -3513,7 +3511,7 @@ var InstagramNamespace = class {
|
|
|
3513
3511
|
*
|
|
3514
3512
|
* List Instagram reels that use a given audio track by audio id.
|
|
3515
3513
|
*
|
|
3516
|
-
* Price: $0.
|
|
3514
|
+
* Price: $0.0011 per request.
|
|
3517
3515
|
*
|
|
3518
3516
|
* @example
|
|
3519
3517
|
* const res = await client.instagram.audioReels({ audioId: "1392969992841787" });
|
|
@@ -3555,7 +3553,7 @@ var InstagramNamespace = class {
|
|
|
3555
3553
|
*
|
|
3556
3554
|
* List the replies to an Instagram comment with cursor pagination (text, author, likes).
|
|
3557
3555
|
*
|
|
3558
|
-
* Price: $0.
|
|
3556
|
+
* Price: $0.0011 per request.
|
|
3559
3557
|
*
|
|
3560
3558
|
* @example
|
|
3561
3559
|
* const res = await client.instagram.commentReplies({ commentId: "18126632131325044", url: "https://www.instagram.com/p/C8rKmYvsrck/" });
|
|
@@ -3697,7 +3695,7 @@ var InstagramNamespace = class {
|
|
|
3697
3695
|
*
|
|
3698
3696
|
* Instagram's own top-ranked posts for a hashtag, read from its live hashtag feed rather than a web search index, with view, like, and comment counts. Reels-heavy and engagement-ranked, so it answers what is performing on a tag right now. For older relevance-ranked results with date and media-type filters use instagram.search_hashtag; for the chronological feed use instagram.hashtag_recent_posts.
|
|
3699
3697
|
*
|
|
3700
|
-
* Price: $0.
|
|
3698
|
+
* Price: $0.0011 per request.
|
|
3701
3699
|
*
|
|
3702
3700
|
* @example
|
|
3703
3701
|
* const res = await client.instagram.hashtagTopPosts({ hashtag: "skincare" });
|
|
@@ -3849,7 +3847,7 @@ var InstagramNamespace = class {
|
|
|
3849
3847
|
*
|
|
3850
3848
|
* Look up the contact email and phone number an Instagram creator or business publishes on its profile, including the address behind the profile's Email button that public profile lookups do not return.
|
|
3851
3849
|
*
|
|
3852
|
-
* Price: $0.
|
|
3850
|
+
* Price: $0.00175 per request.
|
|
3853
3851
|
*
|
|
3854
3852
|
* @example
|
|
3855
3853
|
* const res = await client.instagram.profileContact({ handle: "eminenceorganics" });
|
|
@@ -3875,7 +3873,7 @@ var InstagramNamespace = class {
|
|
|
3875
3873
|
*
|
|
3876
3874
|
* Search Instagram Reels by keyword against Instagram's own reels search and get matching reels with view, like and comment counts, caption, creator and duration. Results are relevance-ranked, not chronological, and a page can repeat reels from the page before it. For a web-search-index view of the same keyword, with a recency filter and numbered pages, use instagram.web_reels_search.
|
|
3877
3875
|
*
|
|
3878
|
-
* Price: $0.
|
|
3876
|
+
* Price: $0.0011 per request.
|
|
3879
3877
|
*
|
|
3880
3878
|
* @example
|
|
3881
3879
|
* const res = await client.instagram.reelsSearch({ query: "travel" });
|
|
@@ -3912,6 +3910,32 @@ var InstagramNamespace = class {
|
|
|
3912
3910
|
search(input, options) {
|
|
3913
3911
|
return this._core.run("instagram.search", input, options);
|
|
3914
3912
|
}
|
|
3913
|
+
/**
|
|
3914
|
+
* Instagram Search Followers
|
|
3915
|
+
*
|
|
3916
|
+
* Search the followers of a public Instagram account by name or username, using Instagram's own follower search. On smaller accounts it searches the whole follower list and returns close matches ranked by Instagram. On large accounts Instagram does not support searching followers, so the result is the account's most recent followers instead, whatever the query. Returns usernames, names, and profile details.
|
|
3917
|
+
*
|
|
3918
|
+
* Price: $0.0022 per request.
|
|
3919
|
+
*
|
|
3920
|
+
* @example
|
|
3921
|
+
* const res = await client.instagram.searchFollowers({ query: "john", username: "milada2788" });
|
|
3922
|
+
*/
|
|
3923
|
+
searchFollowers(input, options) {
|
|
3924
|
+
return this._core.run("instagram.search_followers", input, options);
|
|
3925
|
+
}
|
|
3926
|
+
/**
|
|
3927
|
+
* Instagram Search Following
|
|
3928
|
+
*
|
|
3929
|
+
* Search the accounts a public Instagram user follows by name or username. Matching is Instagram's own loose search, so results are close matches ranked by Instagram and some may not contain your exact word. Returns usernames, names, and profile details.
|
|
3930
|
+
*
|
|
3931
|
+
* Price: $0.0022 per request.
|
|
3932
|
+
*
|
|
3933
|
+
* @example
|
|
3934
|
+
* const res = await client.instagram.searchFollowing({ query: "skin", username: "moogooskincare" });
|
|
3935
|
+
*/
|
|
3936
|
+
searchFollowing(input, options) {
|
|
3937
|
+
return this._core.run("instagram.search_following", input, options);
|
|
3938
|
+
}
|
|
3915
3939
|
/**
|
|
3916
3940
|
* Instagram Hashtag Search
|
|
3917
3941
|
*
|
|
@@ -3946,7 +3970,7 @@ var InstagramNamespace = class {
|
|
|
3946
3970
|
*
|
|
3947
3971
|
* Search Instagram locations by keyword and return each place's id, name, address and coordinates.
|
|
3948
3972
|
*
|
|
3949
|
-
* Price: $0.
|
|
3973
|
+
* Price: $0.0011 per request.
|
|
3950
3974
|
*
|
|
3951
3975
|
* @example
|
|
3952
3976
|
* const res = await client.instagram.searchLocations({ query: "Eiffel Tower" });
|
|
@@ -4030,7 +4054,7 @@ var InstagramNamespace = class {
|
|
|
4030
4054
|
*
|
|
4031
4055
|
* Fetch a public Instagram account's currently live stories with media, type, dimensions, posting time, and 24-hour expiry by username.
|
|
4032
4056
|
*
|
|
4033
|
-
* Price: $0.
|
|
4057
|
+
* Price: $0.0022 per request.
|
|
4034
4058
|
*
|
|
4035
4059
|
* @example
|
|
4036
4060
|
* const res = await client.instagram.storiesFull({ username: "natgeo" });
|
|
@@ -4169,7 +4193,7 @@ var InstagramNamespace = class {
|
|
|
4169
4193
|
*
|
|
4170
4194
|
* List the posts a public Instagram account has reposted to its feed, with cursor pagination.
|
|
4171
4195
|
*
|
|
4172
|
-
* Price: $0.
|
|
4196
|
+
* Price: $0.0011 per request.
|
|
4173
4197
|
*
|
|
4174
4198
|
* @example
|
|
4175
4199
|
* const res = await client.instagram.userReposts({ userId: "787132" });
|
|
@@ -4526,7 +4550,7 @@ var LinkedinNamespace = class {
|
|
|
4526
4550
|
*
|
|
4527
4551
|
* Lightweight profile: name, avatar, location, followers, and a basic experience/education list (company + dates only, no job titles, descriptions, or skills; past companies may be redacted). For full experience detail, skills, certifications, connections, and verified flags use linkedin.profile.
|
|
4528
4552
|
*
|
|
4529
|
-
* Price: $0.
|
|
4553
|
+
* Price: $0.0012 per request.
|
|
4530
4554
|
*
|
|
4531
4555
|
* @example
|
|
4532
4556
|
* const res = await client.linkedin.profileThin({ url: "https://www.linkedin.com/in/williamhgates" });
|
|
@@ -4683,7 +4707,7 @@ var MapsNamespace = class {
|
|
|
4683
4707
|
*
|
|
4684
4708
|
* Fetch up to 100 Google Maps reviews for a place by place ID, sorted the way you need, in one normalized response.
|
|
4685
4709
|
*
|
|
4686
|
-
* Price: $0.
|
|
4710
|
+
* Price: $0.0035 per request.
|
|
4687
4711
|
*
|
|
4688
4712
|
* @example
|
|
4689
4713
|
* const res = await client.maps.reviews({ placeId: "ChIJN1t_tDeuEmsRUsoyG83frY4", limit: 3 });
|
|
@@ -5526,12 +5550,25 @@ var RedfinNamespace = class {
|
|
|
5526
5550
|
this._core = _core;
|
|
5527
5551
|
}
|
|
5528
5552
|
_core;
|
|
5553
|
+
/**
|
|
5554
|
+
* Redfin Property
|
|
5555
|
+
*
|
|
5556
|
+
* Fetch full details for a single Redfin home by its listing URL (price, beds, baths, square feet, address, listing agent, description and photos) as normalized JSON.
|
|
5557
|
+
*
|
|
5558
|
+
* Price: $0.0005 per request.
|
|
5559
|
+
*
|
|
5560
|
+
* @example
|
|
5561
|
+
* const res = await client.redfin.property({ url: "https://www.redfin.com/TX/Austin/1819-Village-Oak-Ct-78704/home/30981993" });
|
|
5562
|
+
*/
|
|
5563
|
+
property(input, options) {
|
|
5564
|
+
return this._core.run("redfin.property", input, options);
|
|
5565
|
+
}
|
|
5529
5566
|
/**
|
|
5530
5567
|
* Redfin Search
|
|
5531
5568
|
*
|
|
5532
5569
|
* Run a Redfin map search by URL and get matching home listings (price, address, beds, baths, status) as normalized JSON.
|
|
5533
5570
|
*
|
|
5534
|
-
* Price: $0.
|
|
5571
|
+
* Price: $0.0008 per request.
|
|
5535
5572
|
*
|
|
5536
5573
|
* @example
|
|
5537
5574
|
* const res = await client.redfin.search({ url: "https://www.redfin.com/city/30818/TX/Austin", limit: 3 });
|
|
@@ -6525,7 +6562,7 @@ var TiktokNamespace = class {
|
|
|
6525
6562
|
*
|
|
6526
6563
|
* List the followers of a TikTok account by username, returning each follower's profile basics.
|
|
6527
6564
|
*
|
|
6528
|
-
* Price: $0.
|
|
6565
|
+
* Price: $0.00095 per request.
|
|
6529
6566
|
*
|
|
6530
6567
|
* @example
|
|
6531
6568
|
* const res = await client.tiktok.followers({ handle: "stoolpresidente" });
|
|
@@ -6554,7 +6591,7 @@ var TiktokNamespace = class {
|
|
|
6554
6591
|
*
|
|
6555
6592
|
* List the accounts a TikTok user follows (handle, display name, follower count, bio) by username.
|
|
6556
6593
|
*
|
|
6557
|
-
* Price: $0.
|
|
6594
|
+
* Price: $0.00095 per request.
|
|
6558
6595
|
*
|
|
6559
6596
|
* @example
|
|
6560
6597
|
* const res = await client.tiktok.following({ handle: "stoolpresidente" });
|
|
@@ -6864,7 +6901,7 @@ var TiktokNamespace = class {
|
|
|
6864
6901
|
*
|
|
6865
6902
|
* Get the search terms TikTok suggests for a keyword, each with its language and relative weight - the queries real TikTok users type around your topic.
|
|
6866
6903
|
*
|
|
6867
|
-
* Price: $0.
|
|
6904
|
+
* Price: $0.00095 per request.
|
|
6868
6905
|
*
|
|
6869
6906
|
* @example
|
|
6870
6907
|
* const res = await client.tiktok.searchSuggestions({ query: "protein powder" });
|
|
@@ -7131,7 +7168,7 @@ var TiktokShopNamespace = class {
|
|
|
7131
7168
|
*
|
|
7132
7169
|
* Fetch TikTok Shop product details (title, price, sales, seller, and ratings) from a product URL.
|
|
7133
7170
|
*
|
|
7134
|
-
* Price: $0.
|
|
7171
|
+
* Price: $0.00095 per request.
|
|
7135
7172
|
*
|
|
7136
7173
|
* @example
|
|
7137
7174
|
* const res = await client.tiktokShop.product({ url: "https://www.tiktok.com/shop/pdp/goli-ashwagandha-gummies-with-vitamin-d-ksm-66-vegan-non-gmo/1729587769570529799" });
|
|
@@ -7139,25 +7176,12 @@ var TiktokShopNamespace = class {
|
|
|
7139
7176
|
product(input, options) {
|
|
7140
7177
|
return this._core.run("tiktok_shop.product", input, options);
|
|
7141
7178
|
}
|
|
7142
|
-
/**
|
|
7143
|
-
* TikTok Shop Product Full
|
|
7144
|
-
*
|
|
7145
|
-
* Deep TikTok Shop product record from a product URL: affiliate commission rate, units sold and GMV over the last 30 days and lifetime, stock, rating, review count, category tree, listing date, and the seller's own sales totals.
|
|
7146
|
-
*
|
|
7147
|
-
* Price: $0.022 per request plus $0 per result (maximum $0.022).
|
|
7148
|
-
*
|
|
7149
|
-
* @example
|
|
7150
|
-
* const res = await client.tiktokShop.productFull({ url: "https://www.tiktok.com/shop/pdp/1729527313880355335" });
|
|
7151
|
-
*/
|
|
7152
|
-
productFull(input, options) {
|
|
7153
|
-
return this._core.run("tiktok_shop.product_full", input, options);
|
|
7154
|
-
}
|
|
7155
7179
|
/**
|
|
7156
7180
|
* TikTok Shop Product Reviews
|
|
7157
7181
|
*
|
|
7158
7182
|
* Fetch customer reviews for a TikTok Shop product by URL (rating, text, reviewer, country, and verified-purchase flag).
|
|
7159
7183
|
*
|
|
7160
|
-
* Price: $0.
|
|
7184
|
+
* Price: $0.00095 per request.
|
|
7161
7185
|
*
|
|
7162
7186
|
* @example
|
|
7163
7187
|
* const res = await client.tiktokShop.productReviews({ url: "https://www.tiktok.com/shop/pdp/cat-nail-clipper-by-potaroma-adjustable-sizes-built-in-file-safe-for-kittens-cats/1731578642912612516" });
|
|
@@ -7170,7 +7194,7 @@ var TiktokShopNamespace = class {
|
|
|
7170
7194
|
*
|
|
7171
7195
|
* Search TikTok Shop products by keyword across 15 countries: price, sales, rating, and seller info per product, in one normalized response.
|
|
7172
7196
|
*
|
|
7173
|
-
* Price: $0.
|
|
7197
|
+
* Price: $0.00095 per request.
|
|
7174
7198
|
*
|
|
7175
7199
|
* @example
|
|
7176
7200
|
* const res = await client.tiktokShop.search({ query: "phone case", limit: 3 });
|
|
@@ -7183,7 +7207,7 @@ var TiktokShopNamespace = class {
|
|
|
7183
7207
|
*
|
|
7184
7208
|
* Get TikTok Shop search autocomplete terms for a keyword: the long-tail queries shoppers actually type, for keyword and demand research.
|
|
7185
7209
|
*
|
|
7186
|
-
* Price: $0.
|
|
7210
|
+
* Price: $0.00095 per request.
|
|
7187
7211
|
*
|
|
7188
7212
|
* @example
|
|
7189
7213
|
* const res = await client.tiktokShop.searchSuggestions({ query: "ashwagandha gummies", country: "US" });
|
|
@@ -8437,6 +8461,19 @@ var ZillowNamespace = class {
|
|
|
8437
8461
|
this._core = _core;
|
|
8438
8462
|
}
|
|
8439
8463
|
_core;
|
|
8464
|
+
/**
|
|
8465
|
+
* Zillow Agent
|
|
8466
|
+
*
|
|
8467
|
+
* Fetch one Zillow real estate agent's profile by URL: name, phone, email, brokerage, rating, review count, sales, and service areas.
|
|
8468
|
+
*
|
|
8469
|
+
* Price: $0.0005 per request.
|
|
8470
|
+
*
|
|
8471
|
+
* @example
|
|
8472
|
+
* const res = await client.zillow.agent({ url: "https://www.zillow.com/profile/gregorycarlsonATX/" });
|
|
8473
|
+
*/
|
|
8474
|
+
agent(input, options) {
|
|
8475
|
+
return this._core.run("zillow.agent", input, options);
|
|
8476
|
+
}
|
|
8440
8477
|
/**
|
|
8441
8478
|
* Zillow Property
|
|
8442
8479
|
*
|