@getanyapi/sdk 0.18.1 → 0.20.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 +204 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1357 -46
- package/dist/index.d.ts +1357 -46
- package/dist/index.js +201 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1336,6 +1336,40 @@ var BookingNamespace = class {
|
|
|
1336
1336
|
}
|
|
1337
1337
|
};
|
|
1338
1338
|
|
|
1339
|
+
// src/generated/platforms/chatgpt.ts
|
|
1340
|
+
var ChatgptNamespace = class {
|
|
1341
|
+
constructor(_core) {
|
|
1342
|
+
this._core = _core;
|
|
1343
|
+
}
|
|
1344
|
+
_core;
|
|
1345
|
+
/**
|
|
1346
|
+
* ChatGPT Brand Visibility
|
|
1347
|
+
*
|
|
1348
|
+
* Analyze how ChatGPT mentions and cites a brand relative to its competitors.
|
|
1349
|
+
*
|
|
1350
|
+
* Price: $0.0045 per request.
|
|
1351
|
+
*
|
|
1352
|
+
* @example
|
|
1353
|
+
* const res = await client.chatgpt.brandVisibility({ brand: "OpenAI", prompt: "What is OpenAI and who are its main competitors?", competitors: ["Anthropic", "Google DeepMind", "Meta"], country: "US", domain: "openai.com" });
|
|
1354
|
+
*/
|
|
1355
|
+
brandVisibility(input, options) {
|
|
1356
|
+
return this._core.run("chatgpt.brand_visibility", input, options);
|
|
1357
|
+
}
|
|
1358
|
+
/**
|
|
1359
|
+
* ChatGPT Search
|
|
1360
|
+
*
|
|
1361
|
+
* Ask ChatGPT a web-grounded question and receive an answer with source citations.
|
|
1362
|
+
*
|
|
1363
|
+
* Price: $0.0036 per request.
|
|
1364
|
+
*
|
|
1365
|
+
* @example
|
|
1366
|
+
* const res = await client.chatgpt.search({ prompt: "What is AnyAPI at getanyapi.com, and what does it offer?" });
|
|
1367
|
+
*/
|
|
1368
|
+
search(input, options) {
|
|
1369
|
+
return this._core.run("chatgpt.search", input, options);
|
|
1370
|
+
}
|
|
1371
|
+
};
|
|
1372
|
+
|
|
1339
1373
|
// src/generated/platforms/coinmarketcap.ts
|
|
1340
1374
|
var CoinmarketcapNamespace = class {
|
|
1341
1375
|
constructor(_core) {
|
|
@@ -1491,7 +1525,7 @@ var DouyinNamespace = class {
|
|
|
1491
1525
|
* Price: $0.012 per request.
|
|
1492
1526
|
*
|
|
1493
1527
|
* @example
|
|
1494
|
-
* const res = await client.douyin.searchVideos({ query: "机器人", duration: "0", publishedWithin:
|
|
1528
|
+
* const res = await client.douyin.searchVideos({ query: "机器人", duration: "0", publishedWithin: 0, sort: 0 });
|
|
1495
1529
|
*/
|
|
1496
1530
|
searchVideos(input, options) {
|
|
1497
1531
|
return this._core.run("douyin.search_videos", input, options);
|
|
@@ -2201,6 +2235,40 @@ var FiverrNamespace = class {
|
|
|
2201
2235
|
}
|
|
2202
2236
|
};
|
|
2203
2237
|
|
|
2238
|
+
// src/generated/platforms/gemini.ts
|
|
2239
|
+
var GeminiNamespace = class {
|
|
2240
|
+
constructor(_core) {
|
|
2241
|
+
this._core = _core;
|
|
2242
|
+
}
|
|
2243
|
+
_core;
|
|
2244
|
+
/**
|
|
2245
|
+
* Gemini Brand Visibility
|
|
2246
|
+
*
|
|
2247
|
+
* Analyze how Gemini mentions and cites a brand relative to its competitors.
|
|
2248
|
+
*
|
|
2249
|
+
* Price: $0.0045 per request.
|
|
2250
|
+
*
|
|
2251
|
+
* @example
|
|
2252
|
+
* const res = await client.gemini.brandVisibility({ brand: "OpenAI", prompt: "What is OpenAI and who are its main competitors?", competitors: ["Anthropic", "Google DeepMind", "Meta"], country: "US", domain: "openai.com" });
|
|
2253
|
+
*/
|
|
2254
|
+
brandVisibility(input, options) {
|
|
2255
|
+
return this._core.run("gemini.brand_visibility", input, options);
|
|
2256
|
+
}
|
|
2257
|
+
/**
|
|
2258
|
+
* Gemini Search
|
|
2259
|
+
*
|
|
2260
|
+
* Ask Gemini a web-grounded question and receive an answer with source citations.
|
|
2261
|
+
*
|
|
2262
|
+
* Price: $0.0036 per request.
|
|
2263
|
+
*
|
|
2264
|
+
* @example
|
|
2265
|
+
* const res = await client.gemini.search({ prompt: "What is AnyAPI at getanyapi.com, and what does it offer?" });
|
|
2266
|
+
*/
|
|
2267
|
+
search(input, options) {
|
|
2268
|
+
return this._core.run("gemini.search", input, options);
|
|
2269
|
+
}
|
|
2270
|
+
};
|
|
2271
|
+
|
|
2204
2272
|
// src/generated/platforms/github.ts
|
|
2205
2273
|
var GithubNamespace = class {
|
|
2206
2274
|
constructor(_core) {
|
|
@@ -2446,6 +2514,32 @@ var GoogleNamespace = class {
|
|
|
2446
2514
|
this._core = _core;
|
|
2447
2515
|
}
|
|
2448
2516
|
_core;
|
|
2517
|
+
/**
|
|
2518
|
+
* Google AI Mode
|
|
2519
|
+
*
|
|
2520
|
+
* Ask Google AI Mode a prompt and receive a cited answer.
|
|
2521
|
+
*
|
|
2522
|
+
* Price: $0.00126 per request.
|
|
2523
|
+
*
|
|
2524
|
+
* @example
|
|
2525
|
+
* const res = await client.google.aiMode({ prompt: "What is AnyAPI at getanyapi.com, and what does it offer?" });
|
|
2526
|
+
*/
|
|
2527
|
+
aiMode(input, options) {
|
|
2528
|
+
return this._core.run("google.ai_mode", input, options);
|
|
2529
|
+
}
|
|
2530
|
+
/**
|
|
2531
|
+
* Google AI Overview
|
|
2532
|
+
*
|
|
2533
|
+
* Ask Google Search a prompt and receive its AI Overview with citations.
|
|
2534
|
+
*
|
|
2535
|
+
* Price: $0.00126 per request plus $0.00018 per result (maximum $0.00144).
|
|
2536
|
+
*
|
|
2537
|
+
* @example
|
|
2538
|
+
* const res = await client.google.aiOverview({ prompt: "How does photosynthesis work?" });
|
|
2539
|
+
*/
|
|
2540
|
+
aiOverview(input, options) {
|
|
2541
|
+
return this._core.run("google.ai_overview", input, options);
|
|
2542
|
+
}
|
|
2449
2543
|
/**
|
|
2450
2544
|
* Google Autocomplete
|
|
2451
2545
|
*
|
|
@@ -3704,6 +3798,40 @@ var PeopleSearchNamespace = class {
|
|
|
3704
3798
|
}
|
|
3705
3799
|
};
|
|
3706
3800
|
|
|
3801
|
+
// src/generated/platforms/perplexity.ts
|
|
3802
|
+
var PerplexityNamespace = class {
|
|
3803
|
+
constructor(_core) {
|
|
3804
|
+
this._core = _core;
|
|
3805
|
+
}
|
|
3806
|
+
_core;
|
|
3807
|
+
/**
|
|
3808
|
+
* Perplexity Brand Visibility
|
|
3809
|
+
*
|
|
3810
|
+
* Analyze how Perplexity mentions and cites a brand relative to its competitors.
|
|
3811
|
+
*
|
|
3812
|
+
* Price: $0.0045 per request.
|
|
3813
|
+
*
|
|
3814
|
+
* @example
|
|
3815
|
+
* const res = await client.perplexity.brandVisibility({ brand: "OpenAI", prompt: "What is OpenAI and who are its main competitors?", competitors: ["Anthropic", "Google DeepMind", "Meta"], country: "US", domain: "openai.com" });
|
|
3816
|
+
*/
|
|
3817
|
+
brandVisibility(input, options) {
|
|
3818
|
+
return this._core.run("perplexity.brand_visibility", input, options);
|
|
3819
|
+
}
|
|
3820
|
+
/**
|
|
3821
|
+
* Perplexity Search
|
|
3822
|
+
*
|
|
3823
|
+
* Ask Perplexity a web-grounded question and receive an answer with source citations.
|
|
3824
|
+
*
|
|
3825
|
+
* Price: $0.0036 per request.
|
|
3826
|
+
*
|
|
3827
|
+
* @example
|
|
3828
|
+
* const res = await client.perplexity.search({ prompt: "What is AnyAPI at getanyapi.com, and what does it offer?" });
|
|
3829
|
+
*/
|
|
3830
|
+
search(input, options) {
|
|
3831
|
+
return this._core.run("perplexity.search", input, options);
|
|
3832
|
+
}
|
|
3833
|
+
};
|
|
3834
|
+
|
|
3707
3835
|
// src/generated/platforms/person.ts
|
|
3708
3836
|
var PersonNamespace = class {
|
|
3709
3837
|
constructor(_core) {
|
|
@@ -4726,7 +4854,7 @@ var TiktokNamespace = class {
|
|
|
4726
4854
|
*
|
|
4727
4855
|
* Fetch full details for a single TikTok ad (brand, title, spend, CTR, objectives, landing page, and video info).
|
|
4728
4856
|
*
|
|
4729
|
-
* Price: $0.
|
|
4857
|
+
* Price: $0.0012 per request.
|
|
4730
4858
|
*
|
|
4731
4859
|
* @example
|
|
4732
4860
|
* const res = await client.tiktok.adLibraryAd({ adId: "7648493525660270600" });
|
|
@@ -4742,7 +4870,7 @@ var TiktokNamespace = class {
|
|
|
4742
4870
|
* Price: $0.002 per request.
|
|
4743
4871
|
*
|
|
4744
4872
|
* @example
|
|
4745
|
-
* const res = await client.tiktok.adLibrarySearch({ query: "spotify", objective: "conversions" });
|
|
4873
|
+
* const res = await client.tiktok.adLibrarySearch({ query: "spotify", limit: 20, objective: "conversions", period: 30 });
|
|
4746
4874
|
*/
|
|
4747
4875
|
adLibrarySearch(input, options) {
|
|
4748
4876
|
return this._core.run("tiktok.ad_library_search", input, options);
|
|
@@ -4763,6 +4891,35 @@ var TiktokNamespace = class {
|
|
|
4763
4891
|
options
|
|
4764
4892
|
);
|
|
4765
4893
|
}
|
|
4894
|
+
/**
|
|
4895
|
+
* TikTok Ad Transparency Search
|
|
4896
|
+
*
|
|
4897
|
+
* Search TikTok's EU Commercial Content Library by keyword or advertiser ID.
|
|
4898
|
+
*
|
|
4899
|
+
* Price: $0.0009 per request.
|
|
4900
|
+
*
|
|
4901
|
+
* @example
|
|
4902
|
+
* const res = await client.tiktok.adTransparencySearch({ days: 30, limit: 20, query: "nike", region: "DE" });
|
|
4903
|
+
*/
|
|
4904
|
+
adTransparencySearch(input, options) {
|
|
4905
|
+
return this._core.run("tiktok.ad_transparency_search", input, options);
|
|
4906
|
+
}
|
|
4907
|
+
/**
|
|
4908
|
+
* Iterate every result of TikTok Ad Transparency Search across pages.
|
|
4909
|
+
*
|
|
4910
|
+
* Yields items directly; call `.pages()` on the return value to walk whole
|
|
4911
|
+
* result pages instead (each carries its own costUsd).
|
|
4912
|
+
*/
|
|
4913
|
+
iterAdTransparencySearch(input, options) {
|
|
4914
|
+
return paginate(
|
|
4915
|
+
this._core,
|
|
4916
|
+
"tiktok.ad_transparency_search",
|
|
4917
|
+
input,
|
|
4918
|
+
"ads",
|
|
4919
|
+
false,
|
|
4920
|
+
options
|
|
4921
|
+
);
|
|
4922
|
+
}
|
|
4766
4923
|
/**
|
|
4767
4924
|
* TikTok Audience Demographics
|
|
4768
4925
|
*
|
|
@@ -4949,7 +5106,7 @@ var TiktokNamespace = class {
|
|
|
4949
5106
|
* Price: $0.0012 per request.
|
|
4950
5107
|
*
|
|
4951
5108
|
* @example
|
|
4952
|
-
* const res = await client.tiktok.searchKeyword({ query: "cooking" });
|
|
5109
|
+
* const res = await client.tiktok.searchKeyword({ query: "cooking", datePosted: 0, sortBy: 0 });
|
|
4953
5110
|
*/
|
|
4954
5111
|
searchKeyword(input, options) {
|
|
4955
5112
|
return this._core.run("tiktok.search_keyword", input, options);
|
|
@@ -5054,6 +5211,19 @@ var TiktokNamespace = class {
|
|
|
5054
5211
|
options
|
|
5055
5212
|
);
|
|
5056
5213
|
}
|
|
5214
|
+
/**
|
|
5215
|
+
* TikTok Top Ads Search
|
|
5216
|
+
*
|
|
5217
|
+
* Search TikTok Creative Center top video ads by keyword with explicit performance, objective, region, language, and time-window filters.
|
|
5218
|
+
*
|
|
5219
|
+
* Price: $0.0012 per request.
|
|
5220
|
+
*
|
|
5221
|
+
* @example
|
|
5222
|
+
* const res = await client.tiktok.topAdsSearch({ query: "glasses" });
|
|
5223
|
+
*/
|
|
5224
|
+
topAdsSearch(input, options) {
|
|
5225
|
+
return this._core.run("tiktok.top_ads_search", input, options);
|
|
5226
|
+
}
|
|
5057
5227
|
/**
|
|
5058
5228
|
* TikTok Trending Feed
|
|
5059
5229
|
*
|
|
@@ -6368,6 +6538,14 @@ var AnyAPI2 = class extends AnyAPI {
|
|
|
6368
6538
|
this._core
|
|
6369
6539
|
);
|
|
6370
6540
|
}
|
|
6541
|
+
/**
|
|
6542
|
+
* Typed methods for the chatgpt platform.
|
|
6543
|
+
*/
|
|
6544
|
+
get chatgpt() {
|
|
6545
|
+
return this._namespaces["chatgpt"] ??= new ChatgptNamespace(
|
|
6546
|
+
this._core
|
|
6547
|
+
);
|
|
6548
|
+
}
|
|
6371
6549
|
/**
|
|
6372
6550
|
* Typed methods for the coinmarketcap platform.
|
|
6373
6551
|
*/
|
|
@@ -6460,6 +6638,14 @@ var AnyAPI2 = class extends AnyAPI {
|
|
|
6460
6638
|
this._core
|
|
6461
6639
|
);
|
|
6462
6640
|
}
|
|
6641
|
+
/**
|
|
6642
|
+
* Typed methods for the gemini platform.
|
|
6643
|
+
*/
|
|
6644
|
+
get gemini() {
|
|
6645
|
+
return this._namespaces["gemini"] ??= new GeminiNamespace(
|
|
6646
|
+
this._core
|
|
6647
|
+
);
|
|
6648
|
+
}
|
|
6463
6649
|
/**
|
|
6464
6650
|
* Typed methods for the github platform.
|
|
6465
6651
|
*/
|
|
@@ -6572,6 +6758,14 @@ var AnyAPI2 = class extends AnyAPI {
|
|
|
6572
6758
|
this._core
|
|
6573
6759
|
);
|
|
6574
6760
|
}
|
|
6761
|
+
/**
|
|
6762
|
+
* Typed methods for the perplexity platform.
|
|
6763
|
+
*/
|
|
6764
|
+
get perplexity() {
|
|
6765
|
+
return this._namespaces["perplexity"] ??= new PerplexityNamespace(
|
|
6766
|
+
this._core
|
|
6767
|
+
);
|
|
6768
|
+
}
|
|
6575
6769
|
/**
|
|
6576
6770
|
* Typed methods for the person platform.
|
|
6577
6771
|
*/
|
|
@@ -6840,6 +7034,7 @@ export {
|
|
|
6840
7034
|
BadRequestError,
|
|
6841
7035
|
BlueskyNamespace,
|
|
6842
7036
|
BookingNamespace,
|
|
7037
|
+
ChatgptNamespace,
|
|
6843
7038
|
CoinmarketcapNamespace,
|
|
6844
7039
|
CompanyEnrichmentNamespace,
|
|
6845
7040
|
CompanySearchNamespace,
|
|
@@ -6853,6 +7048,7 @@ export {
|
|
|
6853
7048
|
EmailVerificationNamespace,
|
|
6854
7049
|
FacebookNamespace,
|
|
6855
7050
|
FiverrNamespace,
|
|
7051
|
+
GeminiNamespace,
|
|
6856
7052
|
GithubNamespace,
|
|
6857
7053
|
GlassdoorNamespace,
|
|
6858
7054
|
GoogleAdsNamespace,
|
|
@@ -6869,6 +7065,7 @@ export {
|
|
|
6869
7065
|
NotFoundError,
|
|
6870
7066
|
PandaexpressNamespace,
|
|
6871
7067
|
PeopleSearchNamespace,
|
|
7068
|
+
PerplexityNamespace,
|
|
6872
7069
|
PersonEnrichmentNamespace,
|
|
6873
7070
|
PersonNamespace,
|
|
6874
7071
|
PinterestNamespace,
|