@decodo/sdk-ts 3.0.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 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, Reddit, YouTube, ChatGPT, Perplexity, and more.
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/..." }` |
@@ -40,7 +40,9 @@ __export(index_exports, {
40
40
  TimeoutError: () => TimeoutError,
41
41
  ValidationError: () => ValidationError,
42
42
  WebScrapingApi: () => WebScrapingApi,
43
+ dataApiRequestSchemas: () => dataApiRequestSchemas,
43
44
  parameterMeta: () => parameterMeta,
45
+ requestSchemas: () => requestSchemas,
44
46
  targetMeta: () => targetMeta,
45
47
  targets: () => targets
46
48
  });
@@ -216,16 +218,13 @@ var Target = /* @__PURE__ */ ((_Target) => {
216
218
  _Target["TiktokShopSearch"] = "tiktok_shop_search";
217
219
  _Target["TiktokShopProduct"] = "tiktok_shop_product";
218
220
  _Target["Tiktok"] = "tiktok";
219
- _Target["RedditPost"] = "reddit_post";
220
- _Target["RedditSubreddit"] = "reddit_subreddit";
221
- _Target["RedditUser"] = "reddit_user";
222
221
  _Target["YoutubeMetadata"] = "youtube_metadata";
223
222
  _Target["YoutubeSearch"] = "youtube_search";
224
223
  _Target["YoutubeSubtitles"] = "youtube_subtitles";
225
224
  _Target["YoutubeChannel"] = "youtube_channel";
226
225
  return _Target;
227
226
  })(Target || {});
