scavio 0.14.0 → 0.16.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 CHANGED
@@ -20,17 +20,50 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/index.ts
21
21
  var index_exports = {};
22
22
  __export(index_exports, {
23
+ AirbnbNamespace: () => AirbnbNamespace,
24
+ AmazonNamespace: () => AmazonNamespace,
25
+ AppStoreNamespace: () => AppStoreNamespace,
23
26
  BadRequestError: () => BadRequestError,
27
+ BookingNamespace: () => BookingNamespace,
28
+ CapterraNamespace: () => CapterraNamespace,
29
+ CompaniesHouseNamespace: () => CompaniesHouseNamespace,
30
+ DEFAULT_MAX_REQUESTS_PER_SECOND: () => DEFAULT_MAX_REQUESTS_PER_SECOND,
31
+ EbayNamespace: () => EbayNamespace,
32
+ G2Namespace: () => G2Namespace,
33
+ GlassdoorNamespace: () => GlassdoorNamespace,
34
+ GoogleAdsNamespace: () => GoogleAdsNamespace,
35
+ GoogleNamespace: () => GoogleNamespace,
36
+ GooglePlayNamespace: () => GooglePlayNamespace,
37
+ HomeDepotNamespace: () => HomeDepotNamespace,
38
+ IndeedNamespace: () => IndeedNamespace,
39
+ InstagramNamespace: () => InstagramNamespace,
24
40
  InsufficientCreditsError: () => InsufficientCreditsError,
25
41
  InvalidAPIKeyError: () => InvalidAPIKeyError,
42
+ KuaishouNamespace: () => KuaishouNamespace,
43
+ LinkedInNamespace: () => LinkedInNamespace,
44
+ MAX_REQUESTS_PER_SECOND: () => MAX_REQUESTS_PER_SECOND,
45
+ MetaAdsNamespace: () => MetaAdsNamespace,
26
46
  MissingAPIKeyError: () => MissingAPIKeyError,
27
47
  NotFoundError: () => NotFoundError,
28
48
  RateLimitError: () => RateLimitError,
49
+ RedditNamespace: () => RedditNamespace,
50
+ RedfinNamespace: () => RedfinNamespace,
51
+ SECNamespace: () => SECNamespace,
29
52
  Scavio: () => Scavio,
30
53
  ScavioAPIError: () => ScavioAPIError,
31
54
  ScavioConnectionError: () => ScavioConnectionError,
32
55
  ScavioError: () => ScavioError,
33
- ScavioTimeoutError: () => ScavioTimeoutError
56
+ ScavioTimeoutError: () => ScavioTimeoutError,
57
+ TargetNamespace: () => TargetNamespace,
58
+ ThreadsNamespace: () => ThreadsNamespace,
59
+ TikTokNamespace: () => TikTokNamespace,
60
+ TikTokShopNamespace: () => TikTokShopNamespace,
61
+ TripadvisorNamespace: () => TripadvisorNamespace,
62
+ WalmartNamespace: () => WalmartNamespace,
63
+ XNamespace: () => XNamespace,
64
+ YelpNamespace: () => YelpNamespace,
65
+ YouTubeNamespace: () => YouTubeNamespace,
66
+ ZillowNamespace: () => ZillowNamespace
34
67
  });
35
68
  module.exports = __toCommonJS(index_exports);
36
69
 
@@ -80,12 +113,13 @@ var InsufficientCreditsError = class extends ScavioError {
80
113
  }
81
114
  };
82
115
  var BadRequestError = class extends ScavioError {
83
- statusCode = 400;
116
+ statusCode;
84
117
  responseBody;
85
- constructor(message = "Bad request", responseBody) {
118
+ constructor(message = "Bad request", responseBody, statusCode = 400) {
86
119
  super(message);
87
120
  this.name = "BadRequestError";
88
121
  this.responseBody = responseBody;
122
+ this.statusCode = statusCode;
89
123
  }
90
124
  };
91
125
  var NotFoundError = class extends ScavioError {
@@ -187,7 +221,9 @@ function handleError(statusCode, body) {
187
221
  }
188
222
  const msg = String(error);
189
223
  const responseBody = Object.keys(body).length > 0 ? body : void 0;
190
- if (statusCode === 400) throw new BadRequestError(msg, responseBody);
224
+ if (statusCode === 400 || statusCode === 422) {
225
+ throw new BadRequestError(msg, responseBody, statusCode);
226
+ }
191
227
  if (statusCode === 401) throw new InvalidAPIKeyError(msg, responseBody);
192
228
  if (statusCode === 402) throw new InsufficientCreditsError(msg, responseBody);
193
229
  if (statusCode === 404) throw new NotFoundError(msg, responseBody);
@@ -640,12 +676,71 @@ var WalmartNamespace = class {
640
676
  this.client = client;
641
677
  }
642
678
  client;
679
+ /**
680
+ * Structured Walmart search results: `products[]`, `products_count` and the
681
+ * resolved `location`. Page through with `page` (1-indexed).
682
+ *
683
+ * Costs 1 credit for `domain` "com" or "ca", 2 credits for "com.mx".
684
+ */
643
685
  async search(options) {
644
686
  return this.client._post("/api/v1/walmart/search", options);
645
687
  }
688
+ /**
689
+ * Full product detail: price, rating, images, specifications, availability
690
+ * and seller.
691
+ *
692
+ * Costs 1 credit. Walmart.ca product pages are not fetchable, so this is
693
+ * walmart.com only.
694
+ */
646
695
  async product(options) {
647
696
  return this.client._post("/api/v1/walmart/product", options);
648
697
  }
698
+ /**
699
+ * Customer reviews with ratings, text, author, date and the rating
700
+ * breakdown. 10 reviews per page; advance with `page`.
701
+ *
702
+ * Costs 1 credit.
703
+ */
704
+ async reviews(options) {
705
+ return this.client._post("/api/v1/walmart/reviews", options);
706
+ }
707
+ /**
708
+ * Products within a category, in the same product shape as `search()`.
709
+ * Page through with `page`; `limit` only trims the response.
710
+ *
711
+ * Costs 1 credit for `domain` "com" or "ca", 2 credits for "com.mx".
712
+ */
713
+ async category(options) {
714
+ return this.client._post("/api/v1/walmart/category", options);
715
+ }
716
+ /**
717
+ * Seller offer for a product: price, seller, condition and buy-box flag.
718
+ * Returns the BUY-BOX SELLER ONLY, not the full offer list.
719
+ *
720
+ * Costs 1 credit.
721
+ */
722
+ async offers(options) {
723
+ return this.client._post("/api/v1/walmart/offers", options);
724
+ }
725
+ /**
726
+ * Marketplace seller storefront: name, rating, review count, Pro Seller
727
+ * badge and business details.
728
+ *
729
+ * Costs 1 credit. `seller_id` must be the numeric catalog seller id.
730
+ */
731
+ async seller(options) {
732
+ return this.client._post("/api/v1/walmart/seller", options);
733
+ }
734
+ /**
735
+ * A seller's catalog. Roughly the first 40 items are server-rendered and
736
+ * that is all this returns - there is no pagination. `total_count` reports
737
+ * the seller's real catalog size, which is usually far larger.
738
+ *
739
+ * Costs 1 credit. `seller_id` must be the numeric catalog seller id.
740
+ */
741
+ async sellerProducts(options) {
742
+ return this.client._post("/api/v1/walmart/seller-products", options);
743
+ }
649
744
  };
650
745
 
651
746
  // src/namespaces/youtube.ts
@@ -852,74 +947,1501 @@ var LinkedInNamespace = class {
852
947
  }
853
948
  };
854
949
 
