@decodo/sdk-ts 3.1.0 → 4.0.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 +1 -3
- package/build/cjs/index.cjs +6 -102
- package/build/cjs/index.d.cts +5 -28
- package/build/esm/generated/data-api.d.ts +4 -0
- package/build/esm/generated/parameters.js +1 -1
- package/build/esm/generated/request-schemas.d.ts +3 -72
- package/build/esm/generated/request-schemas.js +3 -81
- package/build/esm/generated/targets.d.ts +2 -26
- package/build/esm/generated/targets.js +2 -20
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ Build strongly typed scraping workflows for search engines, eCommerce platforms,
|
|
|
20
20
|
|
|
21
21
|
# What is Decodo TypeScript SDK?
|
|
22
22
|
|
|
23
|
-
Decodo TypeScript SDK is the official TypeScript SDK for the Decodo Web Scraping API. It provides a typed interface for interacting with Decodo targets like Google, Amazon, TikTok,
|
|
23
|
+
Decodo TypeScript SDK is the official TypeScript SDK for the Decodo Web Scraping API. It provides a typed interface for interacting with Decodo targets like Google, Amazon, TikTok, YouTube, ChatGPT, Perplexity, and more.
|
|
24
24
|
|
|
25
25
|
Instead of manually constructing HTTP requests and validating payloads, you can work with fully typed methods and target-specific parameters directly in your editor.
|
|
26
26
|
|
|
@@ -522,8 +522,6 @@ Each target accepts one primary input parameter (`url`, `query`, `product_id`, o
|
|
|
522
522
|
|
|
523
523
|
| Target | Description | Example |
|
|
524
524
|
| ------------------------ | ---------------------------- | ----------------------------------------------------------------------------- |
|
|
525
|
-
| `Target.RedditPost` | Reddit post by URL | `{ target: Target.RedditPost, url: "https://reddit.com/r/nba/..." }` |
|
|
526
|
-
| `Target.RedditSubreddit` | Reddit subreddit by URL | `{ target: Target.RedditSubreddit, url: "https://reddit.com/r/nba/" }` |
|
|
527
525
|
| `Target.YoutubeMetadata` | YouTube video metadata by ID | `{ target: Target.YoutubeMetadata, query: "dFu9aKJoqGg" }` |
|
|
528
526
|
| `Target.YoutubeSearch` | YouTube search results | `{ target: Target.YoutubeSearch, query: "ambient music" }` |
|
|
529
527
|
| `Target.TiktokPost` | TikTok post by URL | `{ target: Target.TiktokPost, url: "https://www.tiktok.com/@nba/video/..." }` |
|
package/build/cjs/index.cjs
CHANGED
|
@@ -218,16 +218,13 @@ var Target = /* @__PURE__ */ ((_Target) => {
|
|
|
218
218
|
_Target["TiktokShopSearch"] = "tiktok_shop_search";
|
|
219
219
|
_Target["TiktokShopProduct"] = "tiktok_shop_product";
|
|
220
220
|
_Target["Tiktok"] = "tiktok";
|
|
221
|
-
_Target["RedditPost"] = "reddit_post";
|
|
222
|
-
_Target["RedditSubreddit"] = "reddit_subreddit";
|
|
223
|
-
_Target["RedditUser"] = "reddit_user";
|
|
224
221
|
_Target["YoutubeMetadata"] = "youtube_metadata";
|
|
225
222
|
_Target["YoutubeSearch"] = "youtube_search";
|
|
226
223
|
_Target["YoutubeSubtitles"] = "youtube_subtitles";
|
|
227
224
|
_Target["YoutubeChannel"] = "youtube_channel";
|
|
228
225
|
return _Target;
|
|
229
226
|
})(Target || {});
|
|
230
|
-
var targets = ["google_search" /* GoogleSearch */, "google_travel_hotels" /* GoogleTravelHotels */, "google" /* Google */, "google_ai_mode" /* GoogleAiMode */, "google_ads" /* GoogleAds */, "google_lens" /* GoogleLens */, "bing_search" /* BingSearch */, "bing" /* Bing */, "amazon_product" /* AmazonProduct */, "amazon_pricing" /* AmazonPricing */, "amazon_search" /* AmazonSearch */, "amazon_sellers" /* AmazonSellers */, "amazon_bestsellers" /* AmazonBestsellers */, "amazon" /* Amazon */, "walmart_product" /* WalmartProduct */, "walmart_search" /* WalmartSearch */, "walmart" /* Walmart */, "target_product" /* TargetProduct */, "target_search" /* TargetSearch */, "target" /* Target */, "universal" /* Universal */, "chatgpt" /* Chatgpt */, "perplexity" /* Perplexity */, "gemini" /* Gemini */, "bbb" /* Bbb */, "autotrader" /* Autotrader */, "mobile" /* Mobile */, "airbnb" /* Airbnb */, "apple_app_store" /* AppleAppStore */, "tiktok_post" /* TiktokPost */, "tiktok_shop_search" /* TiktokShopSearch */, "tiktok_shop_product" /* TiktokShopProduct */, "tiktok" /* Tiktok */, "
|
|
227
|
+
var targets = ["google_search" /* GoogleSearch */, "google_travel_hotels" /* GoogleTravelHotels */, "google" /* Google */, "google_ai_mode" /* GoogleAiMode */, "google_ads" /* GoogleAds */, "google_lens" /* GoogleLens */, "bing_search" /* BingSearch */, "bing" /* Bing */, "amazon_product" /* AmazonProduct */, "amazon_pricing" /* AmazonPricing */, "amazon_search" /* AmazonSearch */, "amazon_sellers" /* AmazonSellers */, "amazon_bestsellers" /* AmazonBestsellers */, "amazon" /* Amazon */, "walmart_product" /* WalmartProduct */, "walmart_search" /* WalmartSearch */, "walmart" /* Walmart */, "target_product" /* TargetProduct */, "target_search" /* TargetSearch */, "target" /* Target */, "universal" /* Universal */, "chatgpt" /* Chatgpt */, "perplexity" /* Perplexity */, "gemini" /* Gemini */, "bbb" /* Bbb */, "autotrader" /* Autotrader */, "mobile" /* Mobile */, "airbnb" /* Airbnb */, "apple_app_store" /* AppleAppStore */, "tiktok_post" /* TiktokPost */, "tiktok_shop_search" /* TiktokShopSearch */, "tiktok_shop_product" /* TiktokShopProduct */, "tiktok" /* Tiktok */, "youtube_metadata" /* YoutubeMetadata */, "youtube_search" /* YoutubeSearch */, "youtube_subtitles" /* YoutubeSubtitles */, "youtube_channel" /* YoutubeChannel */];
|
|
231
228
|
var targetMeta = {
|
|
232
229
|
["google_search" /* GoogleSearch */]: {
|
|
233
230
|
group: "Google",
|
|
@@ -332,7 +329,7 @@ var targetMeta = {
|
|
|
332
329
|
["universal" /* Universal */]: {
|
|
333
330
|
group: "Universal",
|
|
334
331
|
response_format: "html",
|
|
335
|
-
parameters: ["url", "payload", "proxy_pool", "http_method", "headless", "geo", "locale", "device_type", "session_id", "successful_status_codes", "headers", "cookies", "force_headers", "force_cookies", "xhr", "markdown", "callback_url"]
|
|
332
|
+
parameters: ["url", "payload", "proxy_pool", "http_method", "headless", "geo", "locale", "device_type", "session_id", "successful_status_codes", "headers", "cookies", "force_headers", "force_cookies", "xhr", "markdown", "main_content", "callback_url"]
|
|
336
333
|
},
|
|
337
334
|
["chatgpt" /* Chatgpt */]: {
|
|
338
335
|
group: "AI Tools",
|
|
@@ -394,21 +391,6 @@ var targetMeta = {
|
|
|
394
391
|
response_format: "html",
|
|
395
392
|
parameters: ["url", "headless", "user_agent_type", "callback_url"]
|
|
396
393
|
},
|
|
397
|
-
["reddit_post" /* RedditPost */]: {
|
|
398
|
-
group: "Reddit",
|
|
399
|
-
response_format: "json",
|
|
400
|
-
parameters: ["url", "locale", "geo", "callback_url"]
|
|
401
|
-
},
|
|
402
|
-
["reddit_subreddit" /* RedditSubreddit */]: {
|
|
403
|
-
group: "Reddit",
|
|
404
|
-
response_format: "json",
|
|
405
|
-
parameters: ["url", "locale", "geo", "callback_url"]
|
|
406
|
-
},
|
|
407
|
-
["reddit_user" /* RedditUser */]: {
|
|
408
|
-
group: "Reddit",
|
|
409
|
-
response_format: "json",
|
|
410
|
-
parameters: ["url", "locale", "geo", "sort", "callback_url"]
|
|
411
|
-
},
|
|
412
394
|
["youtube_metadata" /* YoutubeMetadata */]: {
|
|
413
395
|
group: "YouTube",
|
|
414
396
|
response_format: "json",
|
|
@@ -1505,6 +1487,9 @@ var requestJsonSchemas = {
|
|
|
1505
1487
|
"markdown": {
|
|
1506
1488
|
"type": "boolean"
|
|
1507
1489
|
},
|
|
1490
|
+
"main_content": {
|
|
1491
|
+
"type": "boolean"
|
|
1492
|
+
},
|
|
1508
1493
|
"callback_url": {
|
|
1509
1494
|
"type": "string"
|
|
1510
1495
|
}
|
|
@@ -1926,84 +1911,6 @@ var requestJsonSchemas = {
|
|
|
1926
1911
|
],
|
|
1927
1912
|
"additionalProperties": false
|
|
1928
1913
|
},
|
|
1929
|
-
["reddit_post" /* RedditPost */]: {
|
|
1930
|
-
"type": "object",
|
|
1931
|
-
"properties": {
|
|
1932
|
-
"target": {
|
|
1933
|
-
"const": "reddit_post"
|
|
1934
|
-
},
|
|
1935
|
-
"url": {
|
|
1936
|
-
"type": "string",
|
|
1937
|
-
"maxLength": 2056
|
|
1938
|
-
},
|
|
1939
|
-
"locale": {
|
|
1940
|
-
"type": "string"
|
|
1941
|
-
},
|
|
1942
|
-
"geo": {
|
|
1943
|
-
"type": "string"
|
|
1944
|
-
},
|
|
1945
|
-
"callback_url": {
|
|
1946
|
-
"type": "string"
|
|
1947
|
-
}
|
|
1948
|
-
},
|
|
1949
|
-
"required": [
|
|
1950
|
-
"target"
|
|
1951
|
-
],
|
|
1952
|
-
"additionalProperties": false
|
|
1953
|
-
},
|
|
1954
|
-
["reddit_subreddit" /* RedditSubreddit */]: {
|
|
1955
|
-
"type": "object",
|
|
1956
|
-
"properties": {
|
|
1957
|
-
"target": {
|
|
1958
|
-
"const": "reddit_subreddit"
|
|
1959
|
-
},
|
|
1960
|
-
"url": {
|
|
1961
|
-
"type": "string",
|
|
1962
|
-
"maxLength": 2056
|
|
1963
|
-
},
|
|
1964
|
-
"locale": {
|
|
1965
|
-
"type": "string"
|
|
1966
|
-
},
|
|
1967
|
-
"geo": {
|
|
1968
|
-
"type": "string"
|
|
1969
|
-
},
|
|
1970
|
-
"callback_url": {
|
|
1971
|
-
"type": "string"
|
|
1972
|
-
}
|
|
1973
|
-
},
|
|
1974
|
-
"required": [
|
|
1975
|
-
"target"
|
|
1976
|
-
],
|
|
1977
|
-
"additionalProperties": false
|
|
1978
|
-
},
|
|
1979
|
-
["reddit_user" /* RedditUser */]: {
|
|
1980
|
-
"type": "object",
|
|
1981
|
-
"properties": {
|
|
1982
|
-
"target": {
|
|
1983
|
-
"const": "reddit_user"
|
|
1984
|
-
},
|
|
1985
|
-
"url": {
|
|
1986
|
-
"type": "string",
|
|
1987
|
-
"maxLength": 2056
|
|
1988
|
-
},
|
|
1989
|
-
"locale": {
|
|
1990
|
-
"type": "string"
|
|
1991
|
-
},
|
|
1992
|
-
"geo": {
|
|
1993
|
-
"type": "string"
|
|
1994
|
-
},
|
|
1995
|
-
"sort": {
|
|
1996
|
-
"type": "string"
|
|
1997
|
-
},
|
|
1998
|
-
"callback_url": {
|
|
1999
|
-
"type": "string"
|
|
2000
|
-
}
|
|
2001
|
-
},
|
|
2002
|
-
"required": [
|
|
2003
|
-
"target"
|
|
2004
|
-
],
|
|
2005
|
-
"additionalProperties": false
|
|
2006
|
-
},
|
|
2007
1914
|
["youtube_metadata" /* YoutubeMetadata */]: {
|
|
2008
1915
|
"type": "object",
|
|
2009
1916
|
"properties": {
|
|
@@ -2177,9 +2084,6 @@ var requestSchemas = {
|
|
|
2177
2084
|
["tiktok_shop_search" /* TiktokShopSearch */]: z.fromJSONSchema(requestJsonSchemas["tiktok_shop_search" /* TiktokShopSearch */]),
|
|
2178
2085
|
["tiktok_shop_product" /* TiktokShopProduct */]: z.fromJSONSchema(requestJsonSchemas["tiktok_shop_product" /* TiktokShopProduct */]),
|
|
2179
2086
|
["tiktok" /* Tiktok */]: z.fromJSONSchema(requestJsonSchemas["tiktok" /* Tiktok */]),
|
|
2180
|
-
["reddit_post" /* RedditPost */]: z.fromJSONSchema(requestJsonSchemas["reddit_post" /* RedditPost */]),
|
|
2181
|
-
["reddit_subreddit" /* RedditSubreddit */]: z.fromJSONSchema(requestJsonSchemas["reddit_subreddit" /* RedditSubreddit */]),
|
|
2182
|
-
["reddit_user" /* RedditUser */]: z.fromJSONSchema(requestJsonSchemas["reddit_user" /* RedditUser */]),
|
|
2183
2087
|
["youtube_metadata" /* YoutubeMetadata */]: z.fromJSONSchema(requestJsonSchemas["youtube_metadata" /* YoutubeMetadata */]),
|
|
2184
2088
|
["youtube_search" /* YoutubeSearch */]: z.fromJSONSchema(requestJsonSchemas["youtube_search" /* YoutubeSearch */]),
|
|
2185
2089
|
["youtube_subtitles" /* YoutubeSubtitles */]: z.fromJSONSchema(requestJsonSchemas["youtube_subtitles" /* YoutubeSubtitles */]),
|
|
@@ -2942,11 +2846,11 @@ var parameterMeta = {
|
|
|
2942
2846
|
cookies: { type: "object" },
|
|
2943
2847
|
force_headers: { type: "boolean" },
|
|
2944
2848
|
force_cookies: { type: "boolean" },
|
|
2849
|
+
main_content: { type: "boolean" },
|
|
2945
2850
|
prompt: { type: "string", maxLength: 8192 },
|
|
2946
2851
|
search: { type: "boolean" },
|
|
2947
2852
|
country: { type: "string" },
|
|
2948
2853
|
user_agent_type: { type: "string" },
|
|
2949
|
-
sort: { type: "string" },
|
|
2950
2854
|
upload_date: { type: "string" },
|
|
2951
2855
|
type: { type: "string" },
|
|
2952
2856
|
duration: { type: "string" },
|
package/build/cjs/index.d.cts
CHANGED
|
@@ -64,9 +64,6 @@ export declare enum Target {
|
|
|
64
64
|
TiktokShopSearch = "tiktok_shop_search",
|
|
65
65
|
TiktokShopProduct = "tiktok_shop_product",
|
|
66
66
|
Tiktok = "tiktok",
|
|
67
|
-
RedditPost = "reddit_post",
|
|
68
|
-
RedditSubreddit = "reddit_subreddit",
|
|
69
|
-
RedditUser = "reddit_user",
|
|
70
67
|
YoutubeMetadata = "youtube_metadata",
|
|
71
68
|
YoutubeSearch = "youtube_search",
|
|
72
69
|
YoutubeSubtitles = "youtube_subtitles",
|
|
@@ -108,9 +105,6 @@ export declare const targets: readonly [
|
|
|
108
105
|
Target.TiktokShopSearch,
|
|
109
106
|
Target.TiktokShopProduct,
|
|
110
107
|
Target.Tiktok,
|
|
111
|
-
Target.RedditPost,
|
|
112
|
-
Target.RedditSubreddit,
|
|
113
|
-
Target.RedditUser,
|
|
114
108
|
Target.YoutubeMetadata,
|
|
115
109
|
Target.YoutubeSearch,
|
|
116
110
|
Target.YoutubeSubtitles,
|
|
@@ -393,6 +387,7 @@ export interface UniversalParams {
|
|
|
393
387
|
force_cookies?: boolean;
|
|
394
388
|
xhr?: boolean;
|
|
395
389
|
markdown?: boolean;
|
|
390
|
+
main_content?: boolean;
|
|
396
391
|
callback_url?: string;
|
|
397
392
|
}
|
|
398
393
|
export interface ChatgptParams {
|
|
@@ -494,25 +489,6 @@ export interface TiktokParams {
|
|
|
494
489
|
user_agent_type?: string;
|
|
495
490
|
callback_url?: string;
|
|
496
491
|
}
|
|
497
|
-
export interface RedditPostParams {
|
|
498
|
-
url?: string;
|
|
499
|
-
locale?: string;
|
|
500
|
-
geo?: string;
|
|
501
|
-
callback_url?: string;
|
|
502
|
-
}
|
|
503
|
-
export interface RedditSubredditParams {
|
|
504
|
-
url?: string;
|
|
505
|
-
locale?: string;
|
|
506
|
-
geo?: string;
|
|
507
|
-
callback_url?: string;
|
|
508
|
-
}
|
|
509
|
-
export interface RedditUserParams {
|
|
510
|
-
url?: string;
|
|
511
|
-
locale?: string;
|
|
512
|
-
geo?: string;
|
|
513
|
-
sort?: string;
|
|
514
|
-
callback_url?: string;
|
|
515
|
-
}
|
|
516
492
|
export interface YoutubeMetadataParams {
|
|
517
493
|
query?: string;
|
|
518
494
|
callback_url?: string;
|
|
@@ -583,9 +559,6 @@ export type TargetParamsMap = {
|
|
|
583
559
|
[Target.TiktokShopSearch]: TiktokShopSearchParams;
|
|
584
560
|
[Target.TiktokShopProduct]: TiktokShopProductParams;
|
|
585
561
|
[Target.Tiktok]: TiktokParams;
|
|
586
|
-
[Target.RedditPost]: RedditPostParams;
|
|
587
|
-
[Target.RedditSubreddit]: RedditSubredditParams;
|
|
588
|
-
[Target.RedditUser]: RedditUserParams;
|
|
589
562
|
[Target.YoutubeMetadata]: YoutubeMetadataParams;
|
|
590
563
|
[Target.YoutubeSearch]: YoutubeSearchParams;
|
|
591
564
|
[Target.YoutubeSubtitles]: YoutubeSubtitlesParams;
|
|
@@ -743,6 +716,10 @@ export interface MapSiteResponse {
|
|
|
743
716
|
status_code: number;
|
|
744
717
|
url: string;
|
|
745
718
|
sitemap_status: "include" | "only" | "skip";
|
|
719
|
+
/**
|
|
720
|
+
* Present when discovery was incomplete, for example the seed page or the sitemap could not be read, child sitemaps were skipped, or the sitemap file cap was hit. Absent when every source was read in full.
|
|
721
|
+
*/
|
|
722
|
+
warning?: string;
|
|
746
723
|
map_id: string;
|
|
747
724
|
/**
|
|
748
725
|
* UTC timestamp formatted as "YYYY-MM-DD HH:MM:SS". Not RFC 3339.
|
|
@@ -120,6 +120,10 @@ export interface MapSiteResponse {
|
|
|
120
120
|
status_code: number;
|
|
121
121
|
url: string;
|
|
122
122
|
sitemap_status: 'include' | 'only' | 'skip';
|
|
123
|
+
/**
|
|
124
|
+
* Present when discovery was incomplete, for example the seed page or the sitemap could not be read, child sitemaps were skipped, or the sitemap file cap was hit. Absent when every source was read in full.
|
|
125
|
+
*/
|
|
126
|
+
warning?: string;
|
|
123
127
|
map_id: string;
|
|
124
128
|
/**
|
|
125
129
|
* UTC timestamp formatted as "YYYY-MM-DD HH:MM:SS". Not RFC 3339.
|
|
@@ -44,11 +44,11 @@ export const parameterMeta = {
|
|
|
44
44
|
cookies: { type: "object" },
|
|
45
45
|
force_headers: { type: "boolean" },
|
|
46
46
|
force_cookies: { type: "boolean" },
|
|
47
|
+
main_content: { type: "boolean" },
|
|
47
48
|
prompt: { type: "string", maxLength: 8192 },
|
|
48
49
|
search: { type: "boolean" },
|
|
49
50
|
country: { type: "string" },
|
|
50
51
|
user_agent_type: { type: "string" },
|
|
51
|
-
sort: { type: "string" },
|
|
52
52
|
upload_date: { type: "string" },
|
|
53
53
|
type: { type: "string" },
|
|
54
54
|
duration: { type: "string" },
|
|
@@ -973,6 +973,9 @@ export declare const requestJsonSchemas: {
|
|
|
973
973
|
readonly markdown: {
|
|
974
974
|
readonly type: "boolean";
|
|
975
975
|
};
|
|
976
|
+
readonly main_content: {
|
|
977
|
+
readonly type: "boolean";
|
|
978
|
+
};
|
|
976
979
|
readonly callback_url: {
|
|
977
980
|
readonly type: "string";
|
|
978
981
|
};
|
|
@@ -1344,78 +1347,6 @@ export declare const requestJsonSchemas: {
|
|
|
1344
1347
|
readonly required: readonly ["target"];
|
|
1345
1348
|
readonly additionalProperties: false;
|
|
1346
1349
|
};
|
|
1347
|
-
readonly reddit_post: {
|
|
1348
|
-
readonly type: "object";
|
|
1349
|
-
readonly properties: {
|
|
1350
|
-
readonly target: {
|
|
1351
|
-
readonly const: "reddit_post";
|
|
1352
|
-
};
|
|
1353
|
-
readonly url: {
|
|
1354
|
-
readonly type: "string";
|
|
1355
|
-
readonly maxLength: 2056;
|
|
1356
|
-
};
|
|
1357
|
-
readonly locale: {
|
|
1358
|
-
readonly type: "string";
|
|
1359
|
-
};
|
|
1360
|
-
readonly geo: {
|
|
1361
|
-
readonly type: "string";
|
|
1362
|
-
};
|
|
1363
|
-
readonly callback_url: {
|
|
1364
|
-
readonly type: "string";
|
|
1365
|
-
};
|
|
1366
|
-
};
|
|
1367
|
-
readonly required: readonly ["target"];
|
|
1368
|
-
readonly additionalProperties: false;
|
|
1369
|
-
};
|
|
1370
|
-
readonly reddit_subreddit: {
|
|
1371
|
-
readonly type: "object";
|
|
1372
|
-
readonly properties: {
|
|
1373
|
-
readonly target: {
|
|
1374
|
-
readonly const: "reddit_subreddit";
|
|
1375
|
-
};
|
|
1376
|
-
readonly url: {
|
|
1377
|
-
readonly type: "string";
|
|
1378
|
-
readonly maxLength: 2056;
|
|
1379
|
-
};
|
|
1380
|
-
readonly locale: {
|
|
1381
|
-
readonly type: "string";
|
|
1382
|
-
};
|
|
1383
|
-
readonly geo: {
|
|
1384
|
-
readonly type: "string";
|
|
1385
|
-
};
|
|
1386
|
-
readonly callback_url: {
|
|
1387
|
-
readonly type: "string";
|
|
1388
|
-
};
|
|
1389
|
-
};
|
|
1390
|
-
readonly required: readonly ["target"];
|
|
1391
|
-
readonly additionalProperties: false;
|
|
1392
|
-
};
|
|
1393
|
-
readonly reddit_user: {
|
|
1394
|
-
readonly type: "object";
|
|
1395
|
-
readonly properties: {
|
|
1396
|
-
readonly target: {
|
|
1397
|
-
readonly const: "reddit_user";
|
|
1398
|
-
};
|
|
1399
|
-
readonly url: {
|
|
1400
|
-
readonly type: "string";
|
|
1401
|
-
readonly maxLength: 2056;
|
|
1402
|
-
};
|
|
1403
|
-
readonly locale: {
|
|
1404
|
-
readonly type: "string";
|
|
1405
|
-
};
|
|
1406
|
-
readonly geo: {
|
|
1407
|
-
readonly type: "string";
|
|
1408
|
-
};
|
|
1409
|
-
readonly sort: {
|
|
1410
|
-
readonly type: "string";
|
|
1411
|
-
};
|
|
1412
|
-
readonly callback_url: {
|
|
1413
|
-
readonly type: "string";
|
|
1414
|
-
};
|
|
1415
|
-
};
|
|
1416
|
-
readonly required: readonly ["target"];
|
|
1417
|
-
readonly additionalProperties: false;
|
|
1418
|
-
};
|
|
1419
1350
|
readonly youtube_metadata: {
|
|
1420
1351
|
readonly type: "object";
|
|
1421
1352
|
readonly properties: {
|
|
@@ -1074,6 +1074,9 @@ export const requestJsonSchemas = {
|
|
|
1074
1074
|
"markdown": {
|
|
1075
1075
|
"type": "boolean"
|
|
1076
1076
|
},
|
|
1077
|
+
"main_content": {
|
|
1078
|
+
"type": "boolean"
|
|
1079
|
+
},
|
|
1077
1080
|
"callback_url": {
|
|
1078
1081
|
"type": "string"
|
|
1079
1082
|
}
|
|
@@ -1495,84 +1498,6 @@ export const requestJsonSchemas = {
|
|
|
1495
1498
|
],
|
|
1496
1499
|
"additionalProperties": false
|
|
1497
1500
|
},
|
|
1498
|
-
[Target.RedditPost]: {
|
|
1499
|
-
"type": "object",
|
|
1500
|
-
"properties": {
|
|
1501
|
-
"target": {
|
|
1502
|
-
"const": "reddit_post"
|
|
1503
|
-
},
|
|
1504
|
-
"url": {
|
|
1505
|
-
"type": "string",
|
|
1506
|
-
"maxLength": 2056
|
|
1507
|
-
},
|
|
1508
|
-
"locale": {
|
|
1509
|
-
"type": "string"
|
|
1510
|
-
},
|
|
1511
|
-
"geo": {
|
|
1512
|
-
"type": "string"
|
|
1513
|
-
},
|
|
1514
|
-
"callback_url": {
|
|
1515
|
-
"type": "string"
|
|
1516
|
-
}
|
|
1517
|
-
},
|
|
1518
|
-
"required": [
|
|
1519
|
-
"target"
|
|
1520
|
-
],
|
|
1521
|
-
"additionalProperties": false
|
|
1522
|
-
},
|
|
1523
|
-
[Target.RedditSubreddit]: {
|
|
1524
|
-
"type": "object",
|
|
1525
|
-
"properties": {
|
|
1526
|
-
"target": {
|
|
1527
|
-
"const": "reddit_subreddit"
|
|
1528
|
-
},
|
|
1529
|
-
"url": {
|
|
1530
|
-
"type": "string",
|
|
1531
|
-
"maxLength": 2056
|
|
1532
|
-
},
|
|
1533
|
-
"locale": {
|
|
1534
|
-
"type": "string"
|
|
1535
|
-
},
|
|
1536
|
-
"geo": {
|
|
1537
|
-
"type": "string"
|
|
1538
|
-
},
|
|
1539
|
-
"callback_url": {
|
|
1540
|
-
"type": "string"
|
|
1541
|
-
}
|
|
1542
|
-
},
|
|
1543
|
-
"required": [
|
|
1544
|
-
"target"
|
|
1545
|
-
],
|
|
1546
|
-
"additionalProperties": false
|
|
1547
|
-
},
|
|
1548
|
-
[Target.RedditUser]: {
|
|
1549
|
-
"type": "object",
|
|
1550
|
-
"properties": {
|
|
1551
|
-
"target": {
|
|
1552
|
-
"const": "reddit_user"
|
|
1553
|
-
},
|
|
1554
|
-
"url": {
|
|
1555
|
-
"type": "string",
|
|
1556
|
-
"maxLength": 2056
|
|
1557
|
-
},
|
|
1558
|
-
"locale": {
|
|
1559
|
-
"type": "string"
|
|
1560
|
-
},
|
|
1561
|
-
"geo": {
|
|
1562
|
-
"type": "string"
|
|
1563
|
-
},
|
|
1564
|
-
"sort": {
|
|
1565
|
-
"type": "string"
|
|
1566
|
-
},
|
|
1567
|
-
"callback_url": {
|
|
1568
|
-
"type": "string"
|
|
1569
|
-
}
|
|
1570
|
-
},
|
|
1571
|
-
"required": [
|
|
1572
|
-
"target"
|
|
1573
|
-
],
|
|
1574
|
-
"additionalProperties": false
|
|
1575
|
-
},
|
|
1576
1501
|
[Target.YoutubeMetadata]: {
|
|
1577
1502
|
"type": "object",
|
|
1578
1503
|
"properties": {
|
|
@@ -1746,9 +1671,6 @@ export const requestSchemas = {
|
|
|
1746
1671
|
[Target.TiktokShopSearch]: z.fromJSONSchema(requestJsonSchemas[Target.TiktokShopSearch]),
|
|
1747
1672
|
[Target.TiktokShopProduct]: z.fromJSONSchema(requestJsonSchemas[Target.TiktokShopProduct]),
|
|
1748
1673
|
[Target.Tiktok]: z.fromJSONSchema(requestJsonSchemas[Target.Tiktok]),
|
|
1749
|
-
[Target.RedditPost]: z.fromJSONSchema(requestJsonSchemas[Target.RedditPost]),
|
|
1750
|
-
[Target.RedditSubreddit]: z.fromJSONSchema(requestJsonSchemas[Target.RedditSubreddit]),
|
|
1751
|
-
[Target.RedditUser]: z.fromJSONSchema(requestJsonSchemas[Target.RedditUser]),
|
|
1752
1674
|
[Target.YoutubeMetadata]: z.fromJSONSchema(requestJsonSchemas[Target.YoutubeMetadata]),
|
|
1753
1675
|
[Target.YoutubeSearch]: z.fromJSONSchema(requestJsonSchemas[Target.YoutubeSearch]),
|
|
1754
1676
|
[Target.YoutubeSubtitles]: z.fromJSONSchema(requestJsonSchemas[Target.YoutubeSubtitles]),
|
|
@@ -35,9 +35,6 @@ export declare enum Target {
|
|
|
35
35
|
TiktokShopSearch = "tiktok_shop_search",
|
|
36
36
|
TiktokShopProduct = "tiktok_shop_product",
|
|
37
37
|
Tiktok = "tiktok",
|
|
38
|
-
RedditPost = "reddit_post",
|
|
39
|
-
RedditSubreddit = "reddit_subreddit",
|
|
40
|
-
RedditUser = "reddit_user",
|
|
41
38
|
YoutubeMetadata = "youtube_metadata",
|
|
42
39
|
YoutubeSearch = "youtube_search",
|
|
43
40
|
YoutubeSubtitles = "youtube_subtitles",
|
|
@@ -45,7 +42,7 @@ export declare enum Target {
|
|
|
45
42
|
}
|
|
46
43
|
/** API discriminator string literals (same values as {@link Target}). */
|
|
47
44
|
export type TargetString = (typeof Target)[keyof typeof Target];
|
|
48
|
-
export declare const targets: readonly [Target.GoogleSearch, Target.GoogleTravelHotels, Target.Google, Target.GoogleAiMode, Target.GoogleAds, Target.GoogleLens, Target.BingSearch, Target.Bing, Target.AmazonProduct, Target.AmazonPricing, Target.AmazonSearch, Target.AmazonSellers, Target.AmazonBestsellers, Target.Amazon, Target.WalmartProduct, Target.WalmartSearch, Target.Walmart, Target.TargetProduct, Target.TargetSearch, Target.Target, Target.Universal, Target.Chatgpt, Target.Perplexity, Target.Gemini, Target.Bbb, Target.Autotrader, Target.Mobile, Target.Airbnb, Target.AppleAppStore, Target.TiktokPost, Target.TiktokShopSearch, Target.TiktokShopProduct, Target.Tiktok, Target.
|
|
45
|
+
export declare const targets: readonly [Target.GoogleSearch, Target.GoogleTravelHotels, Target.Google, Target.GoogleAiMode, Target.GoogleAds, Target.GoogleLens, Target.BingSearch, Target.Bing, Target.AmazonProduct, Target.AmazonPricing, Target.AmazonSearch, Target.AmazonSellers, Target.AmazonBestsellers, Target.Amazon, Target.WalmartProduct, Target.WalmartSearch, Target.Walmart, Target.TargetProduct, Target.TargetSearch, Target.Target, Target.Universal, Target.Chatgpt, Target.Perplexity, Target.Gemini, Target.Bbb, Target.Autotrader, Target.Mobile, Target.Airbnb, Target.AppleAppStore, Target.TiktokPost, Target.TiktokShopSearch, Target.TiktokShopProduct, Target.Tiktok, Target.YoutubeMetadata, Target.YoutubeSearch, Target.YoutubeSubtitles, Target.YoutubeChannel];
|
|
49
46
|
export interface GoogleSearchParams {
|
|
50
47
|
query?: string;
|
|
51
48
|
headless?: 'html' | 'png';
|
|
@@ -323,6 +320,7 @@ export interface UniversalParams {
|
|
|
323
320
|
force_cookies?: boolean;
|
|
324
321
|
xhr?: boolean;
|
|
325
322
|
markdown?: boolean;
|
|
323
|
+
main_content?: boolean;
|
|
326
324
|
callback_url?: string;
|
|
327
325
|
}
|
|
328
326
|
export interface ChatgptParams {
|
|
@@ -424,25 +422,6 @@ export interface TiktokParams {
|
|
|
424
422
|
user_agent_type?: string;
|
|
425
423
|
callback_url?: string;
|
|
426
424
|
}
|
|
427
|
-
export interface RedditPostParams {
|
|
428
|
-
url?: string;
|
|
429
|
-
locale?: string;
|
|
430
|
-
geo?: string;
|
|
431
|
-
callback_url?: string;
|
|
432
|
-
}
|
|
433
|
-
export interface RedditSubredditParams {
|
|
434
|
-
url?: string;
|
|
435
|
-
locale?: string;
|
|
436
|
-
geo?: string;
|
|
437
|
-
callback_url?: string;
|
|
438
|
-
}
|
|
439
|
-
export interface RedditUserParams {
|
|
440
|
-
url?: string;
|
|
441
|
-
locale?: string;
|
|
442
|
-
geo?: string;
|
|
443
|
-
sort?: string;
|
|
444
|
-
callback_url?: string;
|
|
445
|
-
}
|
|
446
425
|
export interface YoutubeMetadataParams {
|
|
447
426
|
query?: string;
|
|
448
427
|
callback_url?: string;
|
|
@@ -513,9 +492,6 @@ export type TargetParamsMap = {
|
|
|
513
492
|
[Target.TiktokShopSearch]: TiktokShopSearchParams;
|
|
514
493
|
[Target.TiktokShopProduct]: TiktokShopProductParams;
|
|
515
494
|
[Target.Tiktok]: TiktokParams;
|
|
516
|
-
[Target.RedditPost]: RedditPostParams;
|
|
517
|
-
[Target.RedditSubreddit]: RedditSubredditParams;
|
|
518
|
-
[Target.RedditUser]: RedditUserParams;
|
|
519
495
|
[Target.YoutubeMetadata]: YoutubeMetadataParams;
|
|
520
496
|
[Target.YoutubeSearch]: YoutubeSearchParams;
|
|
521
497
|
[Target.YoutubeSubtitles]: YoutubeSubtitlesParams;
|
|
@@ -37,15 +37,12 @@ export var Target;
|
|
|
37
37
|
Target["TiktokShopSearch"] = "tiktok_shop_search";
|
|
38
38
|
Target["TiktokShopProduct"] = "tiktok_shop_product";
|
|
39
39
|
Target["Tiktok"] = "tiktok";
|
|
40
|
-
Target["RedditPost"] = "reddit_post";
|
|
41
|
-
Target["RedditSubreddit"] = "reddit_subreddit";
|
|
42
|
-
Target["RedditUser"] = "reddit_user";
|
|
43
40
|
Target["YoutubeMetadata"] = "youtube_metadata";
|
|
44
41
|
Target["YoutubeSearch"] = "youtube_search";
|
|
45
42
|
Target["YoutubeSubtitles"] = "youtube_subtitles";
|
|
46
43
|
Target["YoutubeChannel"] = "youtube_channel";
|
|
47
44
|
})(Target || (Target = {}));
|
|
48
|
-
export const targets = [Target.GoogleSearch, Target.GoogleTravelHotels, Target.Google, Target.GoogleAiMode, Target.GoogleAds, Target.GoogleLens, Target.BingSearch, Target.Bing, Target.AmazonProduct, Target.AmazonPricing, Target.AmazonSearch, Target.AmazonSellers, Target.AmazonBestsellers, Target.Amazon, Target.WalmartProduct, Target.WalmartSearch, Target.Walmart, Target.TargetProduct, Target.TargetSearch, Target.Target, Target.Universal, Target.Chatgpt, Target.Perplexity, Target.Gemini, Target.Bbb, Target.Autotrader, Target.Mobile, Target.Airbnb, Target.AppleAppStore, Target.TiktokPost, Target.TiktokShopSearch, Target.TiktokShopProduct, Target.Tiktok, Target.
|
|
45
|
+
export const targets = [Target.GoogleSearch, Target.GoogleTravelHotels, Target.Google, Target.GoogleAiMode, Target.GoogleAds, Target.GoogleLens, Target.BingSearch, Target.Bing, Target.AmazonProduct, Target.AmazonPricing, Target.AmazonSearch, Target.AmazonSellers, Target.AmazonBestsellers, Target.Amazon, Target.WalmartProduct, Target.WalmartSearch, Target.Walmart, Target.TargetProduct, Target.TargetSearch, Target.Target, Target.Universal, Target.Chatgpt, Target.Perplexity, Target.Gemini, Target.Bbb, Target.Autotrader, Target.Mobile, Target.Airbnb, Target.AppleAppStore, Target.TiktokPost, Target.TiktokShopSearch, Target.TiktokShopProduct, Target.Tiktok, Target.YoutubeMetadata, Target.YoutubeSearch, Target.YoutubeSubtitles, Target.YoutubeChannel];
|
|
49
46
|
export const targetMeta = {
|
|
50
47
|
[Target.GoogleSearch]: {
|
|
51
48
|
group: "Google",
|
|
@@ -150,7 +147,7 @@ export const targetMeta = {
|
|
|
150
147
|
[Target.Universal]: {
|
|
151
148
|
group: "Universal",
|
|
152
149
|
response_format: "html",
|
|
153
|
-
parameters: ["url", "payload", "proxy_pool", "http_method", "headless", "geo", "locale", "device_type", "session_id", "successful_status_codes", "headers", "cookies", "force_headers", "force_cookies", "xhr", "markdown", "callback_url"],
|
|
150
|
+
parameters: ["url", "payload", "proxy_pool", "http_method", "headless", "geo", "locale", "device_type", "session_id", "successful_status_codes", "headers", "cookies", "force_headers", "force_cookies", "xhr", "markdown", "main_content", "callback_url"],
|
|
154
151
|
},
|
|
155
152
|
[Target.Chatgpt]: {
|
|
156
153
|
group: "AI Tools",
|
|
@@ -212,21 +209,6 @@ export const targetMeta = {
|
|
|
212
209
|
response_format: "html",
|
|
213
210
|
parameters: ["url", "headless", "user_agent_type", "callback_url"],
|
|
214
211
|
},
|
|
215
|
-
[Target.RedditPost]: {
|
|
216
|
-
group: "Reddit",
|
|
217
|
-
response_format: "json",
|
|
218
|
-
parameters: ["url", "locale", "geo", "callback_url"],
|
|
219
|
-
},
|
|
220
|
-
[Target.RedditSubreddit]: {
|
|
221
|
-
group: "Reddit",
|
|
222
|
-
response_format: "json",
|
|
223
|
-
parameters: ["url", "locale", "geo", "callback_url"],
|
|
224
|
-
},
|
|
225
|
-
[Target.RedditUser]: {
|
|
226
|
-
group: "Reddit",
|
|
227
|
-
response_format: "json",
|
|
228
|
-
parameters: ["url", "locale", "geo", "sort", "callback_url"],
|
|
229
|
-
},
|
|
230
212
|
[Target.YoutubeMetadata]: {
|
|
231
213
|
group: "YouTube",
|
|
232
214
|
response_format: "json",
|