228
- 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 */, "reddit_post" /* RedditPost */, "reddit_subreddit" /* RedditSubreddit */, "reddit_user" /* RedditUser */, "youtube_metadata" /* YoutubeMetadata */, "youtube_search" /* YoutubeSearch */, "youtube_subtitles" /* YoutubeSubtitles */, "youtube_channel" /* YoutubeChannel */];
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 */];
229
228
  var targetMeta = {
230
229
  ["google_search" /* GoogleSearch */]: {
231
230
  group: "Google",
@@ -330,7 +329,7 @@ var targetMeta = {
330
329
  ["universal" /* Universal */]: {
331
330
  group: "Universal",
332
331
  response_format: "html",
333
- 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"]
334
333
  },
335
334
  ["chatgpt" /* Chatgpt */]: {
336
335
  group: "AI Tools",
@@ -392,21 +391,6 @@ var targetMeta = {
392
391
  response_format: "html",
393
392
  parameters: ["url", "headless", "user_agent_type", "callback_url"]
394
393
  },
395
- ["reddit_post" /* RedditPost */]: {
396
- group: "Reddit",
397
- response_format: "json",
398
- parameters: ["url", "locale", "geo", "callback_url"]
399
- },
400
- ["reddit_subreddit" /* RedditSubreddit */]: {
401
- group: "Reddit",
402
- response_format: "json",
403
- parameters: ["url", "locale", "geo", "callback_url"]
404
- },
405
- ["reddit_user" /* RedditUser */]: {
406
- group: "Reddit",
407
- response_format: "json",
408
- parameters: ["url", "locale", "geo", "sort", "callback_url"]
409
- },
410
394
  ["youtube_metadata" /* YoutubeMetadata */]: {
411
395
  group: "YouTube",
412
396
  response_format: "json",
@@ -1503,6 +1487,9 @@ var requestJsonSchemas = {
1503
1487
  "markdown": {
1504
1488
  "type": "boolean"
1505
1489
  },
1490
+ "main_content": {
1491
+ "type": "boolean"
1492
+ },
1506
1493
  "callback_url": {
1507
1494
  "type": "string"
1508
1495
  }
@@ -1924,84 +1911,6 @@ var requestJsonSchemas = {
1924
1911
  ],
1925
1912
  "additionalProperties": false
1926
1913
  },
1927
- ["reddit_post" /* RedditPost */]: {
1928
- "type": "object",
1929
- "properties": {
1930
- "target": {
1931
- "const": "reddit_post"
1932
- },
1933
- "url": {
1934
- "type": "string",
1935
- "maxLength": 2056
1936
- },
1937
- "locale": {
1938
- "type": "string"
1939
- },
1940
- "geo": {
1941
- "type": "string"
1942
- },
1943
- "callback_url": {
1944
- "type": "string"
1945
- }
1946
- },
1947
- "required": [
1948
- "target"
1949
- ],
1950
- "additionalProperties": false
1951
- },
1952
- ["reddit_subreddit" /* RedditSubreddit */]: {
1953
- "type": "object",
1954
- "properties": {
1955
- "target": {
1956
- "const": "reddit_subreddit"
1957
- },
1958
- "url": {
1959
- "type": "string",
1960
- "maxLength": 2056
1961
- },
1962
- "locale": {
1963
- "type": "string"
1964
- },
1965
- "geo": {
1966
- "type": "string"
1967
- },
1968
- "callback_url": {
1969
- "type": "string"
1970
- }
1971
- },
1972
- "required": [
1973
- "target"
1974
- ],
1975
- "additionalProperties": false
1976
- },
1977
- ["reddit_user" /* RedditUser */]: {
1978
- "type": "object",
1979
- "properties": {
1980
- "target": {
1981
- "const": "reddit_user"
1982
- },
1983
- "url": {
1984
- "type": "string",
1985
- "maxLength": 2056
1986
- },
1987
- "locale": {
1988
- "type": "string"
1989
- },
1990
- "geo": {
1991
- "type": "string"
1992
- },
1993
- "sort": {
1994
- "type": "string"
1995
- },
1996
- "callback_url": {
1997
- "type": "string"
1998
- }
1999
- },
2000
- "required": [
2001
- "target"
2002
- ],
2003
- "additionalProperties": false
2004
- },
2005
1914
  ["youtube_metadata" /* YoutubeMetadata */]: {
2006
1915
  "type": "object",
2007
1916
  "properties": {
@@ -2175,9 +2084,6 @@ var requestSchemas = {
2175
2084
  ["tiktok_shop_search" /* TiktokShopSearch */]: z.fromJSONSchema(requestJsonSchemas["tiktok_shop_search" /* TiktokShopSearch */]),
2176
2085
  ["tiktok_shop_product" /* TiktokShopProduct */]: z.fromJSONSchema(requestJsonSchemas["tiktok_shop_product" /* TiktokShopProduct */]),
2177
2086
  ["tiktok" /* Tiktok */]: z.fromJSONSchema(requestJsonSchemas["tiktok" /* Tiktok */]),
2178
- ["reddit_post" /* RedditPost */]: z.fromJSONSchema(requestJsonSchemas["reddit_post" /* RedditPost */]),
2179
- ["reddit_subreddit" /* RedditSubreddit */]: z.fromJSONSchema(requestJsonSchemas["reddit_subreddit" /* RedditSubreddit */]),
2180
- ["reddit_user" /* RedditUser */]: z.fromJSONSchema(requestJsonSchemas["reddit_user" /* RedditUser */]),
2181
2087
  ["youtube_metadata" /* YoutubeMetadata */]: z.fromJSONSchema(requestJsonSchemas["youtube_metadata" /* YoutubeMetadata */]),
2182
2088
  ["youtube_search" /* YoutubeSearch */]: z.fromJSONSchema(requestJsonSchemas["youtube_search" /* YoutubeSearch */]),
2183
2089
  ["youtube_subtitles" /* YoutubeSubtitles */]: z.fromJSONSchema(requestJsonSchemas["youtube_subtitles" /* YoutubeSubtitles */]),
@@ -2205,6 +2111,7 @@ var BundledSchema = class _BundledSchema {
2205
2111
  };
2206
2112
 
2207
2113
  // src/generated/data-api.ts
2114
+ var z2 = __toESM(require("zod"), 1);
2208
2115
  var dataApiEndpoints = {
2209
2116
  runSearch: { method: "POST", path: "/v1/search" },
2210
2117
  mapSite: { method: "POST", path: "/v1/map" },
@@ -2214,6 +2121,237 @@ var dataApiEndpoints = {
2214
2121
  getCrawlStatus: { method: "GET", path: "/v1/crawl/{id}/status" },
2215
2122
  cancelCrawl: { method: "POST", path: "/v1/crawl/{id}/cancel" }
2216
2123
  };
2124
+ var dataApiRequestJsonSchemas = {
2125
+ runSearch: {
2126
+ "type": "object",
2127
+ "required": [
2128
+ "query"
2129
+ ],
2130
+ "description": "Fields other than these are dropped before the upstream call.",
2131
+ "properties": {
2132
+ "query": {
2133
+ "type": "string",
2134
+ "minLength": 1
2135
+ },
2136
+ "url": {
2137
+ "type": "string",
2138
+ "minLength": 1
2139
+ },
2140
+ "uule": {
2141
+ "type": "string"
2142
+ },
2143
+ "gl": {
2144
+ "type": "string"
2145
+ },
2146
+ "geo": {
2147
+ "type": "string"
2148
+ },
2149
+ "locale": {
2150
+ "type": "string"
2151
+ },
2152
+ "input_encoding": {
2153
+ "type": "string"
2154
+ },
2155
+ "page": {
2156
+ "type": "number",
2157
+ "minimum": 1,
2158
+ "description": "Not checked to be an integer; forwarded as given."
2159
+ }
2160
+ }
2161
+ },
2162
+ mapSite: {
2163
+ "type": "object",
2164
+ "required": [
2165
+ "url"
2166
+ ],
2167
+ "properties": {
2168
+ "url": {
2169
+ "type": "string",
2170
+ "description": "Absolute http or https URL to map."
2171
+ },
2172
+ "limit": {
2173
+ "type": "integer",
2174
+ "description": "Maximum links to return. Zero, negative or above 147700 all become 147700; nothing is rejected.",
2175
+ "default": 147700
2176
+ },
2177
+ "sitemap": {
2178
+ "type": "string",
2179
+ "enum": [
2180
+ "include",
2181
+ "only",
2182
+ "skip"
2183
+ ],
2184
+ "default": "include"
2185
+ },
2186
+ "domain_filter": {
2187
+ "type": "string",
2188
+ "enum": [
2189
+ "domain",
2190
+ "subdomain",
2191
+ "all"
2192
+ ],
2193
+ "default": "domain"
2194
+ },
2195
+ "geo": {
2196
+ "type": "string"
2197
+ },
2198
+ "locale": {
2199
+ "type": "string"
2200
+ },
2201
+ "JS_rendering": {
2202
+ "type": "boolean",
2203
+ "default": false
2204
+ },
2205
+ "follow_redirects": {
2206
+ "type": "boolean",
2207
+ "default": true
2208
+ },
2209
+ "select_paths": {
2210
+ "description": "Either one pattern or a list of them. Each must compile as a Go regular expression.",
2211
+ "oneOf": [
2212
+ {
2213
+ "type": "string"
2214
+ },
2215
+ {
2216
+ "type": "array",
2217
+ "items": {
2218
+ "type": "string"
2219
+ }
2220
+ }
2221
+ ]
2222
+ },
2223
+ "exclude_paths": {
2224
+ "description": "Either one pattern or a list of them. Each must compile as a Go regular expression.",
2225
+ "oneOf": [
2226
+ {
2227
+ "type": "string"
2228
+ },
2229
+ {
2230
+ "type": "array",
2231
+ "items": {
2232
+ "type": "string"
2233
+ }
2234
+ }
2235
+ ]
2236
+ }
2237
+ }
2238
+ },
2239
+ startCrawl: {
2240
+ "type": "object",
2241
+ "required": [
2242
+ "url"
2243
+ ],
2244
+ "properties": {
2245
+ "url": {
2246
+ "type": "string",
2247
+ "description": "An http or https URL with a host. URLs carrying credentials (user:pass@) are refused."
2248
+ },
2249
+ "limit": {
2250
+ "type": "integer",
2251
+ "minimum": 1,
2252
+ "maximum": 1e4,
2253
+ "default": 10
2254
+ },
2255
+ "max_depth": {
2256
+ "type": "integer",
2257
+ "minimum": 1,
2258
+ "maximum": 1e4,
2259
+ "default": 5
2260
+ },
2261
+ "sitemap": {
2262
+ "type": "string",
2263
+ "enum": [
2264
+ "include",
2265
+ "only",
2266
+ "skip"
2267
+ ],
2268
+ "default": "include"
2269
+ },
2270
+ "domain_filter": {
2271
+ "type": "string",
2272
+ "enum": [
2273
+ "domain",
2274
+ "subdomain",
2275
+ "all"
2276
+ ],
2277
+ "default": "domain"
2278
+ },
2279
+ "output": {
2280
+ "type": "string",
2281
+ "enum": [
2282
+ "markdown",
2283
+ "html"
2284
+ ],
2285
+ "default": "markdown"
2286
+ },
2287
+ "geo": {
2288
+ "type": "string",
2289
+ "pattern": "^[A-Za-z][A-Za-z .'-]{0,58}[A-Za-z]$",
2290
+ "description": "Letters, spaces, dots, apostrophes and hyphens, 2 to 60 characters."
2291
+ },
2292
+ "locale": {
2293
+ "type": "string",
2294
+ "pattern": "^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$",
2295
+ "description": "BCP 47 style, for example en or de-DE."
2296
+ },
2297
+ "follow_redirects": {
2298
+ "type": "boolean"
2299
+ },
2300
+ "JS_retry": {
2301
+ "type": "boolean"
2302
+ },
2303
+ "max_duration": {
2304
+ "type": "integer",
2305
+ "minimum": 0,
2306
+ "maximum": 14400,
2307
+ "description": "Seconds. 0 means the server default. Rejected above the server's ceiling, 4 hours by default; the ceiling is configurable per environment.",
2308
+ "default": 3600
2309
+ },
2310
+ "callback_url": {
2311
+ "type": "string",
2312
+ "description": "http or https URL called when the crawl settles. Internal addresses are refused."
2313
+ },
2314
+ "passthrough": {
2315
+ "type": "string",
2316
+ "maxLength": 8192,
2317
+ "description": "Opaque value echoed back on the callback, at most 8192 bytes. Redacted in logs."
2318
+ },
2319
+ "select_paths": {
2320
+ "description": "Either one pattern or a list of them. Each must compile as a Go regular expression.",
2321
+ "oneOf": [
2322
+ {
2323
+ "type": "string"
2324
+ },
2325
+ {
2326
+ "type": "array",
2327
+ "items": {
2328
+ "type": "string"
2329
+ }
2330
+ }
2331
+ ]
2332
+ },
2333
+ "exclude_paths": {
2334
+ "description": "Either one pattern or a list of them. Each must compile as a Go regular expression.",
2335
+ "oneOf": [
2336
+ {
2337
+ "type": "string"
2338
+ },
2339
+ {
2340
+ "type": "array",
2341
+ "items": {
2342
+ "type": "string"
2343
+ }
2344
+ }
2345
+ ]
2346
+ }
2347
+ }
2348
+ }
2349
+ };
2350
+ var dataApiRequestSchemas = {
2351
+ runSearch: z2.fromJSONSchema(dataApiRequestJsonSchemas.runSearch),
2352
+ mapSite: z2.fromJSONSchema(dataApiRequestJsonSchemas.mapSite),
2353
+ startCrawl: z2.fromJSONSchema(dataApiRequestJsonSchemas.startCrawl)
2354
+ };
2217
2355
 
2218
2356
  // src/api/web-scraping-api.ts
2219
2357
  var SCRAPER_API_ROUTES = {
@@ -2451,7 +2589,7 @@ var DecodoClient = class {
2451
2589
  // src/schema/remote-schema.ts
2452
2590
  var import_node_fs = require("node:fs");
2453
2591
  var import_node_path2 = require("node:path");
2454
- var z2 = __toESM(require("zod"), 1);
2592
+ var z3 = __toESM(require("zod"), 1);
2455
2593
 
2456
2594
  // src/schema/build-target-meta.ts
2457
2595
  var getTargetParameterKeys = (parameterSchema) => {
@@ -2609,7 +2747,7 @@ var buildRequestSchemas = (ir) => {
2609
2747
  )) {
2610
2748
  schemas.set(
2611
2749
  targetKey,
2612
- z2.fromJSONSchema(
2750
+ z3.fromJSONSchema(
2613
2751
  target.parameter_schema
2614
2752
  )
2615
2753
  );
@@ -2708,11 +2846,11 @@ var parameterMeta = {
2708
2846
  cookies: { type: "object" },
2709
2847
  force_headers: { type: "boolean" },
2710
2848
  force_cookies: { type: "boolean" },
2849
+ main_content: { type: "boolean" },
2711
2850
  prompt: { type: "string", maxLength: 8192 },
2712
2851
  search: { type: "boolean" },
2713
2852
  country: { type: "string" },
2714
2853
  user_agent_type: { type: "string" },
2715
- sort: { type: "string" },
2716
2854
  upload_date: { type: "string" },
2717
2855
  type: { type: "string" },
2718
2856
  duration: { type: "string" },
@@ -2743,7 +2881,9 @@ var parameterMeta = {
2743
2881
  TimeoutError,
2744
2882
  ValidationError,
2745
2883
  WebScrapingApi,
2884
+ dataApiRequestSchemas,
2746
2885
  parameterMeta,
2886
+ requestSchemas,
2747
2887
  targetMeta,
2748
2888
  targets
2749
2889
  });
@@ -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.
@@ -951,6 +928,11 @@ declare const dataApiEndpoints: {
951
928
  readonly path: "/v1/crawl/{id}/cancel";
952
929
  };
953
930
  };
931
+ export declare const dataApiRequestSchemas: {
932
+ runSearch: z.ZodObject;
933
+ mapSite: z.ZodObject;
934
+ startCrawl: z.ZodObject;
935
+ };
954
936
  export type CrawlOptions = {
955
937
  pollInterval?: number;
956
938
  timeout?: number;
@@ -1077,7 +1059,7 @@ export declare class DecodoClient {
1077
1059
  }
1078
1060
  export declare class BundledSchema implements DecodoSchema {
1079
1061
  static readonly shared: BundledSchema;
1080
- getRequestSchema(target: string): import("zod").ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>>;
1062
+ getRequestSchema(target: string): import("zod").ZodObject<import("zod/v4/core").$ZodLooseShape, import("zod/v4/core").$strip>;
1081
1063
  listTargets(): string[];
1082
1064
  getTargetMeta(target: string): TargetMeta;
1083
1065
  getTargetParameterSchema(target: string): JSONSchema4 | undefined;
@@ -1098,6 +1080,7 @@ export declare class RemoteSchema implements DecodoSchema {
1098
1080
  getTargetParameterSchema(target: string): JSONSchema4 | undefined;
1099
1081
  getSharedParameters(): Record<string, unknown>;
1100
1082
  }
1083
+ export declare const requestSchemas: Record<Target, z.ZodObject>;
1101
1084
  export type ParameterMeta = {
1102
1085
  type: string;
1103
1086
  maxLength?: number;
@@ -1,3 +1,4 @@
1
+ import * as z from 'zod';
1
2
  /**
2
3
  * Fields other than these are dropped before the upstream call.
3
4
  */
@@ -119,6 +120,10 @@ export interface MapSiteResponse {
119
120
  status_code: number;
120
121
  url: string;
121
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;
122
127
  map_id: string;
123
128
  /**
124
129
  * UTC timestamp formatted as "YYYY-MM-DD HH:MM:SS". Not RFC 3339.
@@ -363,3 +368,8 @@ export declare const dataApiEndpoints: {
363
368
  };
364
369
  };
365
370
  export type DataApiEndpoint = keyof typeof dataApiEndpoints;
371
+ export declare const dataApiRequestSchemas: {
372
+ runSearch: z.ZodObject;
373
+ mapSite: z.ZodObject;
374
+ startCrawl: z.ZodObject;
375
+ };
@@ -1,4 +1,5 @@
1
1
  // Auto-generated by src/codegen/data-api/generate-data-api.ts — do not edit
2
+ import * as z from 'zod';
2
3
  export const dataApiEndpoints = {
3
4
  runSearch: { method: "POST", path: "/v1/search" },
4
5
  mapSite: { method: "POST", path: "/v1/map" },
@@ -8,3 +9,234 @@ export const dataApiEndpoints = {
8
9
  getCrawlStatus: { method: "GET", path: "/v1/crawl/{id}/status" },
9
10
  cancelCrawl: { method: "POST", path: "/v1/crawl/{id}/cancel" },
10
11
  };
12
+ const dataApiRequestJsonSchemas = {
13
+ runSearch: {
14
+ "type": "object",
15
+ "required": [
16
+ "query"
17
+ ],
18
+ "description": "Fields other than these are dropped before the upstream call.",
19
+ "properties": {
20
+ "query": {
21
+ "type": "string",
22
+ "minLength": 1
23
+ },
24
+ "url": {
25
+ "type": "string",
26
+ "minLength": 1
27
+ },
28
+ "uule": {
29
+ "type": "string"
30
+ },
31
+ "gl": {
32
+ "type": "string"
33
+ },
34
+ "geo": {
35
+ "type": "string"
36
+ },
37
+ "locale": {
38
+ "type": "string"
39
+ },
40
+ "input_encoding": {
41
+ "type": "string"
42
+ },
43
+ "page": {
44
+ "type": "number",
45
+ "minimum": 1,
46
+ "description": "Not checked to be an integer; forwarded as given."
47
+ }
48
+ }
49
+ },
50
+ mapSite: {
51
+ "type": "object",
52
+ "required": [
53
+ "url"
54
+ ],
55
+ "properties": {
56
+ "url": {
57
+ "type": "string",
58
+ "description": "Absolute http or https URL to map."
59
+ },
60
+ "limit": {
61
+ "type": "integer",
62
+ "description": "Maximum links to return. Zero, negative or above 147700 all become 147700; nothing is rejected.",
63
+ "default": 147700
64
+ },
65
+ "sitemap": {
66
+ "type": "string",
67
+ "enum": [
68
+ "include",
69
+ "only",
70
+ "skip"
71
+ ],
72
+ "default": "include"
73
+ },
74
+ "domain_filter": {
75
+ "type": "string",
76
+ "enum": [
77
+ "domain",
78
+ "subdomain",
79
+ "all"
80
+ ],
81
+ "default": "domain"
82
+ },
83
+ "geo": {
84
+ "type": "string"
85
+ },
86
+ "locale": {
87
+ "type": "string"
88
+ },
89
+ "JS_rendering": {
90
+ "type": "boolean",
91
+ "default": false
92
+ },
93
+ "follow_redirects": {
94
+ "type": "boolean",
95
+ "default": true
96
+ },
97
+ "select_paths": {
98
+ "description": "Either one pattern or a list of them. Each must compile as a Go regular expression.",
99
+ "oneOf": [
100
+ {
101
+ "type": "string"
102
+ },
103
+ {
104
+ "type": "array",
105
+ "items": {
106
+ "type": "string"
107
+ }
108
+ }
109
+ ]
110
+ },
111
+ "exclude_paths": {
112
+ "description": "Either one pattern or a list of them. Each must compile as a Go regular expression.",
113
+ "oneOf": [
114
+ {
115
+ "type": "string"
116
+ },
117
+ {
118
+ "type": "array",
119
+ "items": {
120
+ "type": "string"
121
+ }
122
+ }
123
+ ]
124
+ }
125
+ }
126
+ },
127
+ startCrawl: {
128
+ "type": "object",
129
+ "required": [
130
+ "url"
131
+ ],
132
+ "properties": {
133
+ "url": {
134
+ "type": "string",
135
+ "description": "An http or https URL with a host. URLs carrying credentials (user:pass@) are refused."
136
+ },
137
+ "limit": {
138
+ "type": "integer",
139
+ "minimum": 1,
140
+ "maximum": 10000,
141
+ "default": 10
142
+ },
143
+ "max_depth": {
144
+ "type": "integer",
145
+ "minimum": 1,
146
+ "maximum": 10000,
147
+ "default": 5
148
+ },
149
+ "sitemap": {
150
+ "type": "string",
151
+ "enum": [
152
+ "include",
153
+ "only",
154
+ "skip"
155
+ ],
156
+ "default": "include"
157
+ },
158
+ "domain_filter": {
159
+ "type": "string",
160
+ "enum": [
161
+ "domain",
162
+ "subdomain",
163
+ "all"
164
+ ],
165
+ "default": "domain"
166
+ },
167
+ "output": {
168
+ "type": "string",
169
+ "enum": [
170
+ "markdown",
171
+ "html"
172
+ ],
173
+ "default": "markdown"
174
+ },
175
+ "geo": {
176
+ "type": "string",
177
+ "pattern": "^[A-Za-z][A-Za-z .'-]{0,58}[A-Za-z]$",
178
+ "description": "Letters, spaces, dots, apostrophes and hyphens, 2 to 60 characters."
179
+ },
180
+ "locale": {
181
+ "type": "string",
182
+ "pattern": "^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$",
183
+ "description": "BCP 47 style, for example en or de-DE."
184
+ },
185
+ "follow_redirects": {
186
+ "type": "boolean"
187
+ },
188
+ "JS_retry": {
189
+ "type": "boolean"
190
+ },
191
+ "max_duration": {
192
+ "type": "integer",
193
+ "minimum": 0,
194
+ "maximum": 14400,
195
+ "description": "Seconds. 0 means the server default. Rejected above the server's ceiling, 4 hours by default; the ceiling is configurable per environment.",
196
+ "default": 3600
197
+ },
198
+ "callback_url": {
199
+ "type": "string",
200
+ "description": "http or https URL called when the crawl settles. Internal addresses are refused."
201
+ },
202
+ "passthrough": {
203
+ "type": "string",
204
+ "maxLength": 8192,
205
+ "description": "Opaque value echoed back on the callback, at most 8192 bytes. Redacted in logs."
206
+ },
207
+ "select_paths": {
208
+ "description": "Either one pattern or a list of them. Each must compile as a Go regular expression.",
209
+ "oneOf": [
210
+ {
211
+ "type": "string"
212
+ },
213
+ {
214
+ "type": "array",
215
+ "items": {
216
+ "type": "string"
217
+ }
218
+ }
219
+ ]
220
+ },
221
+ "exclude_paths": {
222
+ "description": "Either one pattern or a list of them. Each must compile as a Go regular expression.",
223
+ "oneOf": [
224
+ {
225
+ "type": "string"
226
+ },
227
+ {
228
+ "type": "array",
229
+ "items": {
230
+ "type": "string"
231
+ }
232
+ }
233
+ ]
234
+ }
235
+ }
236
+ },
237
+ };
238
+ export const dataApiRequestSchemas = {
239
+ runSearch: z.fromJSONSchema(dataApiRequestJsonSchemas.runSearch),
240
+ mapSite: z.fromJSONSchema(dataApiRequestJsonSchemas.mapSite),
241
+ startCrawl: z.fromJSONSchema(dataApiRequestJsonSchemas.startCrawl),
242
+ };
@@ -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: {
@@ -1547,4 +1478,4 @@ export declare const requestJsonSchemas: {
1547
1478
  readonly additionalProperties: false;
1548
1479
  };
1549
1480
  };
1550
- export declare const requestSchemas: Record<Target, z.ZodType>;
1481
+ export declare const requestSchemas: Record<Target, z.ZodObject>;
@@ -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.RedditPost, Target.RedditSubreddit, Target.RedditUser, Target.YoutubeMetadata, Target.YoutubeSearch, Target.YoutubeSubtitles, Target.YoutubeChannel];
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.RedditPost, Target.RedditSubreddit, Target.RedditUser, Target.YoutubeMetadata, Target.YoutubeSearch, Target.YoutubeSubtitles, Target.YoutubeChannel];
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",
@@ -7,6 +7,8 @@ export { RemoteSchema } from './schema/remote-schema.js';
7
7
  export type { DecodoSchema, RemoteSchemaLoadOptions } from './schema/types.js';
8
8
  export type { TargetString, TargetParamsMap, TargetMeta, ScrapeRequest, BatchRequest, } from './generated/targets.js';
9
9
  export { targets, targetMeta, Target, } from './generated/targets.js';
10
+ export { requestSchemas } from './generated/request-schemas.js';
11
+ export { dataApiRequestSchemas } from './generated/data-api.js';
10
12
  export { parameterMeta } from './generated/parameters.js';
11
13
  export type { ParameterMeta } from './generated/parameters.js';
12
14
  export type { SyncResponse, AsyncTaskResponse, BatchResponse, TaskMetadata, TaskResultsResponse, TaskStatus, ResultEntry, CrawlPage, CrawlPageList, CrawlResult, } from './types/responses.js';
@@ -3,5 +3,7 @@ export { WebScrapingApi } from './api/web-scraping-api.js';
3
3
  export { BundledSchema } from './schema/bundled-schema.js';
4
4
  export { RemoteSchema } from './schema/remote-schema.js';
5
5
  export { targets, targetMeta, Target, } from './generated/targets.js';
6
+ export { requestSchemas } from './generated/request-schemas.js';
7
+ export { dataApiRequestSchemas } from './generated/data-api.js';
6
8
  export { parameterMeta } from './generated/parameters.js';
7
9
  export { DecodoError, AuthenticationError, RateLimitError, ValidationError, TimeoutError, } from './errors.js';
@@ -2,7 +2,7 @@ import type { JSONSchema4 } from 'json-schema';
2
2
  import type { DecodoSchema } from './types.js';
3
3
  export declare class BundledSchema implements DecodoSchema {
4
4
  static readonly shared: BundledSchema;
5
- getRequestSchema(target: string): import("zod").ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>>;
5
+ getRequestSchema(target: string): import("zod").ZodObject<import("zod/v4/core").$ZodLooseShape, import("zod/v4/core").$strip>;
6
6
  listTargets(): string[];
7
7
  getTargetMeta(target: string): import("../index.js").TargetMeta;
8
8
  getTargetParameterSchema(target: string): JSONSchema4 | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decodo/sdk-ts",
3
- "version": "3.0.0",
3
+ "version": "4.0.0",
4
4
  "description": "Official TypeScript SDK for the Decodo APIs",
5
5
  "license": "MIT",
6
6
  "repository": {