855
- // src/client.ts
856
- var Scavio = class {
857
- google;
858
- amazon;
859
- walmart;
860
- youtube;
861
- reddit;
862
- tiktok;
863
- tiktokShop;
864
- instagram;
865
- x;
866
- linkedin;
867
- apiKey;
868
- baseUrl;
869
- timeout;
870
- maxRetries;
871
- rateLimiter;
872
- constructor(config) {
873
- this.apiKey = config?.apiKey ?? process.env.SCAVIO_API_KEY ?? "";
874
- if (!this.apiKey) {
875
- throw new MissingAPIKeyError();
876
- }
877
- this.baseUrl = (config?.baseUrl ?? BASE_URL).replace(/\/+$/, "");
878
- this.timeout = config?.timeout ?? DEFAULT_TIMEOUT;
879
- this.maxRetries = config?.maxRetries ?? DEFAULT_MAX_RETRIES;
880
- const rps = config?.maxRequestsPerSecond ?? 1;
881
- if (rps < 1 || rps > 10) {
882
- throw new ScavioError("maxRequestsPerSecond must be between 1 and 10");
883
- }
884
- this.rateLimiter = new RateLimiter(rps);
885
- this.google = new GoogleNamespace(this);
886
- this.amazon = new AmazonNamespace(this);
887
- this.walmart = new WalmartNamespace(this);
888
- this.youtube = new YouTubeNamespace(this);
889
- this.reddit = new RedditNamespace(this);
890
- this.tiktok = new TikTokNamespace(this);
891
- this.tiktokShop = new TikTokShopNamespace(this);
892
- this.instagram = new InstagramNamespace(this);
893
- this.x = new XNamespace(this);
894
- this.linkedin = new LinkedInNamespace(this);
950
+ // src/namespaces/threads.ts
951
+ var ThreadsNamespace = class {
952
+ constructor(client) {
953
+ this.client = client;
895
954
  }
896
- /** @internal */
897
- async _post(path, body) {
898
- return request({
899
- method: "POST",
900
- path,
901
- apiKey: this.apiKey,
902
- baseUrl: this.baseUrl,
903
- timeout: this.timeout,
904
- maxRetries: this.maxRetries,
905
- rateLimiter: this.rateLimiter,
906
- body
907
- });
955
+ client;
956
+ /**
957
+ * Profile details for a Threads user. Pass `user_id` or `username`;
958
+ * sending neither returns 422 and no match returns 404.
959
+ *
960
+ * Costs 2 credits by `user_id`, 4 credits by `username`.
961
+ */
962
+ async profile(options) {
963
+ return this.client._post("/api/v1/threads/profile", options);
908
964
  }
909
- /** @internal */
910
- async _get(path) {
911
- return request({
912
- method: "GET",
913
- path,
914
- apiKey: this.apiKey,
915
- baseUrl: this.baseUrl,
916
- timeout: this.timeout,
917
- maxRetries: this.maxRetries,
918
- rateLimiter: this.rateLimiter
919
- });
965
+ /**
966
+ * A user's Threads posts. Advance with the previous response's
967
+ * `next_cursor`. Pass `user_id` or `username`.
968
+ *
969
+ * Costs 2 credits by `user_id`, 4 credits by `username` - and that surcharge
970
+ * applies to every page, so resolve the id once before paging.
971
+ */
972
+ async userPosts(options) {
973
+ return this.client._post("/api/v1/threads/user/posts", options);
974
+ }
975
+ /**
976
+ * A user's replies. Advance with the previous response's `next_cursor`.
977
+ * Pass `user_id` or `username`.
978
+ *
979
+ * Costs 2 credits by `user_id`, 4 credits by `username` - and that surcharge
980
+ * applies to every page, so resolve the id once before paging.
981
+ */
982
+ async userReplies(options) {
983
+ return this.client._post("/api/v1/threads/user/replies", options);
984
+ }
985
+ /**
986
+ * A single post, addressed by `post_id` or by its threads.net `url`.
987
+ * Sending neither returns 422.
988
+ *
989
+ * Costs 2 credits.
990
+ */
991
+ async post(options) {
992
+ return this.client._post("/api/v1/threads/post", options);
993
+ }
994
+ /**
995
+ * Replies to a post. Advance with the previous response's `next_cursor`.
996
+ *
997
+ * Costs 2 credits - this endpoint is never username-keyed, so there is no
998
+ * handle surcharge.
999
+ */
1000
+ async postComments(options) {
1001
+ return this.client._post("/api/v1/threads/post/comments", options);
1002
+ }
1003
+ /**
1004
+ * Threads profiles matching a name or handle. This is people search, and it
1005
+ * is the only search Threads exposes - there is no content/post search.
1006
+ * Use it to turn a handle into the `user_id` every other method prefers.
1007
+ *
1008
+ * Costs 2 credits. Single response, no pagination.
1009
+ */
1010
+ async searchUsers(options) {
1011
+ return this.client._post("/api/v1/threads/search/users", options);
1012
+ }
1013
+ };
1014
+
1015
+ // src/namespaces/kuaishou.ts
1016
+ var KuaishouNamespace = class {
1017
+ constructor(client) {
1018
+ this.client = client;
1019
+ }
1020
+ client;
1021
+ /**
1022
+ * Profile details for a Kuaishou user, addressed by numeric `user_id`.
1023
+ *
1024
+ * Costs 10 credits - the dearest single-object call on the platform. If you
1025
+ * only have a share link, resolve it with `userResolve()` (1 credit) first.
1026
+ */
1027
+ async profile(options) {
1028
+ return this.client._post("/api/v1/kuaishou/profile", options);
1029
+ }
1030
+ /**
1031
+ * A user's top posts. Advance with the previous response's `next_cursor`.
1032
+ *
1033
+ * Costs 1 credit per page.
1034
+ */
1035
+ async userPosts(options) {
1036
+ return this.client._post("/api/v1/kuaishou/user/posts", options);
1037
+ }
1038
+ /**
1039
+ * A user's current live-stream status.
1040
+ *
1041
+ * Costs 1 credit.
1042
+ */
1043
+ async userLive(options) {
1044
+ return this.client._post("/api/v1/kuaishou/user/live", options);
1045
+ }
1046
+ /**
1047
+ * Turns a Kuaishou share link into a `user_id` you can feed to the other
1048
+ * user endpoints. kuaishou.com and v.kuaishou.com links only - kwai.com is
1049
+ * not supported.
1050
+ *
1051
+ * Costs 1 credit.
1052
+ */
1053
+ async userResolve(options) {
1054
+ return this.client._post("/api/v1/kuaishou/user/resolve", options);
1055
+ }
1056
+ /**
1057
+ * A single video, addressed by `photo_id` or by its Kuaishou `url`.
1058
+ * Sending neither returns 422.
1059
+ *
1060
+ * Costs 2 credits.
1061
+ */
1062
+ async video(options) {
1063
+ return this.client._post("/api/v1/kuaishou/video", options);
1064
+ }
1065
+ /**
1066
+ * Comments on a video. Advance with the previous response's `next_cursor`.
1067
+ *
1068
+ * Costs 1 credit per page.
1069
+ */
1070
+ async videoComments(options) {
1071
+ return this.client._post("/api/v1/kuaishou/video/comments", options);
1072
+ }
1073
+ /**
1074
+ * Replies under a root comment. Advance with the previous response's
1075
+ * `next_cursor`; `count` (1-50) sizes the page.
1076
+ *
1077
+ * Costs 1 credit per page.
1078
+ */
1079
+ async commentReplies(options) {
1080
+ return this.client._post("/api/v1/kuaishou/video/sub-comments", options);
920
1081
  }
1082
+ /**
1083
+ * Several videos in one call, up to 20 photo ids (a hard cap - a longer
1084
+ * `photo_ids` array is rejected).
1085
+ *
1086
+ * Costs 40 credits per call, flat, whether you send 1 id or 20 - so batch
1087
+ * to the cap. For a single video `video()` costs 2.
1088
+ */
1089
+ async videosBatch(options) {
1090
+ return this.client._post("/api/v1/kuaishou/videos/batch", options);
1091
+ }
1092
+ /**
1093
+ * Mixed-result search across Kuaishou. Advance with the previous response's
1094
+ * `next_cursor`.
1095
+ *
1096
+ * Costs 10 credits per page.
1097
+ */
921
1098
  async search(options) {
922
- return this.google.search(options);
1099
+ return this.client._post("/api/v1/kuaishou/search", options);
1100
+ }
1101
+ /**
1102
+ * Video search results. Advance with the previous response's `next_cursor`.
1103
+ *
1104
+ * Costs 10 credits per page.
1105
+ */
1106
+ async searchVideos(options) {
1107
+ return this.client._post("/api/v1/kuaishou/search/videos", options);
1108
+ }
1109
+ /**
1110
+ * User search results. Advance with the previous response's `next_cursor`.
1111
+ *
1112
+ * Costs 10 credits per page.
1113
+ */
1114
+ async searchUsers(options) {
1115
+ return this.client._post("/api/v1/kuaishou/search/users", options);
1116
+ }
1117
+ /**
1118
+ * Live-stream search results. Advance with the previous response's
1119
+ * `next_cursor`.
1120
+ *
1121
+ * Costs 10 credits per page.
1122
+ */
1123
+ async searchLive(options) {
1124
+ return this.client._post("/api/v1/kuaishou/search/live", options);
1125
+ }
1126
+ /**
1127
+ * Posts under a hashtag. Advance with the previous response's `next_cursor`.
1128
+ *
1129
+ * Costs 1 credit per page - the cheap way to pull volume, versus 10 for
1130
+ * `search()`.
1131
+ */
1132
+ async tagFeed(options) {
1133
+ return this.client._post("/api/v1/kuaishou/tag/feed", options);
1134
+ }
1135
+ /**
1136
+ * Leaderboards: hot, live, shopping, brand or music. Defaults to "hot".
1137
+ *
1138
+ * Costs 1 credit.
1139
+ */
1140
+ async trending(options = {}) {
1141
+ return this.client._post("/api/v1/kuaishou/trending", options);
1142
+ }
1143
+ };
1144
+
1145
+ // src/namespaces/ebay.ts
1146
+ var EbayNamespace = class {
1147
+ constructor(client) {
1148
+ this.client = client;
1149
+ }
1150
+ client;
1151
+ /**
1152
+ * Structured eBay listing results: price, condition, bids, shipping, seller,
1153
+ * feedback, plus `count` and `total_results`.
1154
+ *
1155
+ * Either `query` or `seller` is required. Set `sold: true` to search
1156
+ * completed listings that actually sold - on that view `total_results` is
1157
+ * always null because eBay publishes no headline count for it.
1158
+ *
1159
+ * Paged with `page`; `per_page` accepts only 60, 120 or 240 and silently
1160
+ * falls back to 60 for any other value.
1161
+ *
1162
+ * Costs 1 credit.
1163
+ */
1164
+ async search(options) {
1165
+ return this.client._post("/api/v1/ebay/search", options);
1166
+ }
1167
+ /**
1168
+ * One eBay listing in full: price, condition, images, item specifics,
1169
+ * shipping, returns, auction state and seller.
1170
+ *
1171
+ * Costs 1 credit. Single response, no pagination.
1172
+ */
1173
+ async product(options) {
1174
+ return this.client._post("/api/v1/ebay/product", options);
1175
+ }
1176
+ /**
1177
+ * A seller's profile card: store name, feedback score and percentage, items
1178
+ * sold, followers, location and categories.
1179
+ *
1180
+ * PROFILE ONLY - it cannot list what the seller is selling. For inventory,
1181
+ * call search({ seller }) with no query and page through it.
1182
+ *
1183
+ * Costs 1 credit. Single response, no pagination.
1184
+ */
1185
+ async seller(options) {
1186
+ return this.client._post("/api/v1/ebay/seller", options);
1187
+ }
1188
+ };
1189
+
1190
+ // src/namespaces/target.ts
1191
+ var TargetNamespace = class {
1192
+ constructor(client) {
1193
+ this.client = client;
1194
+ }
1195
+ client;
1196
+ /**
1197
+ * Search Target.com: prices, ratings, badges and promotions.
1198
+ *
1199
+ * Paged with `page` + `count` (1-28, default 24). `seller_id` and
1200
+ * `seller_name` are null on first-party rows, which means "sold by Target".
1201
+ *
1202
+ * Costs 1 credit. Typically ~9s - it runs through a headless browser.
1203
+ */
1204
+ async search(options) {
1205
+ return this.client._post("/api/v1/target/search", options);
1206
+ }
1207
+ /**
1208
+ * Products in a Target category: the same shape as search() plus the
1209
+ * category breadcrumb.
1210
+ *
1211
+ * Paged with `page` + `count` (1-28, default 24).
1212
+ *
1213
+ * Costs 1 credit. The slowest endpoint here at ~37s - set a generous client
1214
+ * timeout before calling it.
1215
+ */
1216
+ async category(options) {
1217
+ return this.client._post("/api/v1/target/category", options);
1218
+ }
1219
+ /**
1220
+ * Target product details by TCIN: price, rating, images, specifications,
1221
+ * variants, return policy and fulfillment.
1222
+ *
1223
+ * `store_id` is a real request param here - the price and availability you
1224
+ * get back are the store you asked for.
1225
+ *
1226
+ * Costs 1 credit. Typically ~4s. Single response, no pagination.
1227
+ */
1228
+ async product(options) {
1229
+ return this.client._post("/api/v1/target/product", options);
1230
+ }
1231
+ /**
1232
+ * Target reviews with the rating breakdown, per-attribute averages and
1233
+ * guest photos.
1234
+ *
1235
+ * Returns 8 review BODIES MAXIMUM regardless of the product's review_count.
1236
+ * `limit` only trims that set; there is no page or offset param, so the
1237
+ * aggregate distribution is the full-population signal here, not the bodies.
1238
+ *
1239
+ * Costs 1 credit. Typically ~40s.
1240
+ */
1241
+ async reviews(options) {
1242
+ return this.client._post("/api/v1/target/reviews", options);
1243
+ }
1244
+ };
1245
+
1246
+ // src/namespaces/home-depot.ts
1247
+ var HomeDepotNamespace = class {
1248
+ constructor(client) {
1249
+ this.client = client;
1250
+ }
1251
+ client;
1252
+ /**
1253
+ * Search Home Depot: price and promotions, brand and model, ratings,
1254
+ * badges, and per-store pickup/delivery.
1255
+ *
1256
+ * Page size is FIXED at 12 products and cannot be raised - page through
1257
+ * with `page` to read further.
1258
+ *
1259
+ * Costs 2 credits.
1260
+ */
1261
+ async search(options) {
1262
+ return this.client._post("/api/v1/homedepot/search", options);
1263
+ }
1264
+ /**
1265
+ * Full item detail: pricing and promotions, images and videos, the spec
1266
+ * table, dimensions, bullets, documents and return policy.
1267
+ *
1268
+ * Carries only a 10-review PREVIEW - reviews() is the paginated surface.
1269
+ * An unknown item id comes back as 404.
1270
+ *
1271
+ * Costs 2 credits. Single response, no pagination.
1272
+ */
1273
+ async product(options) {
1274
+ return this.client._post("/api/v1/homedepot/product", options);
1275
+ }
1276
+ /**
1277
+ * One page of full review bodies with the rating distribution,
1278
+ * per-attribute ratings, photos and seller responses.
1279
+ *
1280
+ * 30 reviews per page. `total_pages` is the last page that exists; a page
1281
+ * beyond it is a 404, not an empty result.
1282
+ *
1283
+ * Costs 2 credits.
1284
+ */
1285
+ async reviews(options) {
1286
+ return this.client._post("/api/v1/homedepot/reviews", options);
1287
+ }
1288
+ };
1289
+
1290
+ // src/namespaces/zillow.ts
1291
+ var ZillowNamespace = class {
1292
+ constructor(client) {
1293
+ this.client = client;
1294
+ }
1295
+ client;
1296
+ /**
1297
+ * Listings in a region: price, beds, baths, living area, Zestimate,
1298
+ * coordinates, images and days on market.
1299
+ *
1300
+ * Paged with `page`. A bare ZIP works alone but not alongside a filter or a
1301
+ * sort - use the city name when filtering. On listing_status "for_rent",
1302
+ * min_price / max_price are MONTHLY RENT. A region Zillow cannot resolve is
1303
+ * a 404, not an empty list.
1304
+ *
1305
+ * Costs 1 credit.
1306
+ */
1307
+ async search(options) {
1308
+ return this.client._post("/api/v1/zillow/search", options);
1309
+ }
1310
+ /**
1311
+ * Full listing detail: price and price history, Zestimate, tax history,
1312
+ * description, RESO facts, rooms, schools, open houses, photos and
1313
+ * attribution. Rental buildings return floor plans, amenities and unit
1314
+ * counts instead.
1315
+ *
1316
+ * Costs 1 credit. Single response, no pagination.
1317
+ */
1318
+ async property(options) {
1319
+ return this.client._post("/api/v1/zillow/property", options);
1320
+ }
1321
+ /**
1322
+ * An AGENT's profile and reviews: rating, review count, bodies with
1323
+ * sub-ratings, specialties, languages, licenses, service areas and sales
1324
+ * counts.
1325
+ *
1326
+ * This addresses an agent by screen name, NOT a property. Zillow
1327
+ * server-renders the first five reviews only: `count` is what came back,
1328
+ * `total_review_count` is what the agent actually has, and there is no way
1329
+ * to page to the rest.
1330
+ *
1331
+ * Costs 1 credit.
1332
+ */
1333
+ async agentReviews(options) {
1334
+ return this.client._post("/api/v1/zillow/reviews", options);
1335
+ }
1336
+ };
1337
+
1338
+ // src/namespaces/redfin.ts
1339
+ var RedfinNamespace = class {
1340
+ constructor(client) {
1341
+ this.client = client;
1342
+ }
1343
+ client;
1344
+ /**
1345
+ * Redfin listings: price, price per sqft, beds, baths, living area, lot
1346
+ * size, year built, coordinates, listing remarks and full photo galleries.
1347
+ *
1348
+ * Pass `location` (a redfin.com region URL or a bare ZIP - city NAMES are
1349
+ * not accepted) or `region_id` AND `region_type` together. Paged with
1350
+ * `page` + `limit`, up to 350 listings per page.
1351
+ *
1352
+ * `days_on_market` comes back NULL on every row: Redfin's mainHouseInfo has
1353
+ * no `dom` key. Fractional numeric filters are rejected, not rounded.
1354
+ * `sold_within_days` requires `listing_status: "sold"`, and
1355
+ * `max_days_on_market` / `min_days_on_market` cannot be combined.
1356
+ *
1357
+ * Costs 1 credit.
1358
+ */
1359
+ async search(options) {
1360
+ return this.client._post("/api/v1/redfin/search", options);
1361
+ }
1362
+ /**
1363
+ * One Redfin listing in full: price, Redfin Estimate and rental estimate,
1364
+ * complete MLS fact sheet, price and tax history, listing agents, open
1365
+ * houses, schools, climate risk, walkability and location scores, sun
1366
+ * exposure, monthly weather, permits, zoning, comparable sales and photos.
1367
+ *
1368
+ * Reads the property PAGE, whose inlined request cache replaces the ~40
1369
+ * upstream calls that page made - which is why it is the same price as
1370
+ * search().
1371
+ *
1372
+ * Costs 1 credit. Single response, no pagination.
1373
+ */
1374
+ async property(options) {
1375
+ return this.client._post("/api/v1/redfin/property", options);
1376
+ }
1377
+ /**
1378
+ * Housing-market stats for a region: median list and sale price, price per
1379
+ * sqft, sale-to-list ratio, average offers and days on market, YoY
1380
+ * movement, Redfin's 0-100 compete score, live inventory by property type,
1381
+ * median price and active listings per bedroom count, plus Redfin agent
1382
+ * presence and aggregate rating.
1383
+ *
1384
+ * Pass `location` (city NAMES are not accepted) or `region_id` AND
1385
+ * `region_type` together.
1386
+ *
1387
+ * Costs 1 credit. Single response, no pagination.
1388
+ */
1389
+ async market(options) {
1390
+ return this.client._post("/api/v1/redfin/market", options);
1391
+ }
1392
+ };
1393
+
1394
+ // src/namespaces/booking.ts
1395
+ var BookingNamespace = class {
1396
+ constructor(client) {
1397
+ this.client = client;
1398
+ }
1399
+ client;
1400
+ /**
1401
+ * Search Booking.com properties for a destination and stay: live nightly
1402
+ * price, review score, star rating, location, room type and deal badges.
1403
+ *
1404
+ * Either `destination` or `dest_id` is required - without one the request
1405
+ * would land on Booking's homepage, so it is rejected instead of billed.
1406
+ * `dest_type` requires `dest_id`.
1407
+ *
1408
+ * Paged with `page`, 25 properties per page. `checkin` and `checkout` must
1409
+ * be sent together or Booking prices a range of its own choosing.
1410
+ *
1411
+ * Each row carries a `url` - chain it into hotel() rather than rebuilding a
1412
+ * slug, which risks a BILLED 404 on the wrong `country_code`.
1413
+ *
1414
+ * Costs 1 credit.
1415
+ */
1416
+ async search(options) {
1417
+ return this.client._post("/api/v1/booking/search", options);
1418
+ }
1419
+ /**
1420
+ * One Booking.com property in full: rooms and rate plans, facilities, house
1421
+ * rules, check-in windows, policies, images, location and review scores -
1422
+ * priced for the stay you ask for.
1423
+ *
1424
+ * Takes dates because Booking prices a STAY. Omit them and the response
1425
+ * carries prices for a two-night window Booking picked; the response echoes
1426
+ * whichever dates were used.
1427
+ *
1428
+ * Single response, no pagination.
1429
+ *
1430
+ * Costs 1 credit.
1431
+ */
1432
+ async hotel(options) {
1433
+ return this.client._post("/api/v1/booking/hotel", options);
1434
+ }
1435
+ /**
1436
+ * Booking.com guest reviews with the score breakdown by category and
1437
+ * Booking's own praise/complaint summary.
1438
+ *
1439
+ * NO PAGE PARAM - do not invent one. `total_count` is the property's whole
1440
+ * review history; `count` is what this response holds.
1441
+ *
1442
+ * Costs 1 credit.
1443
+ */
1444
+ async reviews(options) {
1445
+ return this.client._post("/api/v1/booking/reviews", options);
1446
+ }
1447
+ };
1448
+
1449
+ // src/namespaces/airbnb.ts
1450
+ var AirbnbNamespace = class {
1451
+ constructor(client) {
1452
+ this.client = client;
1453
+ }
1454
+ client;
1455
+ /**
1456
+ * Search Airbnb stays: stay-total and per-night price with the full
1457
+ * discount ledger, rating and review count, bedrooms/beds/baths,
1458
+ * coordinates, badges, images and `dates_are_defaulted`.
1459
+ *
1460
+ * This is the ONLY endpoint that carries a price - listing() has no nightly
1461
+ * rate field at all.
1462
+ *
1463
+ * Paged with `page` (18 listings per page) XOR `cursor`; `cursor` wins, so
1464
+ * sending both is rejected. `min_price` / `max_price` are WHOLE-STAY totals,
1465
+ * not per night.
1466
+ *
1467
+ * Pass `check_in` + `check_out` together whenever price matters: a dateless
1468
+ * search defaults to +30 days / 5 nights and A/Bs both the window and the
1469
+ * prices, which the response flags as `dates_are_defaulted`.
1470
+ *
1471
+ * Costs 1 credit.
1472
+ */
1473
+ async search(options) {
1474
+ return this.client._post("/api/v1/airbnb/search", options);
1475
+ }
1476
+ /**
1477
+ * One Airbnb listing in full: description, property and room type, capacity
1478
+ * and room counts, the complete grouped amenity list (including the
1479
+ * amenities the place does NOT have), host profile and stats, house rules
1480
+ * with parsed check-in/out times, cancellation policy, sleeping
1481
+ * arrangements, photo tour, every image, and the RATING BREAKDOWN - six
1482
+ * category ratings, the five-bucket star distribution and Airbnb's
1483
+ * AI-synthesised review tags.
1484
+ *
1485
+ * NO NIGHTLY PRICE. The room page carries no rate under any parameters,
1486
+ * with or without dates. Prices come from search() only.
1487
+ *
1488
+ * Single response, no pagination.
1489
+ *
1490
+ * Costs 1 credit.
1491
+ */
1492
+ async listing(options) {
1493
+ return this.client._post("/api/v1/airbnb/listing", options);
1494
+ }
1495
+ /**
1496
+ * Airbnb review BODIES with per-review rating, date, and reviewer name,
1497
+ * photo and location.
1498
+ *
1499
+ * Paged with `limit` (1-50, default 30) + `offset`. Send `limit`
1500
+ * explicitly - upstream returns a fixed 7 rows when none is given.
1501
+ *
1502
+ * `count` is the listing's TOTAL review count; `returned` is how many rows
1503
+ * this page holds. The rating breakdown is NOT here - it lives on
1504
+ * listing().
1505
+ *
1506
+ * Costs 1 credit.
1507
+ */
1508
+ async reviews(options) {
1509
+ return this.client._post("/api/v1/airbnb/reviews", options);
1510
+ }
1511
+ };
1512
+
1513
+ // src/namespaces/tripadvisor.ts
1514
+ var TripadvisorNamespace = class {
1515
+ constructor(client) {
1516
+ this.client = client;
1517
+ }
1518
+ client;
1519
+ /**
1520
+ * START HERE. Resolve a place or business NAME to the Tripadvisor
1521
+ * geo_id / location_id pairs every other endpoint needs.
1522
+ *
1523
+ * A GEO row answers `geo_id` for search(); a business row answers the
1524
+ * `geo_id` + `location_id` pair location() and reviews() take. Those ids
1525
+ * exist only inside Tripadvisor's own URLs, so this is the only entry point
1526
+ * from a name.
1527
+ *
1528
+ * `limit` (1-20, default 12) sizes the response; there is no pagination.
1529
+ *
1530
+ * Costs 2 credits.
1531
+ */
1532
+ async locations(options) {
1533
+ return this.client._post("/api/v1/tripadvisor/locations", options);
1534
+ }
1535
+ /**
1536
+ * Restaurants, hotels or attractions in a Tripadvisor geo, Tripadvisor-
1537
+ * ranked: rating, review count, price band, address, coordinates, phone,
1538
+ * hours and Travelers' Choice badge. Each row carries the location_id +
1539
+ * geo_id pair the detail endpoints take.
1540
+ *
1541
+ * `geo_id` or `url` is required - get `geo_id` from locations().
1542
+ *
1543
+ * Paged with `page`, 30 locations per page. A page beyond the last is a
1544
+ * 404, not an empty result.
1545
+ *
1546
+ * Costs 2 credits.
1547
+ */
1548
+ async search(options) {
1549
+ return this.client._post("/api/v1/tripadvisor/search", options);
1550
+ }
1551
+ /**
1552
+ * One Tripadvisor location in full: rating, review histogram and per-aspect
1553
+ * sub-ratings, city ranking, price band, cuisines, amenities, address,
1554
+ * coordinates, contact, photos, and the FIRST PAGE OF REVIEWS.
1555
+ *
1556
+ * `location_id` or `url` is required, and the transport additionally
1557
+ * requires a geo when a bare d-id is sent.
1558
+ *
1559
+ * Page 1 of the reviews is already here - call reviews() only to page PAST
1560
+ * it. An unknown location id is a 404 (upstream answers a billed city
1561
+ * listing that the transport restates).
1562
+ *
1563
+ * Costs 2 credits.
1564
+ */
1565
+ async location(options) {
1566
+ return this.client._post("/api/v1/tripadvisor/location", options);
1567
+ }
1568
+ /**
1569
+ * A page of Tripadvisor reviews: rating, trip date and type, reviewer home
1570
+ * town and contribution count, and any management response.
1571
+ *
1572
+ * `location_id` or `url` is required. Page size follows `category` - 15 per
1573
+ * page for restaurants, 10 for hotels and attractions - so keep it matched
1574
+ * to the location's own type on any page past the first.
1575
+ *
1576
+ * Consecutive pages can REPEAT one review at the boundary; de-duplicate on
1577
+ * review_id when concatenating.
1578
+ *
1579
+ * Costs 2 credits.
1580
+ */
1581
+ async reviews(options) {
1582
+ return this.client._post("/api/v1/tripadvisor/reviews", options);
1583
+ }
1584
+ };
1585
+
1586
+ // src/namespaces/yelp.ts
1587
+ var YelpNamespace = class {
1588
+ constructor(client) {
1589
+ this.client = client;
1590
+ }
1591
+ client;
1592
+ /**
1593
+ * Businesses in Yelp's ranked order: rating, review count, price band,
1594
+ * categories, address, contact rails, hours, photos and a review snippet.
1595
+ * Each row carries both business_id and alias, either of which addresses
1596
+ * business(). `count` is the 10-row page, `total_results` is Yelp's headline
1597
+ * count.
1598
+ *
1599
+ * `term` + `location` or `url` is required, and `location` is effectively
1600
+ * mandatory - Yelp geolocates a location-less search off the proxy exit.
1601
+ * Paged with `page`; the page size is fixed at 10.
1602
+ *
1603
+ * Costs 2 credits.
1604
+ */
1605
+ async search(options) {
1606
+ return this.client._post("/api/v1/yelp/search", options);
1607
+ }
1608
+ /**
1609
+ * One business in full: rating and per-star histogram, review count, price
1610
+ * band, categories, address and coordinates, phone, website and menu links,
1611
+ * hours and holidays, amenities, photos and videos, popular items, health
1612
+ * inspections, Q&A, licences and claim status - PLUS the first page of
1613
+ * reviews at no extra cost.
1614
+ *
1615
+ * Because those reviews ride along, calling reviews({ page: 1 }) after this
1616
+ * buys the same document twice. Yelp's recommendation software hides some
1617
+ * reviews entirely; those are never returned and are counted in
1618
+ * not_recommended_review_count here. popular_items rows can arrive as stub
1619
+ * shells with every field null but `identifier` - those are dropped and
1620
+ * popular_items_omitted flags it.
1621
+ *
1622
+ * `business_id` or `url` is required. Costs 2 credits. Single response, no
1623
+ * pagination.
1624
+ */
1625
+ async business(options) {
1626
+ return this.client._post("/api/v1/yelp/business", options);
1627
+ }
1628
+ /**
1629
+ * A page of reviews: rating, full text, language, author profile and
1630
+ * expertise counts, attached photos, reaction counts and owner response.
1631
+ *
1632
+ * START AT PAGE 2 - page 1 re-fetches the document business() already
1633
+ * returned and costs another 2 credits. 10 reviews per page, and a page past
1634
+ * the last review is a 404, not an empty result. `rating` changes
1635
+ * filtered_review_count, not review_count.
1636
+ *
1637
+ * `business_id` or `url` is required. Costs 2 credits.
1638
+ */
1639
+ async reviews(options) {
1640
+ return this.client._post("/api/v1/yelp/reviews", options);
1641
+ }
1642
+ };
1643
+
1644
+ // src/namespaces/indeed.ts
1645
+ var IndeedNamespace = class {
1646
+ constructor(client) {
1647
+ this.client = client;
1648
+ }
1649
+ client;
1650
+ /**
1651
+ * Search Indeed job postings: title, employer, rating, location, salary
1652
+ * range, job type, benefits, posting age and apply route.
1653
+ *
1654
+ * Either `query` or `location` is required; a location-only search is valid
1655
+ * and returns every posting in the metro.
1656
+ *
1657
+ * Paged with `page`, 10 postings per page. `radius` and `max_age_days` are
1658
+ * closed sets - Indeed silently ignores an off-list value and bills the
1659
+ * unfiltered search. `min_salary` filters on Indeed's own ESTIMATE for the
1660
+ * role, not a posted figure.
1661
+ *
1662
+ * Costs 2 credits.
1663
+ */
1664
+ async search(options) {
1665
+ return this.client._post("/api/v1/indeed/search", options);
1666
+ }
1667
+ /**
1668
+ * One Indeed posting in full: description text and HTML, structured salary,
1669
+ * employment types, benefits, geocoded address, employer rating, applicant
1670
+ * count and the original ATS link.
1671
+ *
1672
+ * Single response, no pagination. An unknown job key is a real 404 that
1673
+ * scrape.do BILLS - take `job_id` from a search row.
1674
+ *
1675
+ * Costs 2 credits.
1676
+ */
1677
+ async job(options) {
1678
+ return this.client._post("/api/v1/indeed/job", options);
1679
+ }
1680
+ /**
1681
+ * Indeed employer profile: description, industry, HQ, size, revenue, CEO
1682
+ * approval, overall and per-category ratings, reported salaries, open roles
1683
+ * and locations.
1684
+ *
1685
+ * Single response, no pagination. An unknown company slug is a real 404
1686
+ * that scrape.do BILLS.
1687
+ *
1688
+ * Costs 2 credits.
1689
+ */
1690
+ async company(options) {
1691
+ return this.client._post("/api/v1/indeed/company", options);
1692
+ }
1693
+ /**
1694
+ * Indeed employee reviews with per-category ratings, pros/cons, reviewer
1695
+ * job title and location, plus aggregated sentiment and topic / location /
1696
+ * job-title breakdowns.
1697
+ *
1698
+ * Paged with `page`, 20 reviews per page.
1699
+ *
1700
+ * Costs 2 credits.
1701
+ */
1702
+ async companyReviews(options) {
1703
+ return this.client._post("/api/v1/indeed/company/reviews", options);
1704
+ }
1705
+ };
1706
+
1707
+ // src/namespaces/glassdoor.ts
1708
+ var GlassdoorNamespace = class {
1709
+ constructor(client) {
1710
+ this.client = client;
1711
+ }
1712
+ client;
1713
+ /**
1714
+ * START HERE. Search Glassdoor for a company by NAME and resolve it to the
1715
+ * employer_id every other method needs, ranked by Glassdoor and
1716
+ * de-duplicated.
1717
+ *
1718
+ * company(), reviews() and salaries() all key off an employer_id that exists
1719
+ * only inside Glassdoor's /Overview/ URLs, so this lookup is the entry
1720
+ * point.
1721
+ *
1722
+ * Costs 1 credit. Single response, no pagination.
1723
+ */
1724
+ async companies(options) {
1725
+ return this.client._post("/api/v1/glassdoor/companies", options);
1726
+ }
1727
+ /**
1728
+ * Employer profile: description, mission, industry, sector, HQ, size band,
1729
+ * revenue band, stock symbol, year founded, overall and per-category
1730
+ * ratings, star distribution, CEO approval, awards, FAQ, the five
1731
+ * server-rendered reviews, AND reviews_url / salaries_url.
1732
+ *
1733
+ * THE CHAINING ENDPOINT: pass reviews_url / salaries_url back as `url` on
1734
+ * reviews() and salaries() to halve the upstream fetches. `employer_id` or
1735
+ * `url` is required - `company` is cosmetic and does not satisfy it.
1736
+ *
1737
+ * Costs 1 credit. Single response, no pagination. Typically ~3-47s.
1738
+ */
1739
+ async company(options) {
1740
+ return this.client._post("/api/v1/glassdoor/company", options);
1741
+ }
1742
+ /**
1743
+ * Full reviews with per-axis scores, pros, cons, advice, job title,
1744
+ * location, employment status and employer response - plus complete rating
1745
+ * statistics, star distribution, aggregate pro/con highlight terms and
1746
+ * per-job-title review counts.
1747
+ *
1748
+ * HARD CAP OF THREE REVIEW BODIES per response: that is Glassdoor's login
1749
+ * wall, not a limit option. There is deliberately NO `page` param. Move the
1750
+ * window with `category` and `employment_status` and read
1751
+ * filtered_review_count to see how many match; the aggregate statistics are
1752
+ * the full-population signal here, not the bodies.
1753
+ *
1754
+ * `employer_id` or `url` is required. Costs 1 credit. Typically ~75s.
1755
+ */
1756
+ async reviews(options) {
1757
+ return this.client._post("/api/v1/glassdoor/reviews", options);
1758
+ }
1759
+ /**
1760
+ * Salaries by job title: base-pay and total-pay percentiles P10-P90 with
1761
+ * medians called out, sample counts, currency, pay period and last-reported
1762
+ * date.
1763
+ *
1764
+ * These are Glassdoor's ESTIMATES for the title, not individual reported
1765
+ * salaries. Paged with `page` at 10 job titles per page; `page_count` on the
1766
+ * response is how many pages exist.
1767
+ *
1768
+ * `employer_id` or `url` is required. Costs 1 credit. Typically ~41s.
1769
+ */
1770
+ async salaries(options) {
1771
+ return this.client._post("/api/v1/glassdoor/salaries", options);
1772
+ }
1773
+ };
1774
+
1775
+ // src/namespaces/app-store.ts
1776
+ var AppStoreNamespace = class {
1777
+ constructor(client) {
1778
+ this.client = client;
1779
+ }
1780
+ client;
1781
+ /**
1782
+ * Up to 200 fully-shaped App Store apps - the same 43-field row as app() -
1783
+ * which makes this a bulk metadata fetch as well as a search, and a
1784
+ * publisher lookup when the term is a developer name.
1785
+ *
1786
+ * NO PAGINATION. `limit` (1-200, default 25) is the only lever on volume;
1787
+ * every offset spelling is silently ignored. Mac rows carry no iPad or Apple
1788
+ * TV screenshots, advisories, features, supported devices or Game Center
1789
+ * flag.
1790
+ *
1791
+ * Costs 1 credit.
1792
+ */
1793
+ async search(options) {
1794
+ return this.client._post("/api/v1/appstore/search", options);
1795
+ }
1796
+ /**
1797
+ * Full listing: title, description, developer and seller identity, price and
1798
+ * currency, all-time and current-version ratings, version and release notes,
1799
+ * genres, content rating and advisories, icons at three sizes, screenshots,
1800
+ * download size, minimum OS, languages, supported devices, Game Center and
1801
+ * VPP flags.
1802
+ *
1803
+ * Takes a numeric App Store id or a bundle id interchangeably. An id Apple
1804
+ * cannot resolve is a BILLED 404 - Apple charges for the empty result list.
1805
+ *
1806
+ * Costs 1 credit. Single response, no pagination.
1807
+ */
1808
+ async app(options) {
1809
+ return this.client._post("/api/v1/appstore/app", options);
1810
+ }
1811
+ /**
1812
+ * A page of reviews: star rating, title, full text, author, and the APP
1813
+ * VERSION the review was written against.
1814
+ *
1815
+ * NUMERIC APP IDS ONLY here. Paged 1-10 at 50 reviews each and hard-stopped
1816
+ * at page 10 - 500 reviews per storefront is Apple's anonymous ceiling, so
1817
+ * ask a different `country` to reach further. This endpoint CANNOT 404: an
1818
+ * unknown id and a real app with zero reviews return the same empty feed.
1819
+ * Under sort "most_recent" the vote fields are zeroes.
1820
+ *
1821
+ * Costs 1 credit.
1822
+ */
1823
+ async reviews(options) {
1824
+ return this.client._post("/api/v1/appstore/reviews", options);
1825
+ }
1826
+ };
1827
+
1828
+ // src/namespaces/google-play.ts
1829
+ var GooglePlayNamespace = class {
1830
+ constructor(client) {
1831
+ this.client = client;
1832
+ }
1833
+ client;
1834
+ /**
1835
+ * Ranked apps: package name, title, developer, rating, install count, price
1836
+ * and IAP range, content rating, icon and screenshots. A branded query
1837
+ * returns the hero card as result 1 projected to the same row shape, plus
1838
+ * Play's related-query rail.
1839
+ *
1840
+ * NO PAGINATION - one shelf of ~30 apps, with no page or cursor param.
1841
+ * `hl` moves the whole storefront, not just the language of the strings.
1842
+ *
1843
+ * Costs 2 credits.
1844
+ */
1845
+ async search(options) {
1846
+ return this.client._post("/api/v1/googleplay/search", options);
1847
+ }
1848
+ /**
1849
+ * Full store listing: installs including the REAL count Play publishes but
1850
+ * never renders, rating and star histogram, description, developer identity
1851
+ * and legal contact, price and IAPs, categories and gameplay tags,
1852
+ * screenshots and trailer, version and Android requirement, release and
1853
+ * update dates, changelog, full permission tree, Data safety table, the 20
1854
+ * server-rendered reviews, and the similar-apps and more-by-developer rails.
1855
+ *
1856
+ * Those 20 reviews ride along at no extra cost - use reviews() only to page
1857
+ * past them or to sort differently.
1858
+ *
1859
+ * Costs 2 credits. Single response, no pagination.
1860
+ */
1861
+ async app(options) {
1862
+ return this.client._post("/api/v1/googleplay/app", options);
1863
+ }
1864
+ /**
1865
+ * A page of reviews: star score, full text, author, thumbs-up count,
1866
+ * developer reply, and the APP VERSION the reviewer was running.
1867
+ *
1868
+ * Paged with `cursor` -> next_cursor. The cursor is opaque and SINGLE-USE
1869
+ * and encodes the sort as well as the position, so send it back with the
1870
+ * same `sort` it came from; a cursor past the last review is a 404, not an
1871
+ * empty page. `count` is capped at 200. An empty payload here is a BILLED
1872
+ * 404 - the premium price is paid to learn the package has no reviews or
1873
+ * does not exist.
1874
+ *
1875
+ * Costs 2 credits.
1876
+ */
1877
+ async reviews(options) {
1878
+ return this.client._post("/api/v1/googleplay/reviews", options);
1879
+ }
1880
+ };
1881
+
1882
+ // src/namespaces/g2.ts
1883
+ var G2Namespace = class {
1884
+ constructor(client) {
1885
+ this.client = client;
1886
+ }
1887
+ client;
1888
+ /**
1889
+ * Ranked B2B software products on G2: star rating, review count, vendor,
1890
+ * categories, seller description and logo. Every row carries `product_id`
1891
+ * and `slug` to feed product() and reviews().
1892
+ *
1893
+ * Paged with `page` and `limit` (1-100, default 20). `total_results` is
1894
+ * G2's Products-tab headline and is CAPPED AT 10000, so treat a 10000 as a
1895
+ * floor rather than a count; `total_by_type` breaks the same query across
1896
+ * products, sellers, categories and discussions.
1897
+ *
1898
+ * Pass `query` or `url`.
1899
+ *
1900
+ * Costs 5 credits.
1901
+ */
1902
+ async search(options) {
1903
+ return this.client._post("/api/v1/g2/search", options);
1904
+ }
1905
+ /**
1906
+ * A full G2 software profile: rating with per-star histogram, review count,
1907
+ * vendor, description and seller website, pricing editions with parsed
1908
+ * amounts, feature groups, categories and breadcrumbs, supported languages,
1909
+ * integrations, alternatives, head-to-head comparisons, media, community
1910
+ * discussions and G2's AI-derived pros and cons.
1911
+ *
1912
+ * CARRIES NO REVIEW TEXT. G2 loads review bodies in a separate frame, so
1913
+ * this endpoint returns none at all - call reviews() for text.
1914
+ *
1915
+ * Pass `product_id` (slug or numeric id as a string) or `url`.
1916
+ *
1917
+ * Costs 5 credits. Single response, no pagination.
1918
+ */
1919
+ async product(options) {
1920
+ return this.client._post("/api/v1/g2/product", options);
1921
+ }
1922
+ /**
1923
+ * A page of G2 reviews: rating, title, likes and dislikes, problems solved,
1924
+ * reviewer job title, industry and company size, validated and incentivized
1925
+ * flags - PLUS what the profile page has no form of: exact per-star counts,
1926
+ * pros and cons with per-theme counts, and company-size / role / industry /
1927
+ * region / category facets with counts.
1928
+ *
1929
+ * Fixed at 10 reviews per page; advance with `page`. This paginates well
1930
+ * past the 10 pages G2's own widget links to.
1931
+ *
1932
+ * `rating` buckets are HALF-STAR-INCLUSIVE (1 returns 0, 0.5 and 1-star).
1933
+ * Every filter is a closed enum because an unrecognised value matches
1934
+ * nothing upstream and comes back as an empty, plausible-looking result set.
1935
+ *
1936
+ * Pass `product_id` or `url`.
1937
+ *
1938
+ * Costs 5 credits.
1939
+ */
1940
+ async reviews(options) {
1941
+ return this.client._post("/api/v1/g2/reviews", options);
1942
+ }
1943
+ };
1944
+
1945
+ // src/namespaces/capterra.ts
1946
+ var CapterraNamespace = class {
1947
+ constructor(client) {
1948
+ this.client = client;
1949
+ }
1950
+ client;
1951
+ /**
1952
+ * 20 ranked Capterra software products: name, vendor description, rating,
1953
+ * review count, logo and the paid-placement flag. Every row carries
1954
+ * `product_id` and `slug` to feed product() and reviews().
1955
+ *
1956
+ * NO PAGINATION. Capterra fixes the result set at 20 and page 2 returns the
1957
+ * identical rows, so there is deliberately no page param - narrow the query
1958
+ * instead.
1959
+ *
1960
+ * Pass `query` or `url`.
1961
+ *
1962
+ * Costs 2 credits.
1963
+ */
1964
+ async search(options) {
1965
+ return this.client._post("/api/v1/capterra/search", options);
1966
+ }
1967
+ /**
1968
+ * A full Capterra profile: rating with per-star histogram and the four
1969
+ * scored criteria, likelihood to recommend, review sentiment and topics, the
1970
+ * complete pricing table with every plan and its features, every rated
1971
+ * feature, every integration, AI-derived pros and cons with the quoted
1972
+ * review, FAQs, screenshots, badges and awards, competitor comparisons and
1973
+ * alternatives, and the buyer profile by company size / industry / job
1974
+ * function - PLUS the 25 most recent reviews, which ride along at no extra
1975
+ * cost.
1976
+ *
1977
+ * `vendor` IS ALWAYS NULL here: Capterra does not publish it as structured
1978
+ * data on the product page. The reviews name the vendor per review.
1979
+ *
1980
+ * Pass `product_id` (a string) or `url`. `slug` is cosmetic on this
1981
+ * endpoint.
1982
+ *
1983
+ * Costs 2 credits. Single response, no pagination.
1984
+ */
1985
+ async product(options) {
1986
+ return this.client._post("/api/v1/capterra/product", options);
1987
+ }
1988
+ /**
1989
+ * A page of Capterra reviews: overall score plus five per-criterion scores,
1990
+ * title, pros, cons, advice, usage duration, incentivized flag, alternatives
1991
+ * considered and what the reviewer switched from, reviewer job title /
1992
+ * industry / company size, and the vendor response - plus a richer
1993
+ * competitor list than the profile carries, each alternative with its own
1994
+ * rating histogram and starting price.
1995
+ *
1996
+ * 25 reviews per page, CAPPED AT PAGE 100. Past it Capterra answers 200 with
1997
+ * PAGE ONE and the page quietly dropped from the canonical, so nothing
1998
+ * signals the cap but repeated rows. Page 1 is already inside product(), so
1999
+ * use this to page past it.
2000
+ *
2001
+ * Pass `product_id` or `url`. `slug` is load-bearing here and case-sensitive
2002
+ * upstream - a wrong one silently serves page one.
2003
+ *
2004
+ * Costs 2 credits.
2005
+ */
2006
+ async reviews(options) {
2007
+ return this.client._post("/api/v1/capterra/reviews", options);
2008
+ }
2009
+ };
2010
+
2011
+ // src/namespaces/sec.ts
2012
+ var SECNamespace = class {
2013
+ constructor(client) {
2014
+ this.client = client;
2015
+ }
2016
+ client;
2017
+ /**
2018
+ * START HERE. Resolves a company name or ticker to the CIK every other SEC
2019
+ * EDGAR endpoint is keyed by: matching filers with symbol, listing
2020
+ * exchange, and ready-made submissions / company-facts / EDGAR URLs, tiered
2021
+ * by match quality (each row carries its tier as `match`).
2022
+ *
2023
+ * `limit` sizes the response; there is no pagination. `exchange` is a
2024
+ * closed set matched case-insensitively, and filers listed with no exchange
2025
+ * are excluded by ANY value.
2026
+ *
2027
+ * Costs 1 credit.
2028
+ */
2029
+ async lookup(options) {
2030
+ return this.client._post("/api/v1/sec/lookup", options);
2031
+ }
2032
+ /**
2033
+ * Filer profile: legal and former names, SIC industry, filer category, EIN,
2034
+ * LEI, state of incorporation, fiscal year end, business and mailing
2035
+ * addresses, every ticker with its exchange, which forms it files and how
2036
+ * often, plus a preview of its 10 most recent filings.
2037
+ *
2038
+ * Either `cik` or `ticker` is required; `ticker` wins when both are given.
2039
+ *
2040
+ * Costs 1 credit. Single response, no pagination.
2041
+ */
2042
+ async company(options) {
2043
+ return this.client._post("/api/v1/sec/company", options);
2044
+ }
2045
+ /**
2046
+ * A page of one filer's filings: accession number, form and root form,
2047
+ * filing and period dates, 8-K item codes, and direct links to the primary
2048
+ * document, filing index and attachment directory.
2049
+ *
2050
+ * Either `cik` or `ticker` is required. Paged with `page` + `limit`.
2051
+ * `form` matches the form AND its root form, so "10-K" also returns 10-K/A.
2052
+ * EDGAR's "recent" block is not a fixed window - a decade for a quiet
2053
+ * filer, about a year for a prolific one; `include_history` reaches back
2054
+ * through up to 10 archived shards and sets `history_truncated` when the
2055
+ * filer had more.
2056
+ *
2057
+ * Costs 1 credit - including with `include_history`, which is the one call
2058
+ * that can buy more than one upstream fetch.
2059
+ */
2060
+ async filings(options) {
2061
+ return this.client._post("/api/v1/sec/filings", options);
2062
+ }
2063
+ /**
2064
+ * Every value a filer reported for one XBRL concept, newest period first,
2065
+ * with the form and filing each number came from. Restatements are KEPT,
2066
+ * not collapsed; `latest` disambiguates a quarter from its year-to-date
2067
+ * twin using the SEC's comparability flag.
2068
+ *
2069
+ * Either `cik` or `ticker` is required. The `concept` tag is CASE-SENSITIVE
2070
+ * - "netincomeloss" is a 404 upstream, not a match; call facts() to find
2071
+ * the real tag. `form` is an EXACT match here, so "10-K" excludes 10-K/A.
2072
+ * `limit` sizes the response; there is no pagination.
2073
+ *
2074
+ * Costs 1 credit.
2075
+ */
2076
+ async concept(options) {
2077
+ return this.client._post("/api/v1/sec/concept", options);
2078
+ }
2079
+ /**
2080
+ * The index of every XBRL concept a filer reports - tag, label,
2081
+ * description, units and most recent value - across us-gaap, dei and any
2082
+ * other taxonomy it uses. This is how you find what to ask concept() for.
2083
+ *
2084
+ * Either `cik` or `ticker` is required. `limit` sizes the response; there
2085
+ * is no pagination.
2086
+ *
2087
+ * Costs 1 credit.
2088
+ */
2089
+ async facts(options) {
2090
+ return this.client._post("/api/v1/sec/facts", options);
2091
+ }
2092
+ /**
2093
+ * EDGAR full-text search: each hit is the matching DOCUMENT with its URL,
2094
+ * form, filing date and filer identity, plus facets breaking the whole
2095
+ * result set down by company, form, industry and state.
2096
+ *
2097
+ * Coverage STARTS IN 2001 - nothing earlier is indexed. Accepts NO query at
2098
+ * all: a cik, ticker, form or date filter on its own is a valid search.
2099
+ * Paged with `page`, capped at 100 (100 documents per page) because the
2100
+ * index refuses a result window past 10,000.
2101
+ *
2102
+ * Costs 1 credit.
2103
+ */
2104
+ async search(options) {
2105
+ return this.client._post("/api/v1/sec/search", options);
2106
+ }
2107
+ };
2108
+
2109
+ // src/namespaces/companies-house.ts
2110
+ var CompaniesHouseNamespace = class {
2111
+ constructor(client) {
2112
+ this.client = client;
2113
+ }
2114
+ client;
2115
+ /**
2116
+ * START HERE. Searches the UK register by name and returns the
2117
+ * `company_number` every other endpoint is keyed by, plus name, status,
2118
+ * incorporation or dissolution date, registered office address and matched
2119
+ * former names.
2120
+ *
2121
+ * Matches CURRENT AND FORMER names. Paged with `page`, 20 results per page,
2122
+ * CAPPED AT PAGE 50 - the register serves a 1000-result window per term
2123
+ * whatever hit count it prints, and answers page 51 with HTTP 416.
2124
+ *
2125
+ * Costs 1 credit.
2126
+ */
2127
+ async search(options) {
2128
+ return this.client._post("/api/v1/companieshouse/search", options);
2129
+ }
2130
+ /**
2131
+ * Full register entry: status, type, incorporation and dissolution dates,
2132
+ * registered office, SIC codes, previous names, accounts and
2133
+ * confirmation-statement due dates with overdue flags, and whether it has
2134
+ * charges, insolvency history, officers or UK establishments. FC companies
2135
+ * return home registry / legal form / governing law, BR returns the parent,
2136
+ * CE returns the charity number.
2137
+ *
2138
+ * `company_number` is zero-padded and upper-cased for you, so a number off
2139
+ * a letterhead or out of a spreadsheet that ate its leading zeros still
2140
+ * resolves.
2141
+ *
2142
+ * Costs 1 credit. Single response, no pagination.
2143
+ */
2144
+ async company(options) {
2145
+ return this.client._post("/api/v1/companieshouse/company", options);
2146
+ }
2147
+ /**
2148
+ * Officers current and resigned: name, role, appointment and resignation
2149
+ * dates, correspondence address, nationality, country of residence,
2150
+ * month-and-year date of birth, and identity-verification status.
2151
+ *
2152
+ * Paged with `page`, 35 officers per page, NO upper bound - past the last
2153
+ * page the register answers an ordinary 200 with an empty list, identical
2154
+ * to a company with no officers.
2155
+ *
2156
+ * `officers_count` is EVERY appointment ever made and `resignations_count`
2157
+ * how many ended, so the active count is the difference. There is no
2158
+ * server-side active/resigned filter - filter on each officer's `status` in
2159
+ * the response.
2160
+ *
2161
+ * Costs 1 credit.
2162
+ */
2163
+ async officers(options) {
2164
+ return this.client._post("/api/v1/companieshouse/officers", options);
2165
+ }
2166
+ /**
2167
+ * Filings, most recent first: date, filing type code (AA, CS01, SH03),
2168
+ * description, register annotations and child documents, and a link to the
2169
+ * filed PDF with its page count.
2170
+ *
2171
+ * A filing the register has not finished processing carries a
2172
+ * `processing_note` instead of a document.
2173
+ *
2174
+ * Paged with `page`, NO upper bound - past the last page it is an ordinary
2175
+ * 200 with an empty list.
2176
+ *
2177
+ * Costs 1 credit.
2178
+ */
2179
+ async filingHistory(options) {
2180
+ return this.client._post("/api/v1/companieshouse/filing-history", options);
2181
+ }
2182
+ };
2183
+
2184
+ // src/namespaces/google-ads.ts
2185
+ var GoogleAdsNamespace = class {
2186
+ constructor(client) {
2187
+ this.client = client;
2188
+ }
2189
+ client;
2190
+ /**
2191
+ * START HERE. Resolves a brand name or a domain to the `advertiser_id` that
2192
+ * search() and creative() are keyed by.
2193
+ *
2194
+ * Returns two row kinds in one list: `advertiser` rows carry the id, the
2195
+ * verified name, the verification country and the total ad count AS A RANGE
2196
+ * (total_ads_min / total_ads_max - Google never publishes an exact figure);
2197
+ * `domain` rows carry a website. A name query returns both kinds, a
2198
+ * domain-shaped query returns domains only.
2199
+ *
2200
+ * NO PAGINATION - this is an autocomplete, roughly 20 rows per arm, and
2201
+ * `limit` caps each arm separately.
2202
+ *
2203
+ * Costs 1 credit.
2204
+ */
2205
+ async advertisers(options) {
2206
+ return this.client._post("/api/v1/googleads/advertisers", options);
2207
+ }
2208
+ /**
2209
+ * Every ad Google is running for one advertiser: the creative (archived
2210
+ * image, rich-media bundle, Google's renderer link, dimensions), advertiser
2211
+ * id and name, format, first and last seen dates, days actually run, plus
2212
+ * total_ads_min / total_ads_max.
2213
+ *
2214
+ * Cursor-paginated: read `next_cursor` off the response and send it back as
2215
+ * `cursor` WITH THE SAME FILTERS, up to 100 rows per page. `next_cursor` is
2216
+ * null once exhausted. A `limit` above 100 is not an error - Google answers
2217
+ * it with ZERO rows.
2218
+ *
2219
+ * The three `format` sets are disjoint, and `domain` is dropped from every
2220
+ * row when the query is by `advertiser_id`, so query by domain if you need
2221
+ * that field. The headline total is a RANGE, never an exact count.
2222
+ *
2223
+ * Pass `domain` or `advertiser_id`.
2224
+ *
2225
+ * Costs 1 credit per page.
2226
+ */
2227
+ async search(options) {
2228
+ return this.client._post("/api/v1/googleads/search", options);
2229
+ }
2230
+ /**
2231
+ * One creative in full, and the ONLY endpoint carrying its history: every
2232
+ * size variation of the asset, the impression bucket, the per-region
2233
+ * breakdown with first and last shown dates and a per-surface impression
2234
+ * split inside each region, the format, Google's category label, and the
2235
+ * funder disclosure on political ads.
2236
+ *
2237
+ * IMPRESSIONS AND REACH ARE EEA-ONLY: impressions_min, impressions_max and
2238
+ * first_shown are NULL on US creatives because Google publishes reach only
2239
+ * where the DSA compels it. A bucket row can carry a lower bound, an upper
2240
+ * bound, or one alone.
2241
+ *
2242
+ * Keyed by the `advertiser_id` + `creative_id` PAIR - a mismatched pair is a
2243
+ * 404, not an empty response.
2244
+ *
2245
+ * Costs 1 credit. Single response, no pagination.
2246
+ */
2247
+ async creative(options) {
2248
+ return this.client._post("/api/v1/googleads/creative", options);
2249
+ }
2250
+ };
2251
+
2252
+ // src/namespaces/meta-ads.ts
2253
+ var MetaAdsNamespace = class {
2254
+ constructor(client) {
2255
+ this.client = client;
2256
+ }
2257
+ client;
2258
+ /**
2259
+ * Search the Meta Ad Library. Page 1 returns 30 ads with the full creative:
2260
+ * page name, ad copy, headline, CTA, images and videos, the platforms each
2261
+ * ran on, and run dates - plus `total_results`, `total_is_capped`,
2262
+ * `has_next_page` and `next_cursor`.
2263
+ *
2264
+ * Cursor-paginated the whole way down: 30 ads on page 1, then 10 per page.
2265
+ * Walk `has_next_page` to pull an entire query. THE OTHER FILTERS ARE
2266
+ * IGNORED once `cursor` is set, because the cursor carries them itself.
2267
+ *
2268
+ * `total_results` CAPS AT 50000 with `total_is_capped: true` - Meta only
2269
+ * reports ">50,000", so never present it as an exact count. Spend, reach,
2270
+ * impressions and the paid-for-by disclosure are null unless
2271
+ * `ad_type` is "political_and_issue_ads".
2272
+ *
2273
+ * Costs 1 credit PER PAGE, so depth costs roughly 10 ads per credit past the
2274
+ * first 30.
2275
+ */
2276
+ async search(options) {
2277
+ return this.client._post("/api/v1/meta-ads/search", options);
2278
+ }
2279
+ /**
2280
+ * Every ad a Facebook Page is running, addressed by its numeric page id.
2281
+ * Page 1 returns 30 ads with the same creative detail as search(), then 10
2282
+ * per page off `next_cursor`; walk `has_next_page` to pull the advertiser's
2283
+ * whole library.
2284
+ *
2285
+ * The other filters are ignored once `cursor` is set. Spend, reach,
2286
+ * impressions and the paid-for-by disclosure are null on commercial ads -
2287
+ * only political/issue ads carry them.
2288
+ *
2289
+ * Costs 1 credit per page.
2290
+ */
2291
+ async advertiser(options) {
2292
+ return this.client._post("/api/v1/meta-ads/advertiser", options);
2293
+ }
2294
+ /**
2295
+ * One ad in full by archive id: creative, advertiser, run dates, platforms
2296
+ * and any political disclosure.
2297
+ *
2298
+ * Spend, reach and impressions are null unless the ad is a political/issue
2299
+ * ad.
2300
+ *
2301
+ * Costs 1 credit. Single response, no pagination.
2302
+ */
2303
+ async ad(options) {
2304
+ return this.client._post("/api/v1/meta-ads/ad", options);
2305
+ }
2306
+ };
2307
+
2308
+ // src/client.ts
2309
+ var DEFAULT_MAX_REQUESTS_PER_SECOND = 1;
2310
+ var MAX_REQUESTS_PER_SECOND = 50;
2311
+ var Scavio = class {
2312
+ google;
2313
+ amazon;
2314
+ walmart;
2315
+ youtube;
2316
+ reddit;
2317
+ tiktok;
2318
+ tiktokShop;
2319
+ instagram;
2320
+ x;
2321
+ linkedin;
2322
+ threads;
2323
+ kuaishou;
2324
+ ebay;
2325
+ target;
2326
+ homeDepot;
2327
+ zillow;
2328
+ redfin;
2329
+ booking;
2330
+ airbnb;
2331
+ tripadvisor;
2332
+ yelp;
2333
+ indeed;
2334
+ glassdoor;
2335
+ appStore;
2336
+ googlePlay;
2337
+ g2;
2338
+ capterra;
2339
+ sec;
2340
+ companiesHouse;
2341
+ googleAds;
2342
+ metaAds;
2343
+ apiKey;
2344
+ baseUrl;
2345
+ timeout;
2346
+ maxRetries;
2347
+ rateLimiter;
2348
+ constructor(config) {
2349
+ this.apiKey = config?.apiKey ?? process.env.SCAVIO_API_KEY ?? "";
2350
+ if (!this.apiKey) {
2351
+ throw new MissingAPIKeyError();
2352
+ }
2353
+ this.baseUrl = (config?.baseUrl ?? BASE_URL).replace(/\/+$/, "");
2354
+ this.timeout = config?.timeout ?? DEFAULT_TIMEOUT;
2355
+ this.maxRetries = config?.maxRetries ?? DEFAULT_MAX_RETRIES;
2356
+ const rps = config?.maxRequestsPerSecond ?? DEFAULT_MAX_REQUESTS_PER_SECOND;
2357
+ if (rps < 1 || rps > MAX_REQUESTS_PER_SECOND) {
2358
+ throw new ScavioError(
2359
+ `maxRequestsPerSecond must be between 1 and ${MAX_REQUESTS_PER_SECOND}`
2360
+ );
2361
+ }
2362
+ this.rateLimiter = new RateLimiter(rps);
2363
+ this.google = new GoogleNamespace(this);
2364
+ this.amazon = new AmazonNamespace(this);
2365
+ this.walmart = new WalmartNamespace(this);
2366
+ this.youtube = new YouTubeNamespace(this);
2367
+ this.reddit = new RedditNamespace(this);
2368
+ this.tiktok = new TikTokNamespace(this);
2369
+ this.tiktokShop = new TikTokShopNamespace(this);
2370
+ this.instagram = new InstagramNamespace(this);
2371
+ this.x = new XNamespace(this);
2372
+ this.linkedin = new LinkedInNamespace(this);
2373
+ this.threads = new ThreadsNamespace(this);
2374
+ this.kuaishou = new KuaishouNamespace(this);
2375
+ this.ebay = new EbayNamespace(this);
2376
+ this.target = new TargetNamespace(this);
2377
+ this.homeDepot = new HomeDepotNamespace(this);
2378
+ this.zillow = new ZillowNamespace(this);
2379
+ this.redfin = new RedfinNamespace(this);
2380
+ this.booking = new BookingNamespace(this);
2381
+ this.airbnb = new AirbnbNamespace(this);
2382
+ this.tripadvisor = new TripadvisorNamespace(this);
2383
+ this.yelp = new YelpNamespace(this);
2384
+ this.indeed = new IndeedNamespace(this);
2385
+ this.glassdoor = new GlassdoorNamespace(this);
2386
+ this.appStore = new AppStoreNamespace(this);
2387
+ this.googlePlay = new GooglePlayNamespace(this);
2388
+ this.g2 = new G2Namespace(this);
2389
+ this.capterra = new CapterraNamespace(this);
2390
+ this.sec = new SECNamespace(this);
2391
+ this.companiesHouse = new CompaniesHouseNamespace(this);
2392
+ this.googleAds = new GoogleAdsNamespace(this);
2393
+ this.metaAds = new MetaAdsNamespace(this);
2394
+ }
2395
+ /** @internal */
2396
+ async _post(path, body) {
2397
+ return request({
2398
+ method: "POST",
2399
+ path,
2400
+ apiKey: this.apiKey,
2401
+ baseUrl: this.baseUrl,
2402
+ timeout: this.timeout,
2403
+ maxRetries: this.maxRetries,
2404
+ rateLimiter: this.rateLimiter,
2405
+ body
2406
+ });
2407
+ }
2408
+ /** @internal */
2409
+ async _get(path) {
2410
+ return request({
2411
+ method: "GET",
2412
+ path,
2413
+ apiKey: this.apiKey,
2414
+ baseUrl: this.baseUrl,
2415
+ timeout: this.timeout,
2416
+ maxRetries: this.maxRetries,
2417
+ rateLimiter: this.rateLimiter
2418
+ });
2419
+ }
2420
+ async search(options) {
2421
+ return this.google.search(options);
2422
+ }
2423
+ /**
2424
+ * Read ANY web page and get it back as readability Markdown (the default),
2425
+ * plain text, or raw HTML. Returns `{ url, format, mode, content,
2426
+ * content_length }`.
2427
+ *
2428
+ * This is a core endpoint, not a platform, so it lives on the client itself:
2429
+ * `scavio.extract({ url })`, never `scavio.extract.extract()`.
2430
+ *
2431
+ * Credits are a function of `mode`, not a flat per-call constant:
2432
+ * "normal" costs 1, "advanced" costs 1, "ultra" costs 2. Billing happens
2433
+ * only on a successful extraction - a dead link, bot wall or timeout costs
2434
+ * nothing.
2435
+ *
2436
+ * Start on "normal". Move to "advanced" when the page builds its content in
2437
+ * the browser, and to "ultra" only when a bot wall blocks the other two.
2438
+ *
2439
+ * @example
2440
+ * const page = await scavio.extract({ url: "https://example.com/pricing" });
2441
+ * console.log(page.content);
2442
+ */
2443
+ async extract(options) {
2444
+ return this._post("/api/v1/extract", options);
923
2445
  }
924
2446
  async getUsage() {
925
2447
  return this._get("/api/v1/usage");
@@ -927,16 +2449,49 @@ var Scavio = class {
927
2449
  };
928
2450
  // Annotate the CommonJS export names for ESM import in node:
929
2451
  0 && (module.exports = {
2452
+ AirbnbNamespace,
2453
+ AmazonNamespace,
2454
+ AppStoreNamespace,
930
2455
  BadRequestError,
2456
+ BookingNamespace,
2457
+ CapterraNamespace,
2458
+ CompaniesHouseNamespace,
2459
+ DEFAULT_MAX_REQUESTS_PER_SECOND,
2460
+ EbayNamespace,
2461
+ G2Namespace,
2462
+ GlassdoorNamespace,
2463
+ GoogleAdsNamespace,
2464
+ GoogleNamespace,
2465
+ GooglePlayNamespace,
2466
+ HomeDepotNamespace,
2467
+ IndeedNamespace,
2468
+ InstagramNamespace,
931
2469
  InsufficientCreditsError,
932
2470
  InvalidAPIKeyError,
2471
+ KuaishouNamespace,
2472
+ LinkedInNamespace,
2473
+ MAX_REQUESTS_PER_SECOND,
2474
+ MetaAdsNamespace,
933
2475
  MissingAPIKeyError,
934
2476
  NotFoundError,
935
2477
  RateLimitError,
2478
+ RedditNamespace,
2479
+ RedfinNamespace,
2480
+ SECNamespace,
936
2481
  Scavio,
937
2482
  ScavioAPIError,
938
2483
  ScavioConnectionError,
939
2484
  ScavioError,
940
- ScavioTimeoutError
2485
+ ScavioTimeoutError,
2486
+ TargetNamespace,
2487
+ ThreadsNamespace,
2488
+ TikTokNamespace,
2489
+ TikTokShopNamespace,
2490
+ TripadvisorNamespace,
2491
+ WalmartNamespace,
2492
+ XNamespace,
2493
+ YelpNamespace,
2494
+ YouTubeNamespace,
2495
+ ZillowNamespace
941
2496
  });
942
2497
  //# sourceMappingURL=index.cjs.map