@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.cjs
CHANGED
|
@@ -32,6 +32,7 @@ __export(index_exports, {
|
|
|
32
32
|
BadRequestError: () => BadRequestError,
|
|
33
33
|
BlueskyNamespace: () => BlueskyNamespace,
|
|
34
34
|
BookingNamespace: () => BookingNamespace,
|
|
35
|
+
ChatgptNamespace: () => ChatgptNamespace,
|
|
35
36
|
CoinmarketcapNamespace: () => CoinmarketcapNamespace,
|
|
36
37
|
CompanyEnrichmentNamespace: () => CompanyEnrichmentNamespace,
|
|
37
38
|
CompanySearchNamespace: () => CompanySearchNamespace,
|
|
@@ -45,6 +46,7 @@ __export(index_exports, {
|
|
|
45
46
|
EmailVerificationNamespace: () => EmailVerificationNamespace,
|
|
46
47
|
FacebookNamespace: () => FacebookNamespace,
|
|
47
48
|
FiverrNamespace: () => FiverrNamespace,
|
|
49
|
+
GeminiNamespace: () => GeminiNamespace,
|
|
48
50
|
GithubNamespace: () => GithubNamespace,
|
|
49
51
|
GlassdoorNamespace: () => GlassdoorNamespace,
|
|
50
52
|
GoogleAdsNamespace: () => GoogleAdsNamespace,
|
|
@@ -61,6 +63,7 @@ __export(index_exports, {
|
|
|
61
63
|
NotFoundError: () => NotFoundError,
|
|
62
64
|
PandaexpressNamespace: () => PandaexpressNamespace,
|
|
63
65
|
PeopleSearchNamespace: () => PeopleSearchNamespace,
|
|
66
|
+
PerplexityNamespace: () => PerplexityNamespace,
|
|
64
67
|
PersonEnrichmentNamespace: () => PersonEnrichmentNamespace,
|
|
65
68
|
PersonNamespace: () => PersonNamespace,
|
|
66
69
|
PinterestNamespace: () => PinterestNamespace,
|
|
@@ -1442,6 +1445,40 @@ var BookingNamespace = class {
|
|
|
1442
1445
|
}
|
|
1443
1446
|
};
|
|
1444
1447
|
|
|
1448
|
+
// src/generated/platforms/chatgpt.ts
|
|
1449
|
+
var ChatgptNamespace = class {
|
|
1450
|
+
constructor(_core) {
|
|
1451
|
+
this._core = _core;
|
|
1452
|
+
}
|
|
1453
|
+
_core;
|
|
1454
|
+
/**
|
|
1455
|
+
* ChatGPT Brand Visibility
|
|
1456
|
+
*
|
|
1457
|
+
* Analyze how ChatGPT mentions and cites a brand relative to its competitors.
|
|
1458
|
+
*
|
|
1459
|
+
* Price: $0.0045 per request.
|
|
1460
|
+
*
|
|
1461
|
+
* @example
|
|
1462
|
+
* 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" });
|
|
1463
|
+
*/
|
|
1464
|
+
brandVisibility(input, options) {
|
|
1465
|
+
return this._core.run("chatgpt.brand_visibility", input, options);
|
|
1466
|
+
}
|
|
1467
|
+
/**
|
|
1468
|
+
* ChatGPT Search
|
|
1469
|
+
*
|
|
1470
|
+
* Ask ChatGPT a web-grounded question and receive an answer with source citations.
|
|
1471
|
+
*
|
|
1472
|
+
* Price: $0.0036 per request.
|
|
1473
|
+
*
|
|
1474
|
+
* @example
|
|
1475
|
+
* const res = await client.chatgpt.search({ prompt: "What is AnyAPI at getanyapi.com, and what does it offer?" });
|
|
1476
|
+
*/
|
|
1477
|
+
search(input, options) {
|
|
1478
|
+
return this._core.run("chatgpt.search", input, options);
|
|
1479
|
+
}
|
|
1480
|
+
};
|
|
1481
|
+
|
|
1445
1482
|
// src/generated/platforms/coinmarketcap.ts
|
|
1446
1483
|
var CoinmarketcapNamespace = class {
|
|
1447
1484
|
constructor(_core) {
|
|
@@ -1597,7 +1634,7 @@ var DouyinNamespace = class {
|
|
|
1597
1634
|
* Price: $0.012 per request.
|
|
1598
1635
|
*
|
|
1599
1636
|
* @example
|
|
1600
|
-
* const res = await client.douyin.searchVideos({ query: "机器人", duration: "0", publishedWithin:
|
|
1637
|
+
* const res = await client.douyin.searchVideos({ query: "机器人", duration: "0", publishedWithin: 0, sort: 0 });
|
|
1601
1638
|
*/
|
|
1602
1639
|
searchVideos(input, options) {
|
|
1603
1640
|
return this._core.run("douyin.search_videos", input, options);
|
|
@@ -2307,6 +2344,40 @@ var FiverrNamespace = class {
|
|
|
2307
2344
|
}
|
|
2308
2345
|
};
|
|
2309
2346
|
|
|
2347
|
+
// src/generated/platforms/gemini.ts
|
|
2348
|
+
var GeminiNamespace = class {
|
|
2349
|
+
constructor(_core) {
|
|
2350
|
+
this._core = _core;
|
|
2351
|
+
}
|
|
2352
|
+
_core;
|
|
2353
|
+
/**
|
|
2354
|
+
* Gemini Brand Visibility
|
|
2355
|
+
*
|
|
2356
|
+
* Analyze how Gemini mentions and cites a brand relative to its competitors.
|
|
2357
|
+
*
|
|
2358
|
+
* Price: $0.0045 per request.
|
|
2359
|
+
*
|
|
2360
|
+
* @example
|
|
2361
|
+
* 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" });
|
|
2362
|
+
*/
|
|
2363
|
+
brandVisibility(input, options) {
|
|
2364
|
+
return this._core.run("gemini.brand_visibility", input, options);
|
|
2365
|
+
}
|
|
2366
|
+
/**
|
|
2367
|
+
* Gemini Search
|
|
2368
|
+
*
|
|
2369
|
+
* Ask Gemini a web-grounded question and receive an answer with source citations.
|
|
2370
|
+
*
|
|
2371
|
+
* Price: $0.0036 per request.
|
|
2372
|
+
*
|
|
2373
|
+
* @example
|
|
2374
|
+
* const res = await client.gemini.search({ prompt: "What is AnyAPI at getanyapi.com, and what does it offer?" });
|
|
2375
|
+
*/
|
|
2376
|
+
search(input, options) {
|
|
2377
|
+
return this._core.run("gemini.search", input, options);
|
|
2378
|
+
}
|
|
2379
|
+
};
|
|
2380
|
+
|
|
2310
2381
|
// src/generated/platforms/github.ts
|
|
2311
2382
|
var GithubNamespace = class {
|
|
2312
2383
|
constructor(_core) {
|
|
@@ -2552,6 +2623,32 @@ var GoogleNamespace = class {
|
|
|
2552
2623
|
this._core = _core;
|
|
2553
2624
|
}
|
|
2554
2625
|
_core;
|
|
2626
|
+
/**
|
|
2627
|
+
* Google AI Mode
|
|
2628
|
+
*
|
|
2629
|
+
* Ask Google AI Mode a prompt and receive a cited answer.
|
|
2630
|
+
*
|
|
2631
|
+
* Price: $0.00126 per request.
|
|
2632
|
+
*
|
|
2633
|
+
* @example
|
|
2634
|
+
* const res = await client.google.aiMode({ prompt: "What is AnyAPI at getanyapi.com, and what does it offer?" });
|
|
2635
|
+
*/
|
|
2636
|
+
aiMode(input, options) {
|
|
2637
|
+
return this._core.run("google.ai_mode", input, options);
|
|
2638
|
+
}
|
|
2639
|
+
/**
|
|
2640
|
+
* Google AI Overview
|
|
2641
|
+
*
|
|
2642
|
+
* Ask Google Search a prompt and receive its AI Overview with citations.
|
|
2643
|
+
*
|
|
2644
|
+
* Price: $0.00126 per request plus $0.00018 per result (maximum $0.00144).
|
|
2645
|
+
*
|
|
2646
|
+
* @example
|
|
2647
|
+
* const res = await client.google.aiOverview({ prompt: "How does photosynthesis work?" });
|
|
2648
|
+
*/
|
|
2649
|
+
aiOverview(input, options) {
|
|
2650
|
+
return this._core.run("google.ai_overview", input, options);
|
|
2651
|
+
}
|
|
2555
2652
|
/**
|
|
2556
2653
|
* Google Autocomplete
|
|
2557
2654
|
*
|
|
@@ -3810,6 +3907,40 @@ var PeopleSearchNamespace = class {
|
|
|
3810
3907
|
}
|
|
3811
3908
|
};
|
|
3812
3909
|
|
|
3910
|
+
// src/generated/platforms/perplexity.ts
|
|
3911
|
+
var PerplexityNamespace = class {
|
|
3912
|
+
constructor(_core) {
|
|
3913
|
+
this._core = _core;
|
|
3914
|
+
}
|
|
3915
|
+
_core;
|
|
3916
|
+
/**
|
|
3917
|
+
* Perplexity Brand Visibility
|
|
3918
|
+
*
|
|
3919
|
+
* Analyze how Perplexity mentions and cites a brand relative to its competitors.
|
|
3920
|
+
*
|
|
3921
|
+
* Price: $0.0045 per request.
|
|
3922
|
+
*
|
|
3923
|
+
* @example
|
|
3924
|
+
* 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" });
|
|
3925
|
+
*/
|
|
3926
|
+
brandVisibility(input, options) {
|
|
3927
|
+
return this._core.run("perplexity.brand_visibility", input, options);
|
|
3928
|
+
}
|
|
3929
|
+
/**
|
|
3930
|
+
* Perplexity Search
|
|
3931
|
+
*
|
|
3932
|
+
* Ask Perplexity a web-grounded question and receive an answer with source citations.
|
|
3933
|
+
*
|
|
3934
|
+
* Price: $0.0036 per request.
|
|
3935
|
+
*
|
|
3936
|
+
* @example
|
|
3937
|
+
* const res = await client.perplexity.search({ prompt: "What is AnyAPI at getanyapi.com, and what does it offer?" });
|
|
3938
|
+
*/
|
|
3939
|
+
search(input, options) {
|
|
3940
|
+
return this._core.run("perplexity.search", input, options);
|
|
3941
|
+
}
|
|
3942
|
+
};
|
|
3943
|
+
|
|
3813
3944
|
// src/generated/platforms/person.ts
|
|
3814
3945
|
var PersonNamespace = class {
|
|
3815
3946
|
constructor(_core) {
|
|
@@ -4832,7 +4963,7 @@ var TiktokNamespace = class {
|
|
|
4832
4963
|
*
|
|
4833
4964
|
* Fetch full details for a single TikTok ad (brand, title, spend, CTR, objectives, landing page, and video info).
|
|
4834
4965
|
*
|
|
4835
|
-
* Price: $0.
|
|
4966
|
+
* Price: $0.0012 per request.
|
|
4836
4967
|
*
|
|
4837
4968
|
* @example
|
|
4838
4969
|
* const res = await client.tiktok.adLibraryAd({ adId: "7648493525660270600" });
|
|
@@ -4848,7 +4979,7 @@ var TiktokNamespace = class {
|
|
|
4848
4979
|
* Price: $0.002 per request.
|
|
4849
4980
|
*
|
|
4850
4981
|
* @example
|
|
4851
|
-
* const res = await client.tiktok.adLibrarySearch({ query: "spotify", objective: "conversions" });
|
|
4982
|
+
* const res = await client.tiktok.adLibrarySearch({ query: "spotify", limit: 20, objective: "conversions", period: 30 });
|
|
4852
4983
|
*/
|
|
4853
4984
|
adLibrarySearch(input, options) {
|
|
4854
4985
|
return this._core.run("tiktok.ad_library_search", input, options);
|
|
@@ -4869,6 +5000,35 @@ var TiktokNamespace = class {
|
|
|
4869
5000
|
options
|
|
4870
5001
|
);
|
|
4871
5002
|
}
|
|
5003
|
+
/**
|
|
5004
|
+
* TikTok Ad Transparency Search
|
|
5005
|
+
*
|
|
5006
|
+
* Search TikTok's EU Commercial Content Library by keyword or advertiser ID.
|
|
5007
|
+
*
|
|
5008
|
+
* Price: $0.0009 per request.
|
|
5009
|
+
*
|
|
5010
|
+
* @example
|
|
5011
|
+
* const res = await client.tiktok.adTransparencySearch({ days: 30, limit: 20, query: "nike", region: "DE" });
|
|
5012
|
+
*/
|
|
5013
|
+
adTransparencySearch(input, options) {
|
|
5014
|
+
return this._core.run("tiktok.ad_transparency_search", input, options);
|
|
5015
|
+
}
|
|
5016
|
+
/**
|
|
5017
|
+
* Iterate every result of TikTok Ad Transparency Search across pages.
|
|
5018
|
+
*
|
|
5019
|
+
* Yields items directly; call `.pages()` on the return value to walk whole
|
|
5020
|
+
* result pages instead (each carries its own costUsd).
|
|
5021
|
+
*/
|
|
5022
|
+
iterAdTransparencySearch(input, options) {
|
|
5023
|
+
return paginate(
|
|
5024
|
+
this._core,
|
|
5025
|
+
"tiktok.ad_transparency_search",
|
|
5026
|
+
input,
|
|
5027
|
+
"ads",
|
|
5028
|
+
false,
|
|
5029
|
+
options
|
|
5030
|
+
);
|
|
5031
|
+
}
|
|
4872
5032
|
/**
|
|
4873
5033
|
* TikTok Audience Demographics
|
|
4874
5034
|
*
|
|
@@ -5055,7 +5215,7 @@ var TiktokNamespace = class {
|
|
|
5055
5215
|
* Price: $0.0012 per request.
|
|
5056
5216
|
*
|
|
5057
5217
|
* @example
|
|
5058
|
-
* const res = await client.tiktok.searchKeyword({ query: "cooking" });
|
|
5218
|
+
* const res = await client.tiktok.searchKeyword({ query: "cooking", datePosted: 0, sortBy: 0 });
|
|
5059
5219
|
*/
|
|
5060
5220
|
searchKeyword(input, options) {
|
|
5061
5221
|
return this._core.run("tiktok.search_keyword", input, options);
|
|
@@ -5160,6 +5320,19 @@ var TiktokNamespace = class {
|
|
|
5160
5320
|
options
|
|
5161
5321
|
);
|
|
5162
5322
|
}
|
|
5323
|
+
/**
|
|
5324
|
+
* TikTok Top Ads Search
|
|
5325
|
+
*
|
|
5326
|
+
* Search TikTok Creative Center top video ads by keyword with explicit performance, objective, region, language, and time-window filters.
|
|
5327
|
+
*
|
|
5328
|
+
* Price: $0.0012 per request.
|
|
5329
|
+
*
|
|
5330
|
+
* @example
|
|
5331
|
+
* const res = await client.tiktok.topAdsSearch({ query: "glasses" });
|
|
5332
|
+
*/
|
|
5333
|
+
topAdsSearch(input, options) {
|
|
5334
|
+
return this._core.run("tiktok.top_ads_search", input, options);
|
|
5335
|
+
}
|
|
5163
5336
|
/**
|
|
5164
5337
|
* TikTok Trending Feed
|
|
5165
5338
|
*
|
|
@@ -6474,6 +6647,14 @@ var AnyAPI2 = class extends AnyAPI {
|
|
|
6474
6647
|
this._core
|
|
6475
6648
|
);
|
|
6476
6649
|
}
|
|
6650
|
+
/**
|
|
6651
|
+
* Typed methods for the chatgpt platform.
|
|
6652
|
+
*/
|
|
6653
|
+
get chatgpt() {
|
|
6654
|
+
return this._namespaces["chatgpt"] ??= new ChatgptNamespace(
|
|
6655
|
+
this._core
|
|
6656
|
+
);
|
|
6657
|
+
}
|
|
6477
6658
|
/**
|
|
6478
6659
|
* Typed methods for the coinmarketcap platform.
|
|
6479
6660
|
*/
|
|
@@ -6566,6 +6747,14 @@ var AnyAPI2 = class extends AnyAPI {
|
|
|
6566
6747
|
this._core
|
|
6567
6748
|
);
|
|
6568
6749
|
}
|
|
6750
|
+
/**
|
|
6751
|
+
* Typed methods for the gemini platform.
|
|
6752
|
+
*/
|
|
6753
|
+
get gemini() {
|
|
6754
|
+
return this._namespaces["gemini"] ??= new GeminiNamespace(
|
|
6755
|
+
this._core
|
|
6756
|
+
);
|
|
6757
|
+
}
|
|
6569
6758
|
/**
|
|
6570
6759
|
* Typed methods for the github platform.
|
|
6571
6760
|
*/
|
|
@@ -6678,6 +6867,14 @@ var AnyAPI2 = class extends AnyAPI {
|
|
|
6678
6867
|
this._core
|
|
6679
6868
|
);
|
|
6680
6869
|
}
|
|
6870
|
+
/**
|
|
6871
|
+
* Typed methods for the perplexity platform.
|
|
6872
|
+
*/
|
|
6873
|
+
get perplexity() {
|
|
6874
|
+
return this._namespaces["perplexity"] ??= new PerplexityNamespace(
|
|
6875
|
+
this._core
|
|
6876
|
+
);
|
|
6877
|
+
}
|
|
6681
6878
|
/**
|
|
6682
6879
|
* Typed methods for the person platform.
|
|
6683
6880
|
*/
|
|
@@ -6947,6 +7144,7 @@ var AnyAPI2 = class extends AnyAPI {
|
|
|
6947
7144
|
BadRequestError,
|
|
6948
7145
|
BlueskyNamespace,
|
|
6949
7146
|
BookingNamespace,
|
|
7147
|
+
ChatgptNamespace,
|
|
6950
7148
|
CoinmarketcapNamespace,
|
|
6951
7149
|
CompanyEnrichmentNamespace,
|
|
6952
7150
|
CompanySearchNamespace,
|
|
@@ -6960,6 +7158,7 @@ var AnyAPI2 = class extends AnyAPI {
|
|
|
6960
7158
|
EmailVerificationNamespace,
|
|
6961
7159
|
FacebookNamespace,
|
|
6962
7160
|
FiverrNamespace,
|
|
7161
|
+
GeminiNamespace,
|
|
6963
7162
|
GithubNamespace,
|
|
6964
7163
|
GlassdoorNamespace,
|
|
6965
7164
|
GoogleAdsNamespace,
|
|
@@ -6976,6 +7175,7 @@ var AnyAPI2 = class extends AnyAPI {
|
|
|
6976
7175
|
NotFoundError,
|
|
6977
7176
|
PandaexpressNamespace,
|
|
6978
7177
|
PeopleSearchNamespace,
|
|
7178
|
+
PerplexityNamespace,
|
|
6979
7179
|
PersonEnrichmentNamespace,
|
|
6980
7180
|
PersonNamespace,
|
|
6981
7181
|
PinterestNamespace,
|