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/README.md +495 -20
- package/dist/index.cjs +1624 -69
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2923 -79
- package/dist/index.d.ts +2923 -79
- package/dist/index.js +1590 -68
- package/dist/index.js.map +1 -1
- package/package.json +36 -17
package/dist/index.d.ts
CHANGED
|
@@ -890,46 +890,146 @@ declare class InstagramNamespace {
|
|
|
890
890
|
interface WalmartSearchOptions {
|
|
891
891
|
/** Product search query (1-500 characters). */
|
|
892
892
|
query: string;
|
|
893
|
-
/**
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
893
|
+
/**
|
|
894
|
+
* Walmart storefront. Price-bearing: "com" and "ca" cost 1 credit,
|
|
895
|
+
* "com.mx" costs 2. Defaults to "com".
|
|
896
|
+
*/
|
|
897
|
+
domain?: "com" | "ca" | "com.mx";
|
|
898
|
+
/** Result page, 1-indexed. */
|
|
899
|
+
page?: number;
|
|
900
|
+
/** @deprecated Alias for `page`. Use `page`. */
|
|
900
901
|
start_page?: number;
|
|
901
|
-
/**
|
|
902
|
+
/** Result sort order (default "best_match"). */
|
|
903
|
+
sort_by?: "best_match" | "price_low" | "price_high" | "best_seller" | "rating_high" | "new";
|
|
904
|
+
/** Minimum price filter. */
|
|
902
905
|
min_price?: number;
|
|
903
|
-
/** Maximum price filter
|
|
906
|
+
/** Maximum price filter. */
|
|
904
907
|
max_price?: number;
|
|
905
|
-
/**
|
|
906
|
-
|
|
908
|
+
/**
|
|
909
|
+
* Delivery speed filter. "2_days" is deliberately unsupported (it leaks
|
|
910
|
+
* 3-4 day items) and there is no "anytime" - omit the param instead.
|
|
911
|
+
*/
|
|
912
|
+
fulfillment_speed?: "today" | "tomorrow";
|
|
907
913
|
/** Fulfillment type filter. */
|
|
908
914
|
fulfillment_type?: "in_store";
|
|
909
|
-
/** ZIP code for localized results. */
|
|
910
|
-
delivery_zip?: string;
|
|
911
|
-
/** Store id for in-store availability. */
|
|
912
|
-
store_id?: string;
|
|
913
915
|
[key: string]: unknown;
|
|
914
916
|
}
|
|
915
917
|
interface WalmartProductOptions {
|
|
916
|
-
/** Walmart
|
|
918
|
+
/** Walmart item id (usItemId), e.g. "13544111159". */
|
|
917
919
|
product_id: string;
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
920
|
+
[key: string]: unknown;
|
|
921
|
+
}
|
|
922
|
+
interface WalmartReviewsOptions {
|
|
923
|
+
/** Walmart item id (usItemId). */
|
|
924
|
+
product_id: string;
|
|
925
|
+
/** Result page, 1-indexed. 10 reviews per page. */
|
|
926
|
+
page?: number;
|
|
927
|
+
/** Review sort order. */
|
|
928
|
+
sort?: "relevancy" | "submission-desc" | "submission-asc" | "rating-desc" | "rating-asc" | "helpful-desc";
|
|
929
|
+
[key: string]: unknown;
|
|
930
|
+
}
|
|
931
|
+
interface WalmartCategoryOptions {
|
|
932
|
+
/**
|
|
933
|
+
* Category id: either a leaf id ("1095191") or a full underscore path
|
|
934
|
+
* ("3944_133251_1095191").
|
|
935
|
+
*/
|
|
936
|
+
category_id: string;
|
|
937
|
+
/**
|
|
938
|
+
* Walmart storefront. Price-bearing: "com" and "ca" cost 1 credit,
|
|
939
|
+
* "com.mx" costs 2. Defaults to "com".
|
|
940
|
+
*/
|
|
941
|
+
domain?: "com" | "ca" | "com.mx";
|
|
942
|
+
/** Result page, 1-indexed. */
|
|
943
|
+
page?: number;
|
|
944
|
+
/** Trims the returned list after fetching. Does NOT reduce the credit cost. */
|
|
945
|
+
limit?: number;
|
|
946
|
+
/** Result sort order (default "best_match"). */
|
|
947
|
+
sort_by?: "best_match" | "price_low" | "price_high" | "best_seller" | "rating_high" | "new";
|
|
948
|
+
/** Minimum price filter. */
|
|
949
|
+
min_price?: number;
|
|
950
|
+
/** Maximum price filter. */
|
|
951
|
+
max_price?: number;
|
|
952
|
+
/**
|
|
953
|
+
* Delivery speed filter. "2_days" is deliberately unsupported (it leaks
|
|
954
|
+
* 3-4 day items) and there is no "anytime" - omit the param instead.
|
|
955
|
+
*/
|
|
956
|
+
fulfillment_speed?: "today" | "tomorrow";
|
|
957
|
+
[key: string]: unknown;
|
|
958
|
+
}
|
|
959
|
+
interface WalmartOffersOptions {
|
|
960
|
+
/** Walmart item id (usItemId). */
|
|
961
|
+
product_id: string;
|
|
962
|
+
[key: string]: unknown;
|
|
963
|
+
}
|
|
964
|
+
interface WalmartSellerOptions {
|
|
965
|
+
/**
|
|
966
|
+
* NUMERIC catalog seller id, the `seller_catalog_id` field returned by
|
|
967
|
+
* product/offers. The GUID form of seller_id returns 404.
|
|
968
|
+
*/
|
|
969
|
+
seller_id: string;
|
|
970
|
+
[key: string]: unknown;
|
|
971
|
+
}
|
|
972
|
+
interface WalmartSellerProductsOptions {
|
|
973
|
+
/**
|
|
974
|
+
* NUMERIC catalog seller id (`seller_catalog_id`). The GUID form returns 404.
|
|
975
|
+
*/
|
|
976
|
+
seller_id: string;
|
|
926
977
|
[key: string]: unknown;
|
|
927
978
|
}
|
|
928
979
|
declare class WalmartNamespace {
|
|
929
980
|
private client;
|
|
930
981
|
constructor(client: Scavio);
|
|
982
|
+
/**
|
|
983
|
+
* Structured Walmart search results: `products[]`, `products_count` and the
|
|
984
|
+
* resolved `location`. Page through with `page` (1-indexed).
|
|
985
|
+
*
|
|
986
|
+
* Costs 1 credit for `domain` "com" or "ca", 2 credits for "com.mx".
|
|
987
|
+
*/
|
|
931
988
|
search(options: WalmartSearchOptions): Promise<Record<string, unknown>>;
|
|
989
|
+
/**
|
|
990
|
+
* Full product detail: price, rating, images, specifications, availability
|
|
991
|
+
* and seller.
|
|
992
|
+
*
|
|
993
|
+
* Costs 1 credit. Walmart.ca product pages are not fetchable, so this is
|
|
994
|
+
* walmart.com only.
|
|
995
|
+
*/
|
|
932
996
|
product(options: WalmartProductOptions): Promise<Record<string, unknown>>;
|
|
997
|
+
/**
|
|
998
|
+
* Customer reviews with ratings, text, author, date and the rating
|
|
999
|
+
* breakdown. 10 reviews per page; advance with `page`.
|
|
1000
|
+
*
|
|
1001
|
+
* Costs 1 credit.
|
|
1002
|
+
*/
|
|
1003
|
+
reviews(options: WalmartReviewsOptions): Promise<Record<string, unknown>>;
|
|
1004
|
+
/**
|
|
1005
|
+
* Products within a category, in the same product shape as `search()`.
|
|
1006
|
+
* Page through with `page`; `limit` only trims the response.
|
|
1007
|
+
*
|
|
1008
|
+
* Costs 1 credit for `domain` "com" or "ca", 2 credits for "com.mx".
|
|
1009
|
+
*/
|
|
1010
|
+
category(options: WalmartCategoryOptions): Promise<Record<string, unknown>>;
|
|
1011
|
+
/**
|
|
1012
|
+
* Seller offer for a product: price, seller, condition and buy-box flag.
|
|
1013
|
+
* Returns the BUY-BOX SELLER ONLY, not the full offer list.
|
|
1014
|
+
*
|
|
1015
|
+
* Costs 1 credit.
|
|
1016
|
+
*/
|
|
1017
|
+
offers(options: WalmartOffersOptions): Promise<Record<string, unknown>>;
|
|
1018
|
+
/**
|
|
1019
|
+
* Marketplace seller storefront: name, rating, review count, Pro Seller
|
|
1020
|
+
* badge and business details.
|
|
1021
|
+
*
|
|
1022
|
+
* Costs 1 credit. `seller_id` must be the numeric catalog seller id.
|
|
1023
|
+
*/
|
|
1024
|
+
seller(options: WalmartSellerOptions): Promise<Record<string, unknown>>;
|
|
1025
|
+
/**
|
|
1026
|
+
* A seller's catalog. Roughly the first 40 items are server-rendered and
|
|
1027
|
+
* that is all this returns - there is no pagination. `total_count` reports
|
|
1028
|
+
* the seller's real catalog size, which is usually far larger.
|
|
1029
|
+
*
|
|
1030
|
+
* Costs 1 credit. `seller_id` must be the numeric catalog seller id.
|
|
1031
|
+
*/
|
|
1032
|
+
sellerProducts(options: WalmartSellerProductsOptions): Promise<Record<string, unknown>>;
|
|
933
1033
|
}
|
|
934
1034
|
|
|
935
1035
|
interface YouTubeSearchOptions {
|
|
@@ -1298,71 +1398,2815 @@ declare class LinkedInNamespace {
|
|
|
1298
1398
|
searchPosts(options: LinkedInSearchPostsOptions): Promise<Record<string, unknown>>;
|
|
1299
1399
|
}
|
|
1300
1400
|
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
baseUrl?: string;
|
|
1304
|
-
timeout?: number;
|
|
1305
|
-
maxRequestsPerSecond?: number;
|
|
1401
|
+
/** A user reference: the cheap numeric id, or the handle at double the cost. */
|
|
1402
|
+
interface ThreadsProfileOptions {
|
|
1306
1403
|
/**
|
|
1307
|
-
*
|
|
1308
|
-
* (HTTP 429/500/502/503/504 and network/timeout errors). Defaults to 2.
|
|
1309
|
-
* Set to 0 to disable retries.
|
|
1404
|
+
* Numeric user id, e.g. "63625256886". The cheap path: 2 credits.
|
|
1310
1405
|
*/
|
|
1311
|
-
|
|
1406
|
+
user_id?: string;
|
|
1407
|
+
/**
|
|
1408
|
+
* Handle without the leading @ (1-60 characters). Costs 2 extra credits
|
|
1409
|
+
* because the id has to be resolved upstream first - prefer `user_id`.
|
|
1410
|
+
*/
|
|
1411
|
+
username?: string;
|
|
1412
|
+
[key: string]: unknown;
|
|
1312
1413
|
}
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
/**
|
|
1331
|
-
|
|
1332
|
-
/**
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1414
|
+
interface ThreadsUserPostsOptions extends ThreadsProfileOptions {
|
|
1415
|
+
/** Opaque cursor from a previous response's next_cursor. */
|
|
1416
|
+
cursor?: string;
|
|
1417
|
+
}
|
|
1418
|
+
interface ThreadsUserRepliesOptions extends ThreadsProfileOptions {
|
|
1419
|
+
/** Opaque cursor from a previous response's next_cursor. */
|
|
1420
|
+
cursor?: string;
|
|
1421
|
+
}
|
|
1422
|
+
/** A post reference: the post id, or its threads.net URL. */
|
|
1423
|
+
interface ThreadsPostOptions {
|
|
1424
|
+
/** Post id. */
|
|
1425
|
+
post_id?: string;
|
|
1426
|
+
/** Full threads.net post URL, as an alternative to post_id. */
|
|
1427
|
+
url?: string;
|
|
1428
|
+
[key: string]: unknown;
|
|
1429
|
+
}
|
|
1430
|
+
interface ThreadsPostCommentsOptions {
|
|
1431
|
+
/** Post id. This endpoint takes the id only - no URL, no username. */
|
|
1432
|
+
post_id: string;
|
|
1433
|
+
/** Opaque cursor from a previous response's next_cursor. */
|
|
1434
|
+
cursor?: string;
|
|
1435
|
+
[key: string]: unknown;
|
|
1436
|
+
}
|
|
1437
|
+
interface ThreadsSearchUsersOptions {
|
|
1438
|
+
/** Name or handle to search for (1-200 characters). */
|
|
1439
|
+
query: string;
|
|
1440
|
+
[key: string]: unknown;
|
|
1441
|
+
}
|
|
1442
|
+
declare class ThreadsNamespace {
|
|
1443
|
+
private client;
|
|
1444
|
+
constructor(client: Scavio);
|
|
1445
|
+
/**
|
|
1446
|
+
* Profile details for a Threads user. Pass `user_id` or `username`;
|
|
1447
|
+
* sending neither returns 422 and no match returns 404.
|
|
1448
|
+
*
|
|
1449
|
+
* Costs 2 credits by `user_id`, 4 credits by `username`.
|
|
1450
|
+
*/
|
|
1451
|
+
profile(options: ThreadsProfileOptions): Promise<Record<string, unknown>>;
|
|
1452
|
+
/**
|
|
1453
|
+
* A user's Threads posts. Advance with the previous response's
|
|
1454
|
+
* `next_cursor`. Pass `user_id` or `username`.
|
|
1455
|
+
*
|
|
1456
|
+
* Costs 2 credits by `user_id`, 4 credits by `username` - and that surcharge
|
|
1457
|
+
* applies to every page, so resolve the id once before paging.
|
|
1458
|
+
*/
|
|
1459
|
+
userPosts(options: ThreadsUserPostsOptions): Promise<Record<string, unknown>>;
|
|
1460
|
+
/**
|
|
1461
|
+
* A user's replies. Advance with the previous response's `next_cursor`.
|
|
1462
|
+
* Pass `user_id` or `username`.
|
|
1463
|
+
*
|
|
1464
|
+
* Costs 2 credits by `user_id`, 4 credits by `username` - and that surcharge
|
|
1465
|
+
* applies to every page, so resolve the id once before paging.
|
|
1466
|
+
*/
|
|
1467
|
+
userReplies(options: ThreadsUserRepliesOptions): Promise<Record<string, unknown>>;
|
|
1468
|
+
/**
|
|
1469
|
+
* A single post, addressed by `post_id` or by its threads.net `url`.
|
|
1470
|
+
* Sending neither returns 422.
|
|
1471
|
+
*
|
|
1472
|
+
* Costs 2 credits.
|
|
1473
|
+
*/
|
|
1474
|
+
post(options: ThreadsPostOptions): Promise<Record<string, unknown>>;
|
|
1475
|
+
/**
|
|
1476
|
+
* Replies to a post. Advance with the previous response's `next_cursor`.
|
|
1477
|
+
*
|
|
1478
|
+
* Costs 2 credits - this endpoint is never username-keyed, so there is no
|
|
1479
|
+
* handle surcharge.
|
|
1480
|
+
*/
|
|
1481
|
+
postComments(options: ThreadsPostCommentsOptions): Promise<Record<string, unknown>>;
|
|
1482
|
+
/**
|
|
1483
|
+
* Threads profiles matching a name or handle. This is people search, and it
|
|
1484
|
+
* is the only search Threads exposes - there is no content/post search.
|
|
1485
|
+
* Use it to turn a handle into the `user_id` every other method prefers.
|
|
1486
|
+
*
|
|
1487
|
+
* Costs 2 credits. Single response, no pagination.
|
|
1488
|
+
*/
|
|
1489
|
+
searchUsers(options: ThreadsSearchUsersOptions): Promise<Record<string, unknown>>;
|
|
1336
1490
|
}
|
|
1337
1491
|
|
|
1338
|
-
|
|
1339
|
-
|
|
1492
|
+
interface KuaishouProfileOptions {
|
|
1493
|
+
/** Kuaishou numeric user id, e.g. "5518803932". */
|
|
1494
|
+
user_id: string;
|
|
1495
|
+
[key: string]: unknown;
|
|
1340
1496
|
}
|
|
1341
|
-
|
|
1342
|
-
|
|
1497
|
+
interface KuaishouUserPostsOptions {
|
|
1498
|
+
/** Kuaishou numeric user id. */
|
|
1499
|
+
user_id: string;
|
|
1500
|
+
/** Opaque cursor from a previous response's next_cursor. */
|
|
1501
|
+
cursor?: string;
|
|
1502
|
+
[key: string]: unknown;
|
|
1343
1503
|
}
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1504
|
+
interface KuaishouUserLiveOptions {
|
|
1505
|
+
/** Kuaishou numeric user id. */
|
|
1506
|
+
user_id: string;
|
|
1507
|
+
[key: string]: unknown;
|
|
1347
1508
|
}
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1509
|
+
interface KuaishouUserResolveOptions {
|
|
1510
|
+
/**
|
|
1511
|
+
* A kuaishou.com or v.kuaishou.com link, e.g.
|
|
1512
|
+
* "https://v.kuaishou.com/KcdKDwFp". Kwai international (kwai.com) links
|
|
1513
|
+
* are not supported.
|
|
1514
|
+
*/
|
|
1515
|
+
share_link: string;
|
|
1516
|
+
[key: string]: unknown;
|
|
1351
1517
|
}
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1518
|
+
/** A video reference: the photo id, or a Kuaishou URL. One of the two. */
|
|
1519
|
+
interface KuaishouVideoOptions {
|
|
1520
|
+
/** Photo (video) id, e.g. "3xtdqvdnqd3psuc". */
|
|
1521
|
+
photo_id?: string;
|
|
1522
|
+
/** A kuaishou.com or v.kuaishou.com video URL, as an alternative to photo_id. */
|
|
1523
|
+
url?: string;
|
|
1524
|
+
[key: string]: unknown;
|
|
1356
1525
|
}
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1526
|
+
interface KuaishouVideoCommentsOptions {
|
|
1527
|
+
/** Photo (video) id. This endpoint takes the id only - no URL. */
|
|
1528
|
+
photo_id: string;
|
|
1529
|
+
/** Opaque cursor from a previous response's next_cursor. */
|
|
1530
|
+
cursor?: string;
|
|
1531
|
+
[key: string]: unknown;
|
|
1361
1532
|
}
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1533
|
+
interface KuaishouCommentRepliesOptions {
|
|
1534
|
+
/** Photo (video) id the root comment sits on. */
|
|
1535
|
+
photo_id: string;
|
|
1536
|
+
/** Id of the root comment whose replies you want. */
|
|
1537
|
+
root_comment_id: string;
|
|
1538
|
+
/** Opaque cursor from a previous response's next_cursor. */
|
|
1539
|
+
cursor?: string;
|
|
1540
|
+
/** Replies per page, 1-50. */
|
|
1541
|
+
count?: number;
|
|
1542
|
+
[key: string]: unknown;
|
|
1543
|
+
}
|
|
1544
|
+
interface KuaishouVideosBatchOptions {
|
|
1545
|
+
/** Photo (video) ids, 1-20 per call. More than 20 is rejected. */
|
|
1546
|
+
photo_ids: string[];
|
|
1547
|
+
[key: string]: unknown;
|
|
1548
|
+
}
|
|
1549
|
+
interface KuaishouSearchOptions {
|
|
1550
|
+
/** Search keyword (1-200 characters). */
|
|
1551
|
+
keyword: string;
|
|
1552
|
+
/** Opaque cursor from a previous response's next_cursor. */
|
|
1553
|
+
cursor?: string;
|
|
1554
|
+
[key: string]: unknown;
|
|
1555
|
+
}
|
|
1556
|
+
interface KuaishouSearchVideosOptions {
|
|
1557
|
+
/** Search keyword (1-200 characters). */
|
|
1558
|
+
keyword: string;
|
|
1559
|
+
/** Opaque cursor from a previous response's next_cursor. */
|
|
1560
|
+
cursor?: string;
|
|
1561
|
+
[key: string]: unknown;
|
|
1562
|
+
}
|
|
1563
|
+
interface KuaishouSearchUsersOptions {
|
|
1564
|
+
/** Search keyword (1-200 characters). */
|
|
1565
|
+
keyword: string;
|
|
1566
|
+
/** Opaque cursor from a previous response's next_cursor. */
|
|
1567
|
+
cursor?: string;
|
|
1568
|
+
[key: string]: unknown;
|
|
1569
|
+
}
|
|
1570
|
+
interface KuaishouSearchLiveOptions {
|
|
1571
|
+
/** Search keyword (1-200 characters). */
|
|
1572
|
+
keyword: string;
|
|
1573
|
+
/** Opaque cursor from a previous response's next_cursor. */
|
|
1574
|
+
cursor?: string;
|
|
1575
|
+
[key: string]: unknown;
|
|
1576
|
+
}
|
|
1577
|
+
interface KuaishouTagFeedOptions {
|
|
1578
|
+
/** Hashtag text, without the leading # (1-200 characters). */
|
|
1579
|
+
tag: string;
|
|
1580
|
+
/** Opaque cursor from a previous response's next_cursor. */
|
|
1581
|
+
cursor?: string;
|
|
1582
|
+
[key: string]: unknown;
|
|
1583
|
+
}
|
|
1584
|
+
interface KuaishouTrendingOptions {
|
|
1585
|
+
/** Which leaderboard to read (default "hot"). */
|
|
1586
|
+
board?: "hot" | "live" | "shopping" | "brand" | "music";
|
|
1587
|
+
[key: string]: unknown;
|
|
1588
|
+
}
|
|
1589
|
+
declare class KuaishouNamespace {
|
|
1590
|
+
private client;
|
|
1591
|
+
constructor(client: Scavio);
|
|
1592
|
+
/**
|
|
1593
|
+
* Profile details for a Kuaishou user, addressed by numeric `user_id`.
|
|
1594
|
+
*
|
|
1595
|
+
* Costs 10 credits - the dearest single-object call on the platform. If you
|
|
1596
|
+
* only have a share link, resolve it with `userResolve()` (1 credit) first.
|
|
1597
|
+
*/
|
|
1598
|
+
profile(options: KuaishouProfileOptions): Promise<Record<string, unknown>>;
|
|
1599
|
+
/**
|
|
1600
|
+
* A user's top posts. Advance with the previous response's `next_cursor`.
|
|
1601
|
+
*
|
|
1602
|
+
* Costs 1 credit per page.
|
|
1603
|
+
*/
|
|
1604
|
+
userPosts(options: KuaishouUserPostsOptions): Promise<Record<string, unknown>>;
|
|
1605
|
+
/**
|
|
1606
|
+
* A user's current live-stream status.
|
|
1607
|
+
*
|
|
1608
|
+
* Costs 1 credit.
|
|
1609
|
+
*/
|
|
1610
|
+
userLive(options: KuaishouUserLiveOptions): Promise<Record<string, unknown>>;
|
|
1611
|
+
/**
|
|
1612
|
+
* Turns a Kuaishou share link into a `user_id` you can feed to the other
|
|
1613
|
+
* user endpoints. kuaishou.com and v.kuaishou.com links only - kwai.com is
|
|
1614
|
+
* not supported.
|
|
1615
|
+
*
|
|
1616
|
+
* Costs 1 credit.
|
|
1617
|
+
*/
|
|
1618
|
+
userResolve(options: KuaishouUserResolveOptions): Promise<Record<string, unknown>>;
|
|
1619
|
+
/**
|
|
1620
|
+
* A single video, addressed by `photo_id` or by its Kuaishou `url`.
|
|
1621
|
+
* Sending neither returns 422.
|
|
1622
|
+
*
|
|
1623
|
+
* Costs 2 credits.
|
|
1624
|
+
*/
|
|
1625
|
+
video(options: KuaishouVideoOptions): Promise<Record<string, unknown>>;
|
|
1626
|
+
/**
|
|
1627
|
+
* Comments on a video. Advance with the previous response's `next_cursor`.
|
|
1628
|
+
*
|
|
1629
|
+
* Costs 1 credit per page.
|
|
1630
|
+
*/
|
|
1631
|
+
videoComments(options: KuaishouVideoCommentsOptions): Promise<Record<string, unknown>>;
|
|
1632
|
+
/**
|
|
1633
|
+
* Replies under a root comment. Advance with the previous response's
|
|
1634
|
+
* `next_cursor`; `count` (1-50) sizes the page.
|
|
1635
|
+
*
|
|
1636
|
+
* Costs 1 credit per page.
|
|
1637
|
+
*/
|
|
1638
|
+
commentReplies(options: KuaishouCommentRepliesOptions): Promise<Record<string, unknown>>;
|
|
1639
|
+
/**
|
|
1640
|
+
* Several videos in one call, up to 20 photo ids (a hard cap - a longer
|
|
1641
|
+
* `photo_ids` array is rejected).
|
|
1642
|
+
*
|
|
1643
|
+
* Costs 40 credits per call, flat, whether you send 1 id or 20 - so batch
|
|
1644
|
+
* to the cap. For a single video `video()` costs 2.
|
|
1645
|
+
*/
|
|
1646
|
+
videosBatch(options: KuaishouVideosBatchOptions): Promise<Record<string, unknown>>;
|
|
1647
|
+
/**
|
|
1648
|
+
* Mixed-result search across Kuaishou. Advance with the previous response's
|
|
1649
|
+
* `next_cursor`.
|
|
1650
|
+
*
|
|
1651
|
+
* Costs 10 credits per page.
|
|
1652
|
+
*/
|
|
1653
|
+
search(options: KuaishouSearchOptions): Promise<Record<string, unknown>>;
|
|
1654
|
+
/**
|
|
1655
|
+
* Video search results. Advance with the previous response's `next_cursor`.
|
|
1656
|
+
*
|
|
1657
|
+
* Costs 10 credits per page.
|
|
1658
|
+
*/
|
|
1659
|
+
searchVideos(options: KuaishouSearchVideosOptions): Promise<Record<string, unknown>>;
|
|
1660
|
+
/**
|
|
1661
|
+
* User search results. Advance with the previous response's `next_cursor`.
|
|
1662
|
+
*
|
|
1663
|
+
* Costs 10 credits per page.
|
|
1664
|
+
*/
|
|
1665
|
+
searchUsers(options: KuaishouSearchUsersOptions): Promise<Record<string, unknown>>;
|
|
1666
|
+
/**
|
|
1667
|
+
* Live-stream search results. Advance with the previous response's
|
|
1668
|
+
* `next_cursor`.
|
|
1669
|
+
*
|
|
1670
|
+
* Costs 10 credits per page.
|
|
1671
|
+
*/
|
|
1672
|
+
searchLive(options: KuaishouSearchLiveOptions): Promise<Record<string, unknown>>;
|
|
1673
|
+
/**
|
|
1674
|
+
* Posts under a hashtag. Advance with the previous response's `next_cursor`.
|
|
1675
|
+
*
|
|
1676
|
+
* Costs 1 credit per page - the cheap way to pull volume, versus 10 for
|
|
1677
|
+
* `search()`.
|
|
1678
|
+
*/
|
|
1679
|
+
tagFeed(options: KuaishouTagFeedOptions): Promise<Record<string, unknown>>;
|
|
1680
|
+
/**
|
|
1681
|
+
* Leaderboards: hot, live, shopping, brand or music. Defaults to "hot".
|
|
1682
|
+
*
|
|
1683
|
+
* Costs 1 credit.
|
|
1684
|
+
*/
|
|
1685
|
+
trending(options?: KuaishouTrendingOptions): Promise<Record<string, unknown>>;
|
|
1686
|
+
}
|
|
1687
|
+
|
|
1688
|
+
interface EbaySearchOptions {
|
|
1689
|
+
/**
|
|
1690
|
+
* Search keywords (1-500 characters). Optional, but either `query` or
|
|
1691
|
+
* `seller` must be present or the request is rejected.
|
|
1692
|
+
*/
|
|
1693
|
+
query?: string;
|
|
1694
|
+
/**
|
|
1695
|
+
* Scope results to one seller's username. Usable with NO `query` to page
|
|
1696
|
+
* that seller's whole catalogue - this, not seller(), is how you enumerate
|
|
1697
|
+
* inventory.
|
|
1698
|
+
*/
|
|
1699
|
+
seller?: string;
|
|
1700
|
+
/** Result page, 1-indexed. */
|
|
1701
|
+
page?: number;
|
|
1702
|
+
/** Result sort order (default "best_match"). */
|
|
1703
|
+
sort_by?: "best_match" | "ending_soonest" | "newly_listed" | "price_low" | "price_high";
|
|
1704
|
+
/** Minimum price filter. */
|
|
1705
|
+
min_price?: number;
|
|
1706
|
+
/** Maximum price filter. */
|
|
1707
|
+
max_price?: number;
|
|
1708
|
+
/**
|
|
1709
|
+
* Item condition. "refurbished" is eBay's parent condition, not one of its
|
|
1710
|
+
* three graded tiers.
|
|
1711
|
+
*/
|
|
1712
|
+
condition?: "new" | "open_box" | "refurbished" | "used" | "for_parts";
|
|
1713
|
+
/** Listing format filter. */
|
|
1714
|
+
buying_format?: "auction" | "buy_it_now" | "best_offer";
|
|
1715
|
+
/** Free-shipping listings only. */
|
|
1716
|
+
free_shipping?: boolean;
|
|
1717
|
+
/**
|
|
1718
|
+
* Search completed listings that SOLD rather than live inventory.
|
|
1719
|
+
* `total_results` is null on this view - eBay publishes no headline count.
|
|
1720
|
+
*/
|
|
1721
|
+
sold?: boolean;
|
|
1722
|
+
/**
|
|
1723
|
+
* eBay category id. Must be numeric: an unrecognised id is not an error,
|
|
1724
|
+
* it silently returns the UNFILTERED set under a 200.
|
|
1725
|
+
*/
|
|
1726
|
+
category_id?: string;
|
|
1727
|
+
/**
|
|
1728
|
+
* Results per page. eBay accepts only 60, 120 or 240 and silently falls
|
|
1729
|
+
* back to 60 for anything else. Defaults to 60.
|
|
1730
|
+
*/
|
|
1731
|
+
per_page?: 60 | 120 | 240;
|
|
1732
|
+
[key: string]: unknown;
|
|
1733
|
+
}
|
|
1734
|
+
interface EbayProductOptions {
|
|
1735
|
+
/**
|
|
1736
|
+
* eBay item number, or a full ebay.com/itm/... URL. Tracking params on a
|
|
1737
|
+
* pasted URL are discarded.
|
|
1738
|
+
*/
|
|
1739
|
+
item_id: string;
|
|
1740
|
+
[key: string]: unknown;
|
|
1741
|
+
}
|
|
1742
|
+
interface EbaySellerOptions {
|
|
1743
|
+
/** eBay username as it appears in ebay.com/usr/<name>. */
|
|
1744
|
+
seller: string;
|
|
1745
|
+
[key: string]: unknown;
|
|
1746
|
+
}
|
|
1747
|
+
declare class EbayNamespace {
|
|
1748
|
+
private client;
|
|
1749
|
+
constructor(client: Scavio);
|
|
1750
|
+
/**
|
|
1751
|
+
* Structured eBay listing results: price, condition, bids, shipping, seller,
|
|
1752
|
+
* feedback, plus `count` and `total_results`.
|
|
1753
|
+
*
|
|
1754
|
+
* Either `query` or `seller` is required. Set `sold: true` to search
|
|
1755
|
+
* completed listings that actually sold - on that view `total_results` is
|
|
1756
|
+
* always null because eBay publishes no headline count for it.
|
|
1757
|
+
*
|
|
1758
|
+
* Paged with `page`; `per_page` accepts only 60, 120 or 240 and silently
|
|
1759
|
+
* falls back to 60 for any other value.
|
|
1760
|
+
*
|
|
1761
|
+
* Costs 1 credit.
|
|
1762
|
+
*/
|
|
1763
|
+
search(options: EbaySearchOptions): Promise<Record<string, unknown>>;
|
|
1764
|
+
/**
|
|
1765
|
+
* One eBay listing in full: price, condition, images, item specifics,
|
|
1766
|
+
* shipping, returns, auction state and seller.
|
|
1767
|
+
*
|
|
1768
|
+
* Costs 1 credit. Single response, no pagination.
|
|
1769
|
+
*/
|
|
1770
|
+
product(options: EbayProductOptions): Promise<Record<string, unknown>>;
|
|
1771
|
+
/**
|
|
1772
|
+
* A seller's profile card: store name, feedback score and percentage, items
|
|
1773
|
+
* sold, followers, location and categories.
|
|
1774
|
+
*
|
|
1775
|
+
* PROFILE ONLY - it cannot list what the seller is selling. For inventory,
|
|
1776
|
+
* call search({ seller }) with no query and page through it.
|
|
1777
|
+
*
|
|
1778
|
+
* Costs 1 credit. Single response, no pagination.
|
|
1779
|
+
*/
|
|
1780
|
+
seller(options: EbaySellerOptions): Promise<Record<string, unknown>>;
|
|
1781
|
+
}
|
|
1782
|
+
|
|
1783
|
+
interface TargetSearchOptions {
|
|
1784
|
+
/** Search keywords (1-500 characters). */
|
|
1785
|
+
keyword: string;
|
|
1786
|
+
/** Result page, 1-indexed. */
|
|
1787
|
+
page?: number;
|
|
1788
|
+
/** Results per page, 1-28 (default 24). Target rejects anything above 28. */
|
|
1789
|
+
count?: number;
|
|
1790
|
+
/** Result sort order (default "relevance"). */
|
|
1791
|
+
sort?: "relevance" | "featured" | "price_low" | "price_high" | "rating_high" | "best_seller" | "newest";
|
|
1792
|
+
/** Numeric Target store id used for pricing and availability (default "3991"). */
|
|
1793
|
+
store_id?: string;
|
|
1794
|
+
[key: string]: unknown;
|
|
1795
|
+
}
|
|
1796
|
+
interface TargetCategoryOptions {
|
|
1797
|
+
/** Category id: the segment after `N-` in a target.com /c/ URL. */
|
|
1798
|
+
category_id: string;
|
|
1799
|
+
/** Result page, 1-indexed. */
|
|
1800
|
+
page?: number;
|
|
1801
|
+
/** Results per page, 1-28 (default 24). Target rejects anything above 28. */
|
|
1802
|
+
count?: number;
|
|
1803
|
+
/** Result sort order (default "relevance"). */
|
|
1804
|
+
sort?: "relevance" | "featured" | "price_low" | "price_high" | "rating_high" | "best_seller" | "newest";
|
|
1805
|
+
/** Numeric Target store id used for pricing and availability (default "3991"). */
|
|
1806
|
+
store_id?: string;
|
|
1807
|
+
[key: string]: unknown;
|
|
1808
|
+
}
|
|
1809
|
+
interface TargetProductOptions {
|
|
1810
|
+
/**
|
|
1811
|
+
* Target TCIN. A child tcin is answered by its variation parent, with the
|
|
1812
|
+
* child itself present in `variants`.
|
|
1813
|
+
*/
|
|
1814
|
+
tcin: string;
|
|
1815
|
+
/** Numeric Target store id used for pricing and availability (default "3991"). */
|
|
1816
|
+
store_id?: string;
|
|
1817
|
+
[key: string]: unknown;
|
|
1818
|
+
}
|
|
1819
|
+
interface TargetReviewsOptions {
|
|
1820
|
+
/** Target TCIN. */
|
|
1821
|
+
tcin: string;
|
|
1822
|
+
/**
|
|
1823
|
+
* TRIMS the returned bodies only. Target publishes 8 reviews anonymously
|
|
1824
|
+
* and offers no paging, so this cannot reach a 9th review.
|
|
1825
|
+
*/
|
|
1826
|
+
limit?: number;
|
|
1827
|
+
/** Numeric Target store id used for pricing and availability (default "3991"). */
|
|
1828
|
+
store_id?: string;
|
|
1829
|
+
[key: string]: unknown;
|
|
1830
|
+
}
|
|
1831
|
+
declare class TargetNamespace {
|
|
1832
|
+
private client;
|
|
1833
|
+
constructor(client: Scavio);
|
|
1834
|
+
/**
|
|
1835
|
+
* Search Target.com: prices, ratings, badges and promotions.
|
|
1836
|
+
*
|
|
1837
|
+
* Paged with `page` + `count` (1-28, default 24). `seller_id` and
|
|
1838
|
+
* `seller_name` are null on first-party rows, which means "sold by Target".
|
|
1839
|
+
*
|
|
1840
|
+
* Costs 1 credit. Typically ~9s - it runs through a headless browser.
|
|
1841
|
+
*/
|
|
1842
|
+
search(options: TargetSearchOptions): Promise<Record<string, unknown>>;
|
|
1843
|
+
/**
|
|
1844
|
+
* Products in a Target category: the same shape as search() plus the
|
|
1845
|
+
* category breadcrumb.
|
|
1846
|
+
*
|
|
1847
|
+
* Paged with `page` + `count` (1-28, default 24).
|
|
1848
|
+
*
|
|
1849
|
+
* Costs 1 credit. The slowest endpoint here at ~37s - set a generous client
|
|
1850
|
+
* timeout before calling it.
|
|
1851
|
+
*/
|
|
1852
|
+
category(options: TargetCategoryOptions): Promise<Record<string, unknown>>;
|
|
1853
|
+
/**
|
|
1854
|
+
* Target product details by TCIN: price, rating, images, specifications,
|
|
1855
|
+
* variants, return policy and fulfillment.
|
|
1856
|
+
*
|
|
1857
|
+
* `store_id` is a real request param here - the price and availability you
|
|
1858
|
+
* get back are the store you asked for.
|
|
1859
|
+
*
|
|
1860
|
+
* Costs 1 credit. Typically ~4s. Single response, no pagination.
|
|
1861
|
+
*/
|
|
1862
|
+
product(options: TargetProductOptions): Promise<Record<string, unknown>>;
|
|
1863
|
+
/**
|
|
1864
|
+
* Target reviews with the rating breakdown, per-attribute averages and
|
|
1865
|
+
* guest photos.
|
|
1866
|
+
*
|
|
1867
|
+
* Returns 8 review BODIES MAXIMUM regardless of the product's review_count.
|
|
1868
|
+
* `limit` only trims that set; there is no page or offset param, so the
|
|
1869
|
+
* aggregate distribution is the full-population signal here, not the bodies.
|
|
1870
|
+
*
|
|
1871
|
+
* Costs 1 credit. Typically ~40s.
|
|
1872
|
+
*/
|
|
1873
|
+
reviews(options: TargetReviewsOptions): Promise<Record<string, unknown>>;
|
|
1874
|
+
}
|
|
1875
|
+
|
|
1876
|
+
interface HomeDepotSearchOptions {
|
|
1877
|
+
/** Search keywords (1-500 characters). */
|
|
1878
|
+
query: string;
|
|
1879
|
+
/** Result page, 1-indexed. Page size is fixed at 12 products. */
|
|
1880
|
+
page?: number;
|
|
1881
|
+
/**
|
|
1882
|
+
* Result sort order (default "best_match"). Closed set - an unrecognised
|
|
1883
|
+
* value is not ignored, it produces an empty billed page.
|
|
1884
|
+
*/
|
|
1885
|
+
sort_by?: "best_match" | "top_sellers" | "top_rated" | "price_low" | "price_high";
|
|
1886
|
+
/** Minimum price filter. */
|
|
1887
|
+
min_price?: number;
|
|
1888
|
+
/** Maximum price filter. */
|
|
1889
|
+
max_price?: number;
|
|
1890
|
+
[key: string]: unknown;
|
|
1891
|
+
}
|
|
1892
|
+
interface HomeDepotProductOptions {
|
|
1893
|
+
/**
|
|
1894
|
+
* Home Depot item id, or a full homedepot.com/p/... URL. Tracking params on
|
|
1895
|
+
* a pasted URL are discarded.
|
|
1896
|
+
*/
|
|
1897
|
+
item_id: string;
|
|
1898
|
+
[key: string]: unknown;
|
|
1899
|
+
}
|
|
1900
|
+
interface HomeDepotReviewsOptions {
|
|
1901
|
+
/** Home Depot item id. */
|
|
1902
|
+
item_id: string;
|
|
1903
|
+
/**
|
|
1904
|
+
* Result page, 1-indexed. 30 reviews per page. `total_pages` is the last
|
|
1905
|
+
* page that exists - asking past it returns 404.
|
|
1906
|
+
*/
|
|
1907
|
+
page?: number;
|
|
1908
|
+
[key: string]: unknown;
|
|
1909
|
+
}
|
|
1910
|
+
declare class HomeDepotNamespace {
|
|
1911
|
+
private client;
|
|
1912
|
+
constructor(client: Scavio);
|
|
1913
|
+
/**
|
|
1914
|
+
* Search Home Depot: price and promotions, brand and model, ratings,
|
|
1915
|
+
* badges, and per-store pickup/delivery.
|
|
1916
|
+
*
|
|
1917
|
+
* Page size is FIXED at 12 products and cannot be raised - page through
|
|
1918
|
+
* with `page` to read further.
|
|
1919
|
+
*
|
|
1920
|
+
* Costs 2 credits.
|
|
1921
|
+
*/
|
|
1922
|
+
search(options: HomeDepotSearchOptions): Promise<Record<string, unknown>>;
|
|
1923
|
+
/**
|
|
1924
|
+
* Full item detail: pricing and promotions, images and videos, the spec
|
|
1925
|
+
* table, dimensions, bullets, documents and return policy.
|
|
1926
|
+
*
|
|
1927
|
+
* Carries only a 10-review PREVIEW - reviews() is the paginated surface.
|
|
1928
|
+
* An unknown item id comes back as 404.
|
|
1929
|
+
*
|
|
1930
|
+
* Costs 2 credits. Single response, no pagination.
|
|
1931
|
+
*/
|
|
1932
|
+
product(options: HomeDepotProductOptions): Promise<Record<string, unknown>>;
|
|
1933
|
+
/**
|
|
1934
|
+
* One page of full review bodies with the rating distribution,
|
|
1935
|
+
* per-attribute ratings, photos and seller responses.
|
|
1936
|
+
*
|
|
1937
|
+
* 30 reviews per page. `total_pages` is the last page that exists; a page
|
|
1938
|
+
* beyond it is a 404, not an empty result.
|
|
1939
|
+
*
|
|
1940
|
+
* Costs 2 credits.
|
|
1941
|
+
*/
|
|
1942
|
+
reviews(options: HomeDepotReviewsOptions): Promise<Record<string, unknown>>;
|
|
1943
|
+
}
|
|
1944
|
+
|
|
1945
|
+
interface ZillowSearchOptions {
|
|
1946
|
+
/**
|
|
1947
|
+
* Region to search: a Zillow slug, a human form ("Austin, TX"), a ZIP, or a
|
|
1948
|
+
* pasted Zillow search URL. A bare ZIP works only on its own - combined
|
|
1949
|
+
* with any filter or sort, Zillow geolocates instead and answers about a
|
|
1950
|
+
* different city, so use the city name there.
|
|
1951
|
+
*/
|
|
1952
|
+
location: string;
|
|
1953
|
+
/** Which market to read (default "for_sale"). */
|
|
1954
|
+
listing_status?: "for_sale" | "for_rent" | "sold";
|
|
1955
|
+
/** Result page, 1-indexed. */
|
|
1956
|
+
page?: number;
|
|
1957
|
+
/**
|
|
1958
|
+
* Result sort order. Sorts that rank against a signed-in profile
|
|
1959
|
+
* (saved / featured / personalised) are deliberately absent - these
|
|
1960
|
+
* requests are never signed in.
|
|
1961
|
+
*/
|
|
1962
|
+
sort?: "relevance" | "recommended" | "newest" | "price_low" | "price_high" | "payment_low" | "payment_high" | "beds" | "baths" | "sqft" | "lot_size" | "zestimate_low" | "zestimate_high" | "recent_change";
|
|
1963
|
+
/**
|
|
1964
|
+
* Minimum price. On listing_status "for_rent" this is MONTHLY RENT, not
|
|
1965
|
+
* sale price.
|
|
1966
|
+
*/
|
|
1967
|
+
min_price?: number;
|
|
1968
|
+
/**
|
|
1969
|
+
* Maximum price. On listing_status "for_rent" this is MONTHLY RENT, not
|
|
1970
|
+
* sale price.
|
|
1971
|
+
*/
|
|
1972
|
+
max_price?: number;
|
|
1973
|
+
/** Minimum bedrooms. */
|
|
1974
|
+
beds_min?: number;
|
|
1975
|
+
/** Maximum bedrooms. */
|
|
1976
|
+
beds_max?: number;
|
|
1977
|
+
/** Minimum bathrooms. Half-baths allowed (1.5). */
|
|
1978
|
+
baths_min?: number;
|
|
1979
|
+
/** Maximum bathrooms. Half-baths allowed (1.5). */
|
|
1980
|
+
baths_max?: number;
|
|
1981
|
+
/** Minimum living area in square feet. */
|
|
1982
|
+
sqft_min?: number;
|
|
1983
|
+
/** Maximum living area in square feet. */
|
|
1984
|
+
sqft_max?: number;
|
|
1985
|
+
/** Minimum lot size in square feet. */
|
|
1986
|
+
lot_size_min?: number;
|
|
1987
|
+
/** Maximum lot size in square feet. */
|
|
1988
|
+
lot_size_max?: number;
|
|
1989
|
+
/** Earliest year built. */
|
|
1990
|
+
year_built_min?: number;
|
|
1991
|
+
/** Latest year built. */
|
|
1992
|
+
year_built_max?: number;
|
|
1993
|
+
/** Maximum monthly HOA fee. */
|
|
1994
|
+
max_hoa?: number;
|
|
1995
|
+
/** Property type filter. */
|
|
1996
|
+
home_type?: "houses" | "townhomes" | "multi_family" | "condos" | "apartments" | "manufactured" | "lots_land";
|
|
1997
|
+
/**
|
|
1998
|
+
* Listed within: days as "1" | "7" | "14" | "30" | "90", or months as
|
|
1999
|
+
* "6m" | "12m" | "24m" | "36m". Closed enum - an unrecognised value is not
|
|
2000
|
+
* an error, it silently returns the UNFILTERED set under a 200.
|
|
2001
|
+
*/
|
|
2002
|
+
days_on_zillow?: "1" | "7" | "14" | "30" | "90" | "6m" | "12m" | "24m" | "36m";
|
|
2003
|
+
/** Keyword filter applied to the listing text (1-200 characters). */
|
|
2004
|
+
keywords?: string;
|
|
2005
|
+
/** Pool only. */
|
|
2006
|
+
has_pool?: boolean;
|
|
2007
|
+
/** Garage only. */
|
|
2008
|
+
has_garage?: boolean;
|
|
2009
|
+
/** Air conditioning only. */
|
|
2010
|
+
has_air_conditioning?: boolean;
|
|
2011
|
+
/** Waterfront only. */
|
|
2012
|
+
is_waterfront?: boolean;
|
|
2013
|
+
/** Basement only. */
|
|
2014
|
+
has_basement?: boolean;
|
|
2015
|
+
/** New construction only. */
|
|
2016
|
+
is_new_construction?: boolean;
|
|
2017
|
+
/** Listings with an open house scheduled. */
|
|
2018
|
+
has_open_house?: boolean;
|
|
2019
|
+
/** Price-reduced listings only. */
|
|
2020
|
+
price_reduced?: boolean;
|
|
2021
|
+
/** Listings with a 3D tour. */
|
|
2022
|
+
is_3d_tour?: boolean;
|
|
2023
|
+
[key: string]: unknown;
|
|
2024
|
+
}
|
|
2025
|
+
interface ZillowPropertyOptions {
|
|
2026
|
+
/**
|
|
2027
|
+
* A zpid, a /homedetails/ URL, or a zillow.com/apartments/ building URL.
|
|
2028
|
+
* Rental buildings have no caller-visible zpid - search() returns
|
|
2029
|
+
* coordinates in that slot - so pass the /apartments/ URL for those.
|
|
2030
|
+
*/
|
|
2031
|
+
zpid: string;
|
|
2032
|
+
[key: string]: unknown;
|
|
2033
|
+
}
|
|
2034
|
+
interface ZillowAgentReviewsOptions {
|
|
2035
|
+
/**
|
|
2036
|
+
* The agent's zillow.com/profile/<name>/ screen name, or a full profile
|
|
2037
|
+
* URL. Screen names may contain spaces.
|
|
2038
|
+
*/
|
|
2039
|
+
screen_name: string;
|
|
2040
|
+
[key: string]: unknown;
|
|
2041
|
+
}
|
|
2042
|
+
declare class ZillowNamespace {
|
|
2043
|
+
private client;
|
|
2044
|
+
constructor(client: Scavio);
|
|
2045
|
+
/**
|
|
2046
|
+
* Listings in a region: price, beds, baths, living area, Zestimate,
|
|
2047
|
+
* coordinates, images and days on market.
|
|
2048
|
+
*
|
|
2049
|
+
* Paged with `page`. A bare ZIP works alone but not alongside a filter or a
|
|
2050
|
+
* sort - use the city name when filtering. On listing_status "for_rent",
|
|
2051
|
+
* min_price / max_price are MONTHLY RENT. A region Zillow cannot resolve is
|
|
2052
|
+
* a 404, not an empty list.
|
|
2053
|
+
*
|
|
2054
|
+
* Costs 1 credit.
|
|
2055
|
+
*/
|
|
2056
|
+
search(options: ZillowSearchOptions): Promise<Record<string, unknown>>;
|
|
2057
|
+
/**
|
|
2058
|
+
* Full listing detail: price and price history, Zestimate, tax history,
|
|
2059
|
+
* description, RESO facts, rooms, schools, open houses, photos and
|
|
2060
|
+
* attribution. Rental buildings return floor plans, amenities and unit
|
|
2061
|
+
* counts instead.
|
|
2062
|
+
*
|
|
2063
|
+
* Costs 1 credit. Single response, no pagination.
|
|
2064
|
+
*/
|
|
2065
|
+
property(options: ZillowPropertyOptions): Promise<Record<string, unknown>>;
|
|
2066
|
+
/**
|
|
2067
|
+
* An AGENT's profile and reviews: rating, review count, bodies with
|
|
2068
|
+
* sub-ratings, specialties, languages, licenses, service areas and sales
|
|
2069
|
+
* counts.
|
|
2070
|
+
*
|
|
2071
|
+
* This addresses an agent by screen name, NOT a property. Zillow
|
|
2072
|
+
* server-renders the first five reviews only: `count` is what came back,
|
|
2073
|
+
* `total_review_count` is what the agent actually has, and there is no way
|
|
2074
|
+
* to page to the rest.
|
|
2075
|
+
*
|
|
2076
|
+
* Costs 1 credit.
|
|
2077
|
+
*/
|
|
2078
|
+
agentReviews(options: ZillowAgentReviewsOptions): Promise<Record<string, unknown>>;
|
|
2079
|
+
}
|
|
2080
|
+
|
|
2081
|
+
interface RedfinSearchOptions {
|
|
2082
|
+
/**
|
|
2083
|
+
* A redfin.com region URL (/city/, /neighborhood/, /county/, /zipcode/) or
|
|
2084
|
+
* a bare 5-digit ZIP, up to 500 characters. CITY NAMES ARE NOT ACCEPTED.
|
|
2085
|
+
* Required unless `region_id` AND `region_type` are both given.
|
|
2086
|
+
*/
|
|
2087
|
+
location?: string;
|
|
2088
|
+
/**
|
|
2089
|
+
* Redfin's internal region id. NOT a ZIP code - a ZIP here resolves to a
|
|
2090
|
+
* different city instead of failing. Must be paired with `region_type`.
|
|
2091
|
+
*/
|
|
2092
|
+
region_id?: number;
|
|
2093
|
+
/**
|
|
2094
|
+
* What `region_id` refers to: 1 neighborhood, 2 ZIP, 5 county, 6 city.
|
|
2095
|
+
* Must be paired with `region_id`.
|
|
2096
|
+
*/
|
|
2097
|
+
region_type?: 1 | 2 | 5 | 6;
|
|
2098
|
+
/** Which market to read (default "for_sale"). */
|
|
2099
|
+
listing_status?: "for_sale" | "sold" | "for_rent";
|
|
2100
|
+
/**
|
|
2101
|
+
* Sold-listing lookback in days (default 90). REJECTED unless
|
|
2102
|
+
* `listing_status` is "sold" - it only widens whatever listing_status
|
|
2103
|
+
* already chose.
|
|
2104
|
+
*/
|
|
2105
|
+
sold_within_days?: number;
|
|
2106
|
+
/** Result page, 1-indexed. */
|
|
2107
|
+
page?: number;
|
|
2108
|
+
/** Listings per page, 1-350 (default 100). */
|
|
2109
|
+
limit?: number;
|
|
2110
|
+
/** Result sort order (default "recommended"). */
|
|
2111
|
+
sort?: "recommended" | "price_low" | "price_high" | "newest" | "oldest" | "sqft_low" | "sqft_high" | "price_per_sqft_low" | "price_per_sqft_high";
|
|
2112
|
+
/**
|
|
2113
|
+
* Minimum price. On `listing_status: "for_rent"` this is MONTHLY RENT, not
|
|
2114
|
+
* sale price.
|
|
2115
|
+
*/
|
|
2116
|
+
min_price?: number;
|
|
2117
|
+
/**
|
|
2118
|
+
* Maximum price. On `listing_status: "for_rent"` this is MONTHLY RENT, not
|
|
2119
|
+
* sale price.
|
|
2120
|
+
*/
|
|
2121
|
+
max_price?: number;
|
|
2122
|
+
/** Minimum bedrooms. Whole numbers only. */
|
|
2123
|
+
beds_min?: number;
|
|
2124
|
+
/** Maximum bedrooms. Whole numbers only. */
|
|
2125
|
+
beds_max?: number;
|
|
2126
|
+
/**
|
|
2127
|
+
* Minimum bathrooms. WHOLE baths only - a fractional value such as 1.5 is
|
|
2128
|
+
* rejected, not rounded.
|
|
2129
|
+
*/
|
|
2130
|
+
baths_min?: number;
|
|
2131
|
+
/** Minimum living area in square feet. Whole numbers only. */
|
|
2132
|
+
sqft_min?: number;
|
|
2133
|
+
/** Maximum living area in square feet. Whole numbers only. */
|
|
2134
|
+
sqft_max?: number;
|
|
2135
|
+
/** Minimum lot size in square feet. Whole numbers only. */
|
|
2136
|
+
lot_size_min?: number;
|
|
2137
|
+
/** Earliest year built. */
|
|
2138
|
+
year_built_min?: number;
|
|
2139
|
+
/** Latest year built. */
|
|
2140
|
+
year_built_max?: number;
|
|
2141
|
+
/** Maximum monthly HOA fee. */
|
|
2142
|
+
max_hoa?: number;
|
|
2143
|
+
/**
|
|
2144
|
+
* Property class. Redfin's uipt code 7 is deliberately absent - its meaning
|
|
2145
|
+
* could not be confirmed and a guess would silently search a different
|
|
2146
|
+
* class.
|
|
2147
|
+
*/
|
|
2148
|
+
property_type?: "house" | "condo" | "townhouse" | "multi_family" | "land" | "other" | "co_op";
|
|
2149
|
+
/** Listings with a pool only. */
|
|
2150
|
+
has_pool?: boolean;
|
|
2151
|
+
/**
|
|
2152
|
+
* Maximum days on market. Cannot be combined with `min_days_on_market` -
|
|
2153
|
+
* Redfin expresses both through ONE param, so the transport would send the
|
|
2154
|
+
* max and drop the min.
|
|
2155
|
+
*/
|
|
2156
|
+
max_days_on_market?: number;
|
|
2157
|
+
/**
|
|
2158
|
+
* Minimum days on market. Cannot be combined with `max_days_on_market`.
|
|
2159
|
+
*/
|
|
2160
|
+
min_days_on_market?: number;
|
|
2161
|
+
[key: string]: unknown;
|
|
2162
|
+
}
|
|
2163
|
+
interface RedfinPropertyOptions {
|
|
2164
|
+
/**
|
|
2165
|
+
* A Redfin property id, or any redfin.com listing URL carrying one (up to
|
|
2166
|
+
* 500 characters).
|
|
2167
|
+
*/
|
|
2168
|
+
property_id: string;
|
|
2169
|
+
[key: string]: unknown;
|
|
2170
|
+
}
|
|
2171
|
+
interface RedfinMarketOptions {
|
|
2172
|
+
/**
|
|
2173
|
+
* A redfin.com region URL (/city/, /neighborhood/, /county/, /zipcode/) or
|
|
2174
|
+
* a bare 5-digit ZIP, up to 500 characters. CITY NAMES ARE NOT ACCEPTED.
|
|
2175
|
+
* Required unless `region_id` AND `region_type` are both given.
|
|
2176
|
+
*/
|
|
2177
|
+
location?: string;
|
|
2178
|
+
/**
|
|
2179
|
+
* Redfin's internal region id. NOT a ZIP code. Must be paired with
|
|
2180
|
+
* `region_type`.
|
|
2181
|
+
*/
|
|
2182
|
+
region_id?: number;
|
|
2183
|
+
/**
|
|
2184
|
+
* What `region_id` refers to: 1 neighborhood, 2 ZIP, 5 county, 6 city.
|
|
2185
|
+
* Must be paired with `region_id`.
|
|
2186
|
+
*/
|
|
2187
|
+
region_type?: 1 | 2 | 5 | 6;
|
|
2188
|
+
[key: string]: unknown;
|
|
2189
|
+
}
|
|
2190
|
+
declare class RedfinNamespace {
|
|
2191
|
+
private client;
|
|
2192
|
+
constructor(client: Scavio);
|
|
2193
|
+
/**
|
|
2194
|
+
* Redfin listings: price, price per sqft, beds, baths, living area, lot
|
|
2195
|
+
* size, year built, coordinates, listing remarks and full photo galleries.
|
|
2196
|
+
*
|
|
2197
|
+
* Pass `location` (a redfin.com region URL or a bare ZIP - city NAMES are
|
|
2198
|
+
* not accepted) or `region_id` AND `region_type` together. Paged with
|
|
2199
|
+
* `page` + `limit`, up to 350 listings per page.
|
|
2200
|
+
*
|
|
2201
|
+
* `days_on_market` comes back NULL on every row: Redfin's mainHouseInfo has
|
|
2202
|
+
* no `dom` key. Fractional numeric filters are rejected, not rounded.
|
|
2203
|
+
* `sold_within_days` requires `listing_status: "sold"`, and
|
|
2204
|
+
* `max_days_on_market` / `min_days_on_market` cannot be combined.
|
|
2205
|
+
*
|
|
2206
|
+
* Costs 1 credit.
|
|
2207
|
+
*/
|
|
2208
|
+
search(options: RedfinSearchOptions): Promise<Record<string, unknown>>;
|
|
2209
|
+
/**
|
|
2210
|
+
* One Redfin listing in full: price, Redfin Estimate and rental estimate,
|
|
2211
|
+
* complete MLS fact sheet, price and tax history, listing agents, open
|
|
2212
|
+
* houses, schools, climate risk, walkability and location scores, sun
|
|
2213
|
+
* exposure, monthly weather, permits, zoning, comparable sales and photos.
|
|
2214
|
+
*
|
|
2215
|
+
* Reads the property PAGE, whose inlined request cache replaces the ~40
|
|
2216
|
+
* upstream calls that page made - which is why it is the same price as
|
|
2217
|
+
* search().
|
|
2218
|
+
*
|
|
2219
|
+
* Costs 1 credit. Single response, no pagination.
|
|
2220
|
+
*/
|
|
2221
|
+
property(options: RedfinPropertyOptions): Promise<Record<string, unknown>>;
|
|
2222
|
+
/**
|
|
2223
|
+
* Housing-market stats for a region: median list and sale price, price per
|
|
2224
|
+
* sqft, sale-to-list ratio, average offers and days on market, YoY
|
|
2225
|
+
* movement, Redfin's 0-100 compete score, live inventory by property type,
|
|
2226
|
+
* median price and active listings per bedroom count, plus Redfin agent
|
|
2227
|
+
* presence and aggregate rating.
|
|
2228
|
+
*
|
|
2229
|
+
* Pass `location` (city NAMES are not accepted) or `region_id` AND
|
|
2230
|
+
* `region_type` together.
|
|
2231
|
+
*
|
|
2232
|
+
* Costs 1 credit. Single response, no pagination.
|
|
2233
|
+
*/
|
|
2234
|
+
market(options: RedfinMarketOptions): Promise<Record<string, unknown>>;
|
|
2235
|
+
}
|
|
2236
|
+
|
|
2237
|
+
interface BookingSearchOptions {
|
|
2238
|
+
/**
|
|
2239
|
+
* Free-text destination, 1-200 characters ("Paris", "Lisbon, Portugal").
|
|
2240
|
+
* Either `destination` or `dest_id` is required.
|
|
2241
|
+
*/
|
|
2242
|
+
destination?: string;
|
|
2243
|
+
/**
|
|
2244
|
+
* Numeric Booking destination id. Either `destination` or `dest_id` is
|
|
2245
|
+
* required.
|
|
2246
|
+
*/
|
|
2247
|
+
dest_id?: string;
|
|
2248
|
+
/**
|
|
2249
|
+
* What `dest_id` refers to. Rejected without `dest_id` - Booking silently
|
|
2250
|
+
* ignores it on its own.
|
|
2251
|
+
*/
|
|
2252
|
+
dest_type?: "city" | "region" | "country" | "district" | "landmark" | "airport" | "hotel";
|
|
2253
|
+
/** Result page, 1-indexed. 25 properties per page. */
|
|
2254
|
+
page?: number;
|
|
2255
|
+
/** Result sort order (default "popularity"). */
|
|
2256
|
+
sort_by?: "popularity" | "price_low" | "price_high" | "stars_high" | "stars_low" | "stars_and_price" | "distance" | "review_score";
|
|
2257
|
+
/** Minimum price PER NIGHT, in `currency`. Must be <= `max_price`. */
|
|
2258
|
+
min_price?: number;
|
|
2259
|
+
/** Maximum price PER NIGHT, in `currency`. */
|
|
2260
|
+
max_price?: number;
|
|
2261
|
+
/** Star ratings to keep, 1-5 each, up to 5 values. OR'd together. */
|
|
2262
|
+
stars?: number[];
|
|
2263
|
+
/**
|
|
2264
|
+
* Minimum guest review score. A CLOSED set - Booking silently drops an
|
|
2265
|
+
* arbitrary threshold, so only "6", "7", "8" and "9" are accepted.
|
|
2266
|
+
*/
|
|
2267
|
+
min_review_score?: "6" | "7" | "8" | "9";
|
|
2268
|
+
/**
|
|
2269
|
+
* Accommodation type by name, or a raw numeric Booking accommodation-type
|
|
2270
|
+
* id.
|
|
2271
|
+
*/
|
|
2272
|
+
property_type?: "apartments" | "hostels" | "hotels" | "motels" | "resorts" | "bed_and_breakfasts" | "villas" | "campgrounds" | "vacation_homes" | "lodges" | "homestays" | number;
|
|
2273
|
+
/** Free-cancellation rates only. */
|
|
2274
|
+
free_cancellation?: boolean;
|
|
2275
|
+
/** No-prepayment rates only. */
|
|
2276
|
+
no_prepayment?: boolean;
|
|
2277
|
+
/** Breakfast-included rates only. */
|
|
2278
|
+
breakfast_included?: boolean;
|
|
2279
|
+
/**
|
|
2280
|
+
* Check-in date, YYYY-MM-DD. Must be sent together with `checkout` and
|
|
2281
|
+
* before it.
|
|
2282
|
+
*/
|
|
2283
|
+
checkin?: string;
|
|
2284
|
+
/** Check-out date, YYYY-MM-DD. Must be sent together with `checkin`. */
|
|
2285
|
+
checkout?: string;
|
|
2286
|
+
/** Adults in the party (default 2). */
|
|
2287
|
+
adults?: number;
|
|
2288
|
+
/** Child AGES, 0-17 each, up to 10 values. Ages, not a count. */
|
|
2289
|
+
children_ages?: number[];
|
|
2290
|
+
/** Rooms to price (default 1). */
|
|
2291
|
+
rooms?: number;
|
|
2292
|
+
/**
|
|
2293
|
+
* ISO 4217 currency, 3 letters (default "USD"). Leave it set - without a
|
|
2294
|
+
* currency Booking prices off the proxy exit.
|
|
2295
|
+
*/
|
|
2296
|
+
currency?: string;
|
|
2297
|
+
[key: string]: unknown;
|
|
2298
|
+
}
|
|
2299
|
+
interface BookingHotelOptions {
|
|
2300
|
+
/**
|
|
2301
|
+
* booking.com property URL or the bare page slug, 1-500 characters. Query
|
|
2302
|
+
* params are discarded. Chaining the `url` from a search row is cheapest -
|
|
2303
|
+
* a bare slug with the wrong `country_code` is a BILLED 404.
|
|
2304
|
+
*/
|
|
2305
|
+
hotel: string;
|
|
2306
|
+
/** Two-letter country code (default "us"). Only consulted for a bare slug. */
|
|
2307
|
+
country_code?: string;
|
|
2308
|
+
/**
|
|
2309
|
+
* Check-in date, YYYY-MM-DD. Must be sent together with `checkout` and
|
|
2310
|
+
* before it. Omitting both prices a two-night window Booking chose.
|
|
2311
|
+
*/
|
|
2312
|
+
checkin?: string;
|
|
2313
|
+
/** Check-out date, YYYY-MM-DD. Must be sent together with `checkin`. */
|
|
2314
|
+
checkout?: string;
|
|
2315
|
+
/** Adults in the party (default 2). */
|
|
2316
|
+
adults?: number;
|
|
2317
|
+
/** Child AGES, 0-17 each, up to 10 values. Ages, not a count. */
|
|
2318
|
+
children_ages?: number[];
|
|
2319
|
+
/** Rooms to price (default 1). */
|
|
2320
|
+
rooms?: number;
|
|
2321
|
+
/** ISO 4217 currency, 3 letters (default "USD"). */
|
|
2322
|
+
currency?: string;
|
|
2323
|
+
[key: string]: unknown;
|
|
2324
|
+
}
|
|
2325
|
+
interface BookingReviewsOptions {
|
|
2326
|
+
/**
|
|
2327
|
+
* booking.com property URL or the bare page slug, 1-500 characters. Query
|
|
2328
|
+
* params are discarded.
|
|
2329
|
+
*/
|
|
2330
|
+
hotel: string;
|
|
2331
|
+
/** Two-letter country code (default "us"). Only consulted for a bare slug. */
|
|
2332
|
+
country_code?: string;
|
|
2333
|
+
/**
|
|
2334
|
+
* Check-in date, YYYY-MM-DD. Must be sent together with `checkout` and
|
|
2335
|
+
* before it.
|
|
2336
|
+
*/
|
|
2337
|
+
checkin?: string;
|
|
2338
|
+
/** Check-out date, YYYY-MM-DD. Must be sent together with `checkin`. */
|
|
2339
|
+
checkout?: string;
|
|
2340
|
+
/** Adults in the party (default 2). */
|
|
2341
|
+
adults?: number;
|
|
2342
|
+
/** Child AGES, 0-17 each, up to 10 values. Ages, not a count. */
|
|
2343
|
+
children_ages?: number[];
|
|
2344
|
+
/** Rooms to price (default 1). */
|
|
2345
|
+
rooms?: number;
|
|
2346
|
+
/** ISO 4217 currency, 3 letters (default "USD"). */
|
|
2347
|
+
currency?: string;
|
|
2348
|
+
[key: string]: unknown;
|
|
2349
|
+
}
|
|
2350
|
+
declare class BookingNamespace {
|
|
2351
|
+
private client;
|
|
2352
|
+
constructor(client: Scavio);
|
|
2353
|
+
/**
|
|
2354
|
+
* Search Booking.com properties for a destination and stay: live nightly
|
|
2355
|
+
* price, review score, star rating, location, room type and deal badges.
|
|
2356
|
+
*
|
|
2357
|
+
* Either `destination` or `dest_id` is required - without one the request
|
|
2358
|
+
* would land on Booking's homepage, so it is rejected instead of billed.
|
|
2359
|
+
* `dest_type` requires `dest_id`.
|
|
2360
|
+
*
|
|
2361
|
+
* Paged with `page`, 25 properties per page. `checkin` and `checkout` must
|
|
2362
|
+
* be sent together or Booking prices a range of its own choosing.
|
|
2363
|
+
*
|
|
2364
|
+
* Each row carries a `url` - chain it into hotel() rather than rebuilding a
|
|
2365
|
+
* slug, which risks a BILLED 404 on the wrong `country_code`.
|
|
2366
|
+
*
|
|
2367
|
+
* Costs 1 credit.
|
|
2368
|
+
*/
|
|
2369
|
+
search(options: BookingSearchOptions): Promise<Record<string, unknown>>;
|
|
2370
|
+
/**
|
|
2371
|
+
* One Booking.com property in full: rooms and rate plans, facilities, house
|
|
2372
|
+
* rules, check-in windows, policies, images, location and review scores -
|
|
2373
|
+
* priced for the stay you ask for.
|
|
2374
|
+
*
|
|
2375
|
+
* Takes dates because Booking prices a STAY. Omit them and the response
|
|
2376
|
+
* carries prices for a two-night window Booking picked; the response echoes
|
|
2377
|
+
* whichever dates were used.
|
|
2378
|
+
*
|
|
2379
|
+
* Single response, no pagination.
|
|
2380
|
+
*
|
|
2381
|
+
* Costs 1 credit.
|
|
2382
|
+
*/
|
|
2383
|
+
hotel(options: BookingHotelOptions): Promise<Record<string, unknown>>;
|
|
2384
|
+
/**
|
|
2385
|
+
* Booking.com guest reviews with the score breakdown by category and
|
|
2386
|
+
* Booking's own praise/complaint summary.
|
|
2387
|
+
*
|
|
2388
|
+
* NO PAGE PARAM - do not invent one. `total_count` is the property's whole
|
|
2389
|
+
* review history; `count` is what this response holds.
|
|
2390
|
+
*
|
|
2391
|
+
* Costs 1 credit.
|
|
2392
|
+
*/
|
|
2393
|
+
reviews(options: BookingReviewsOptions): Promise<Record<string, unknown>>;
|
|
2394
|
+
}
|
|
2395
|
+
|
|
2396
|
+
interface AirbnbSearchOptions {
|
|
2397
|
+
/**
|
|
2398
|
+
* City, region, ZIP, or a pasted airbnb.com/s/ URL, 1-200 characters. A
|
|
2399
|
+
* location Airbnb cannot resolve is a 404, not an empty result.
|
|
2400
|
+
*/
|
|
2401
|
+
location: string;
|
|
2402
|
+
/**
|
|
2403
|
+
* Check-in date, YYYY-MM-DD. Must be sent together with `check_out` and
|
|
2404
|
+
* before it. Omitted, the transport defaults to +30 days and the response
|
|
2405
|
+
* sets `dates_are_defaulted`.
|
|
2406
|
+
*/
|
|
2407
|
+
check_in?: string;
|
|
2408
|
+
/**
|
|
2409
|
+
* Check-out date, YYYY-MM-DD. Must be sent together with `check_in`.
|
|
2410
|
+
* Omitted, it defaults to `check_in` + 5 nights.
|
|
2411
|
+
*/
|
|
2412
|
+
check_out?: string;
|
|
2413
|
+
/** Adults in the party. */
|
|
2414
|
+
adults?: number;
|
|
2415
|
+
/** Children, ages 2-12. */
|
|
2416
|
+
children?: number;
|
|
2417
|
+
/** Infants. */
|
|
2418
|
+
infants?: number;
|
|
2419
|
+
/** Pets. */
|
|
2420
|
+
pets?: number;
|
|
2421
|
+
/**
|
|
2422
|
+
* Minimum price for the WHOLE STAY, not per night. Must be <= `max_price`.
|
|
2423
|
+
*/
|
|
2424
|
+
min_price?: number;
|
|
2425
|
+
/** Maximum price for the WHOLE STAY, not per night. */
|
|
2426
|
+
max_price?: number;
|
|
2427
|
+
/** Room type. A closed set - an unrecognised value is rejected up front. */
|
|
2428
|
+
room_type?: "entire_home" | "private_room" | "shared_room" | "hotel_room";
|
|
2429
|
+
/** Minimum bedrooms. */
|
|
2430
|
+
min_bedrooms?: number;
|
|
2431
|
+
/** Minimum beds. */
|
|
2432
|
+
min_beds?: number;
|
|
2433
|
+
/** Minimum bathrooms. */
|
|
2434
|
+
min_bathrooms?: number;
|
|
2435
|
+
/** Superhost listings only. */
|
|
2436
|
+
superhost?: boolean;
|
|
2437
|
+
/** Instant Book listings only. */
|
|
2438
|
+
instant_book?: boolean;
|
|
2439
|
+
/** Guest Favourite listings only. */
|
|
2440
|
+
guest_favorite?: boolean;
|
|
2441
|
+
/** Free-cancellation listings only. */
|
|
2442
|
+
free_cancellation?: boolean;
|
|
2443
|
+
/**
|
|
2444
|
+
* Comma-separated amenity filter, 1-200 characters. Either the named
|
|
2445
|
+
* vocabulary - "wifi", "air_conditioning", "pool", "kitchen",
|
|
2446
|
+
* "free_parking", "washer", "self_check_in", "tv" - or raw numeric Airbnb
|
|
2447
|
+
* amenity ids. An unrecognised NAME is rejected before the scrape, because
|
|
2448
|
+
* Airbnb would otherwise answer the UNFILTERED set under a 200.
|
|
2449
|
+
*/
|
|
2450
|
+
amenities?: string;
|
|
2451
|
+
/**
|
|
2452
|
+
* ISO 4217 currency (default "USD"). Leave it set - without a currency
|
|
2453
|
+
* Airbnb prices off the proxy exit.
|
|
2454
|
+
*/
|
|
2455
|
+
currency?: string;
|
|
2456
|
+
/**
|
|
2457
|
+
* Result page, 1-indexed. 18 listings per page. Cannot be combined with
|
|
2458
|
+
* `cursor`.
|
|
2459
|
+
*/
|
|
2460
|
+
page?: number;
|
|
2461
|
+
/**
|
|
2462
|
+
* `next_cursor` from a previous response, 1-500 characters. Wins over
|
|
2463
|
+
* `page`, so sending both is rejected.
|
|
2464
|
+
*/
|
|
2465
|
+
cursor?: string;
|
|
2466
|
+
[key: string]: unknown;
|
|
2467
|
+
}
|
|
2468
|
+
interface AirbnbListingOptions {
|
|
2469
|
+
/**
|
|
2470
|
+
* Airbnb listing id or a full /rooms/ URL, 1-500 characters. Query params
|
|
2471
|
+
* are discarded - they carry someone else's dates.
|
|
2472
|
+
*/
|
|
2473
|
+
listing_id: string;
|
|
2474
|
+
/**
|
|
2475
|
+
* Check-in date, YYYY-MM-DD. Must be sent together with `check_out` and
|
|
2476
|
+
* before it. Dates do NOT produce a price here - the room page has none.
|
|
2477
|
+
*/
|
|
2478
|
+
check_in?: string;
|
|
2479
|
+
/** Check-out date, YYYY-MM-DD. Must be sent together with `check_in`. */
|
|
2480
|
+
check_out?: string;
|
|
2481
|
+
/** Adults in the party. */
|
|
2482
|
+
adults?: number;
|
|
2483
|
+
/** Children, ages 2-12. */
|
|
2484
|
+
children?: number;
|
|
2485
|
+
/** Infants. */
|
|
2486
|
+
infants?: number;
|
|
2487
|
+
/** Pets. */
|
|
2488
|
+
pets?: number;
|
|
2489
|
+
/** ISO 4217 currency (default "USD"). */
|
|
2490
|
+
currency?: string;
|
|
2491
|
+
[key: string]: unknown;
|
|
2492
|
+
}
|
|
2493
|
+
interface AirbnbReviewsOptions {
|
|
2494
|
+
/** Airbnb listing id or a full /rooms/ URL, 1-500 characters. */
|
|
2495
|
+
listing_id: string;
|
|
2496
|
+
/** ISO 4217 currency (default "USD"). */
|
|
2497
|
+
currency?: string;
|
|
2498
|
+
/**
|
|
2499
|
+
* Reviews per response, 1-50 (default 30). Send it explicitly - upstream
|
|
2500
|
+
* falls back to a fixed 7 rows when no limit is given.
|
|
2501
|
+
*/
|
|
2502
|
+
limit?: number;
|
|
2503
|
+
/** Row offset into the review list (default 0). */
|
|
2504
|
+
offset?: number;
|
|
2505
|
+
[key: string]: unknown;
|
|
2506
|
+
}
|
|
2507
|
+
declare class AirbnbNamespace {
|
|
2508
|
+
private client;
|
|
2509
|
+
constructor(client: Scavio);
|
|
2510
|
+
/**
|
|
2511
|
+
* Search Airbnb stays: stay-total and per-night price with the full
|
|
2512
|
+
* discount ledger, rating and review count, bedrooms/beds/baths,
|
|
2513
|
+
* coordinates, badges, images and `dates_are_defaulted`.
|
|
2514
|
+
*
|
|
2515
|
+
* This is the ONLY endpoint that carries a price - listing() has no nightly
|
|
2516
|
+
* rate field at all.
|
|
2517
|
+
*
|
|
2518
|
+
* Paged with `page` (18 listings per page) XOR `cursor`; `cursor` wins, so
|
|
2519
|
+
* sending both is rejected. `min_price` / `max_price` are WHOLE-STAY totals,
|
|
2520
|
+
* not per night.
|
|
2521
|
+
*
|
|
2522
|
+
* Pass `check_in` + `check_out` together whenever price matters: a dateless
|
|
2523
|
+
* search defaults to +30 days / 5 nights and A/Bs both the window and the
|
|
2524
|
+
* prices, which the response flags as `dates_are_defaulted`.
|
|
2525
|
+
*
|
|
2526
|
+
* Costs 1 credit.
|
|
2527
|
+
*/
|
|
2528
|
+
search(options: AirbnbSearchOptions): Promise<Record<string, unknown>>;
|
|
2529
|
+
/**
|
|
2530
|
+
* One Airbnb listing in full: description, property and room type, capacity
|
|
2531
|
+
* and room counts, the complete grouped amenity list (including the
|
|
2532
|
+
* amenities the place does NOT have), host profile and stats, house rules
|
|
2533
|
+
* with parsed check-in/out times, cancellation policy, sleeping
|
|
2534
|
+
* arrangements, photo tour, every image, and the RATING BREAKDOWN - six
|
|
2535
|
+
* category ratings, the five-bucket star distribution and Airbnb's
|
|
2536
|
+
* AI-synthesised review tags.
|
|
2537
|
+
*
|
|
2538
|
+
* NO NIGHTLY PRICE. The room page carries no rate under any parameters,
|
|
2539
|
+
* with or without dates. Prices come from search() only.
|
|
2540
|
+
*
|
|
2541
|
+
* Single response, no pagination.
|
|
2542
|
+
*
|
|
2543
|
+
* Costs 1 credit.
|
|
2544
|
+
*/
|
|
2545
|
+
listing(options: AirbnbListingOptions): Promise<Record<string, unknown>>;
|
|
2546
|
+
/**
|
|
2547
|
+
* Airbnb review BODIES with per-review rating, date, and reviewer name,
|
|
2548
|
+
* photo and location.
|
|
2549
|
+
*
|
|
2550
|
+
* Paged with `limit` (1-50, default 30) + `offset`. Send `limit`
|
|
2551
|
+
* explicitly - upstream returns a fixed 7 rows when none is given.
|
|
2552
|
+
*
|
|
2553
|
+
* `count` is the listing's TOTAL review count; `returned` is how many rows
|
|
2554
|
+
* this page holds. The rating breakdown is NOT here - it lives on
|
|
2555
|
+
* listing().
|
|
2556
|
+
*
|
|
2557
|
+
* Costs 1 credit.
|
|
2558
|
+
*/
|
|
2559
|
+
reviews(options: AirbnbReviewsOptions): Promise<Record<string, unknown>>;
|
|
2560
|
+
}
|
|
2561
|
+
|
|
2562
|
+
interface TripadvisorLocationsOptions {
|
|
2563
|
+
/** Place or business NAME to resolve, 1-120 characters. */
|
|
2564
|
+
query: string;
|
|
2565
|
+
/**
|
|
2566
|
+
* How many matches to return, 1-20 (default 12). This only SIZES the
|
|
2567
|
+
* response - it is not a page param.
|
|
2568
|
+
*/
|
|
2569
|
+
limit?: number;
|
|
2570
|
+
[key: string]: unknown;
|
|
2571
|
+
}
|
|
2572
|
+
interface TripadvisorSearchOptions {
|
|
2573
|
+
/**
|
|
2574
|
+
* Tripadvisor geo id. Accepts 30196, g30196, or a URL carrying one. Either
|
|
2575
|
+
* `geo_id` or `url` is required.
|
|
2576
|
+
*/
|
|
2577
|
+
geo_id?: string;
|
|
2578
|
+
/** Which listing family to read (default "restaurants"). */
|
|
2579
|
+
category?: "restaurants" | "hotels" | "attractions";
|
|
2580
|
+
/**
|
|
2581
|
+
* Result page, 1-indexed. 30 locations per page; a page beyond the last is
|
|
2582
|
+
* a 404, not an empty result.
|
|
2583
|
+
*/
|
|
2584
|
+
page?: number;
|
|
2585
|
+
/**
|
|
2586
|
+
* Full tripadvisor.com listing URL, 1-500 characters. The host is checked by
|
|
2587
|
+
* the transport (subdomain-aware, covers country sites). Either `geo_id` or
|
|
2588
|
+
* `url` is required.
|
|
2589
|
+
*/
|
|
2590
|
+
url?: string;
|
|
2591
|
+
[key: string]: unknown;
|
|
2592
|
+
}
|
|
2593
|
+
interface TripadvisorLocationOptions {
|
|
2594
|
+
/**
|
|
2595
|
+
* Tripadvisor location id. Accepts 1899234, d1899234, or a full _Review
|
|
2596
|
+
* URL. Either `location_id` or `url` is required.
|
|
2597
|
+
*/
|
|
2598
|
+
location_id?: string;
|
|
2599
|
+
/**
|
|
2600
|
+
* Tripadvisor geo id. Required by the transport when a bare d-id is sent -
|
|
2601
|
+
* the pair comes straight off a locations() business row.
|
|
2602
|
+
*/
|
|
2603
|
+
geo_id?: string;
|
|
2604
|
+
/** Which listing family the location belongs to (default "restaurants"). */
|
|
2605
|
+
category?: "restaurants" | "hotels" | "attractions";
|
|
2606
|
+
/**
|
|
2607
|
+
* Full tripadvisor.com listing URL, 1-500 characters. Either `location_id`
|
|
2608
|
+
* or `url` is required.
|
|
2609
|
+
*/
|
|
2610
|
+
url?: string;
|
|
2611
|
+
[key: string]: unknown;
|
|
2612
|
+
}
|
|
2613
|
+
interface TripadvisorReviewsOptions {
|
|
2614
|
+
/**
|
|
2615
|
+
* Tripadvisor location id. Accepts 1899234, d1899234, or a full _Review
|
|
2616
|
+
* URL. Either `location_id` or `url` is required.
|
|
2617
|
+
*/
|
|
2618
|
+
location_id?: string;
|
|
2619
|
+
/** Tripadvisor geo id for the location. */
|
|
2620
|
+
geo_id?: string;
|
|
2621
|
+
/**
|
|
2622
|
+
* Which listing family the location belongs to (default "restaurants").
|
|
2623
|
+
* Page size follows this, so it must match the location's own type on any
|
|
2624
|
+
* page past the first.
|
|
2625
|
+
*/
|
|
2626
|
+
category?: "restaurants" | "hotels" | "attractions";
|
|
2627
|
+
/**
|
|
2628
|
+
* Full tripadvisor.com listing URL, 1-500 characters. Either `location_id`
|
|
2629
|
+
* or `url` is required.
|
|
2630
|
+
*/
|
|
2631
|
+
url?: string;
|
|
2632
|
+
/**
|
|
2633
|
+
* Result page, 1-indexed. 15 per page for restaurants, 10 for hotels and
|
|
2634
|
+
* attractions. Past the last page is a 404.
|
|
2635
|
+
*/
|
|
2636
|
+
page?: number;
|
|
2637
|
+
[key: string]: unknown;
|
|
2638
|
+
}
|
|
2639
|
+
declare class TripadvisorNamespace {
|
|
2640
|
+
private client;
|
|
2641
|
+
constructor(client: Scavio);
|
|
2642
|
+
/**
|
|
2643
|
+
* START HERE. Resolve a place or business NAME to the Tripadvisor
|
|
2644
|
+
* geo_id / location_id pairs every other endpoint needs.
|
|
2645
|
+
*
|
|
2646
|
+
* A GEO row answers `geo_id` for search(); a business row answers the
|
|
2647
|
+
* `geo_id` + `location_id` pair location() and reviews() take. Those ids
|
|
2648
|
+
* exist only inside Tripadvisor's own URLs, so this is the only entry point
|
|
2649
|
+
* from a name.
|
|
2650
|
+
*
|
|
2651
|
+
* `limit` (1-20, default 12) sizes the response; there is no pagination.
|
|
2652
|
+
*
|
|
2653
|
+
* Costs 2 credits.
|
|
2654
|
+
*/
|
|
2655
|
+
locations(options: TripadvisorLocationsOptions): Promise<Record<string, unknown>>;
|
|
2656
|
+
/**
|
|
2657
|
+
* Restaurants, hotels or attractions in a Tripadvisor geo, Tripadvisor-
|
|
2658
|
+
* ranked: rating, review count, price band, address, coordinates, phone,
|
|
2659
|
+
* hours and Travelers' Choice badge. Each row carries the location_id +
|
|
2660
|
+
* geo_id pair the detail endpoints take.
|
|
2661
|
+
*
|
|
2662
|
+
* `geo_id` or `url` is required - get `geo_id` from locations().
|
|
2663
|
+
*
|
|
2664
|
+
* Paged with `page`, 30 locations per page. A page beyond the last is a
|
|
2665
|
+
* 404, not an empty result.
|
|
2666
|
+
*
|
|
2667
|
+
* Costs 2 credits.
|
|
2668
|
+
*/
|
|
2669
|
+
search(options: TripadvisorSearchOptions): Promise<Record<string, unknown>>;
|
|
2670
|
+
/**
|
|
2671
|
+
* One Tripadvisor location in full: rating, review histogram and per-aspect
|
|
2672
|
+
* sub-ratings, city ranking, price band, cuisines, amenities, address,
|
|
2673
|
+
* coordinates, contact, photos, and the FIRST PAGE OF REVIEWS.
|
|
2674
|
+
*
|
|
2675
|
+
* `location_id` or `url` is required, and the transport additionally
|
|
2676
|
+
* requires a geo when a bare d-id is sent.
|
|
2677
|
+
*
|
|
2678
|
+
* Page 1 of the reviews is already here - call reviews() only to page PAST
|
|
2679
|
+
* it. An unknown location id is a 404 (upstream answers a billed city
|
|
2680
|
+
* listing that the transport restates).
|
|
2681
|
+
*
|
|
2682
|
+
* Costs 2 credits.
|
|
2683
|
+
*/
|
|
2684
|
+
location(options: TripadvisorLocationOptions): Promise<Record<string, unknown>>;
|
|
2685
|
+
/**
|
|
2686
|
+
* A page of Tripadvisor reviews: rating, trip date and type, reviewer home
|
|
2687
|
+
* town and contribution count, and any management response.
|
|
2688
|
+
*
|
|
2689
|
+
* `location_id` or `url` is required. Page size follows `category` - 15 per
|
|
2690
|
+
* page for restaurants, 10 for hotels and attractions - so keep it matched
|
|
2691
|
+
* to the location's own type on any page past the first.
|
|
2692
|
+
*
|
|
2693
|
+
* Consecutive pages can REPEAT one review at the boundary; de-duplicate on
|
|
2694
|
+
* review_id when concatenating.
|
|
2695
|
+
*
|
|
2696
|
+
* Costs 2 credits.
|
|
2697
|
+
*/
|
|
2698
|
+
reviews(options: TripadvisorReviewsOptions): Promise<Record<string, unknown>>;
|
|
2699
|
+
}
|
|
2700
|
+
|
|
2701
|
+
interface YelpSearchOptions {
|
|
2702
|
+
/**
|
|
2703
|
+
* What to search for (1-200 characters), e.g. "coffee". Required together
|
|
2704
|
+
* with `location` unless `url` is given.
|
|
2705
|
+
*/
|
|
2706
|
+
term?: string;
|
|
2707
|
+
/**
|
|
2708
|
+
* Where to search (1-200 characters), e.g. "Austin, TX". Effectively
|
|
2709
|
+
* REQUIRED - without it Yelp geolocates off the proxy exit and the same
|
|
2710
|
+
* request answers about a different metro run to run.
|
|
2711
|
+
*/
|
|
2712
|
+
location?: string;
|
|
2713
|
+
/** Result page, 1-indexed. Yelp fixes the page size at 10. */
|
|
2714
|
+
page?: number;
|
|
2715
|
+
/**
|
|
2716
|
+
* Result sort order (default "recommended"). Closed set - Yelp ignores an
|
|
2717
|
+
* unrecognised value and serves default ranking under a billed 200.
|
|
2718
|
+
*/
|
|
2719
|
+
sort?: "recommended" | "rating" | "review_count";
|
|
2720
|
+
/** Price bands to include, 1 ($) to 4 ($$$$). 1-4 entries. */
|
|
2721
|
+
price?: Array<1 | 2 | 3 | 4>;
|
|
2722
|
+
/** Businesses open at request time only. */
|
|
2723
|
+
open_now?: boolean;
|
|
2724
|
+
/**
|
|
2725
|
+
* Raw Yelp filter aliases (RestaurantsDelivery, GoodForKids,
|
|
2726
|
+
* WheelchairAccessible), max 20. Deliberate PASSTHROUGH, not an enum -
|
|
2727
|
+
* Yelp's vocabulary runs ~117 values per vertical, and an alias it does not
|
|
2728
|
+
* know is ignored upstream so results come back unfiltered.
|
|
2729
|
+
*/
|
|
2730
|
+
attributes?: string[];
|
|
2731
|
+
/**
|
|
2732
|
+
* A full yelp.com/search URL as an alternative to term + location
|
|
2733
|
+
* (1-1000 characters).
|
|
2734
|
+
*/
|
|
2735
|
+
url?: string;
|
|
2736
|
+
[key: string]: unknown;
|
|
2737
|
+
}
|
|
2738
|
+
interface YelpBusinessOptions {
|
|
2739
|
+
/**
|
|
2740
|
+
* Yelp alias (desnudo-coffee-austin-2), opaque encid, or a yelp.com/biz URL
|
|
2741
|
+
* (1-500 characters). Either this or `url` is required.
|
|
2742
|
+
*/
|
|
2743
|
+
business_id?: string;
|
|
2744
|
+
/** A yelp.com/biz URL (1-1000 characters). Either this or `business_id` is required. */
|
|
2745
|
+
url?: string;
|
|
2746
|
+
[key: string]: unknown;
|
|
2747
|
+
}
|
|
2748
|
+
interface YelpReviewsOptions {
|
|
2749
|
+
/**
|
|
2750
|
+
* Yelp alias, opaque encid, or a yelp.com/biz URL (1-500 characters).
|
|
2751
|
+
* Either this or `url` is required.
|
|
2752
|
+
*/
|
|
2753
|
+
business_id?: string;
|
|
2754
|
+
/** A yelp.com/biz URL (1-1000 characters). Either this or `business_id` is required. */
|
|
2755
|
+
url?: string;
|
|
2756
|
+
/**
|
|
2757
|
+
* Result page, 1-indexed, 10 reviews per page. PAGE 1 IS REDUNDANT with
|
|
2758
|
+
* business() and costs another 2 credits - start at page 2. A page past the
|
|
2759
|
+
* last review is a 404, not an empty result.
|
|
2760
|
+
*/
|
|
2761
|
+
page?: number;
|
|
2762
|
+
/**
|
|
2763
|
+
* Review sort order (default "relevance"). Closed set - an unrecognised
|
|
2764
|
+
* value is served as default ranking under a billed 200.
|
|
2765
|
+
*/
|
|
2766
|
+
sort?: "relevance" | "newest" | "oldest" | "rating_high" | "rating_low" | "elites";
|
|
2767
|
+
/** Keep only reviews at this star rating. Changes filtered_review_count, not review_count. */
|
|
2768
|
+
rating?: 1 | 2 | 3 | 4 | 5;
|
|
2769
|
+
[key: string]: unknown;
|
|
2770
|
+
}
|
|
2771
|
+
declare class YelpNamespace {
|
|
2772
|
+
private client;
|
|
2773
|
+
constructor(client: Scavio);
|
|
2774
|
+
/**
|
|
2775
|
+
* Businesses in Yelp's ranked order: rating, review count, price band,
|
|
2776
|
+
* categories, address, contact rails, hours, photos and a review snippet.
|
|
2777
|
+
* Each row carries both business_id and alias, either of which addresses
|
|
2778
|
+
* business(). `count` is the 10-row page, `total_results` is Yelp's headline
|
|
2779
|
+
* count.
|
|
2780
|
+
*
|
|
2781
|
+
* `term` + `location` or `url` is required, and `location` is effectively
|
|
2782
|
+
* mandatory - Yelp geolocates a location-less search off the proxy exit.
|
|
2783
|
+
* Paged with `page`; the page size is fixed at 10.
|
|
2784
|
+
*
|
|
2785
|
+
* Costs 2 credits.
|
|
2786
|
+
*/
|
|
2787
|
+
search(options: YelpSearchOptions): Promise<Record<string, unknown>>;
|
|
2788
|
+
/**
|
|
2789
|
+
* One business in full: rating and per-star histogram, review count, price
|
|
2790
|
+
* band, categories, address and coordinates, phone, website and menu links,
|
|
2791
|
+
* hours and holidays, amenities, photos and videos, popular items, health
|
|
2792
|
+
* inspections, Q&A, licences and claim status - PLUS the first page of
|
|
2793
|
+
* reviews at no extra cost.
|
|
2794
|
+
*
|
|
2795
|
+
* Because those reviews ride along, calling reviews({ page: 1 }) after this
|
|
2796
|
+
* buys the same document twice. Yelp's recommendation software hides some
|
|
2797
|
+
* reviews entirely; those are never returned and are counted in
|
|
2798
|
+
* not_recommended_review_count here. popular_items rows can arrive as stub
|
|
2799
|
+
* shells with every field null but `identifier` - those are dropped and
|
|
2800
|
+
* popular_items_omitted flags it.
|
|
2801
|
+
*
|
|
2802
|
+
* `business_id` or `url` is required. Costs 2 credits. Single response, no
|
|
2803
|
+
* pagination.
|
|
2804
|
+
*/
|
|
2805
|
+
business(options: YelpBusinessOptions): Promise<Record<string, unknown>>;
|
|
2806
|
+
/**
|
|
2807
|
+
* A page of reviews: rating, full text, language, author profile and
|
|
2808
|
+
* expertise counts, attached photos, reaction counts and owner response.
|
|
2809
|
+
*
|
|
2810
|
+
* START AT PAGE 2 - page 1 re-fetches the document business() already
|
|
2811
|
+
* returned and costs another 2 credits. 10 reviews per page, and a page past
|
|
2812
|
+
* the last review is a 404, not an empty result. `rating` changes
|
|
2813
|
+
* filtered_review_count, not review_count.
|
|
2814
|
+
*
|
|
2815
|
+
* `business_id` or `url` is required. Costs 2 credits.
|
|
2816
|
+
*/
|
|
2817
|
+
reviews(options: YelpReviewsOptions): Promise<Record<string, unknown>>;
|
|
2818
|
+
}
|
|
2819
|
+
|
|
2820
|
+
interface IndeedSearchOptions {
|
|
2821
|
+
/**
|
|
2822
|
+
* Search keywords, 1-500 characters. Optional: either `query` or `location`
|
|
2823
|
+
* must be present.
|
|
2824
|
+
*/
|
|
2825
|
+
query?: string;
|
|
2826
|
+
/**
|
|
2827
|
+
* City+state, postal code, state, country or "Remote", 1-200 characters.
|
|
2828
|
+
* Usable with NO `query` at all - that returns every posting in the metro.
|
|
2829
|
+
*/
|
|
2830
|
+
location?: string;
|
|
2831
|
+
/** Result page, 1-indexed. 10 postings per page. */
|
|
2832
|
+
page?: number;
|
|
2833
|
+
/**
|
|
2834
|
+
* Search radius in miles. A CLOSED set (upstream default 50) - Indeed
|
|
2835
|
+
* ignores anything else and bills a wider search than you asked for.
|
|
2836
|
+
*/
|
|
2837
|
+
radius?: 0 | 5 | 10 | 15 | 25 | 35 | 50 | 100;
|
|
2838
|
+
/**
|
|
2839
|
+
* Maximum posting age in days. A CLOSED set - Indeed ignores anything else
|
|
2840
|
+
* and returns the unfiltered set.
|
|
2841
|
+
*/
|
|
2842
|
+
max_age_days?: 1 | 3 | 7 | 14;
|
|
2843
|
+
/** Employment type filter. */
|
|
2844
|
+
job_type?: "full_time" | "part_time" | "contract" | "temporary" | "internship";
|
|
2845
|
+
/**
|
|
2846
|
+
* Minimum salary. Filters on INDEED'S OWN ESTIMATE for the role, not a
|
|
2847
|
+
* posted figure, so postings publishing no salary still match.
|
|
2848
|
+
*/
|
|
2849
|
+
min_salary?: number;
|
|
2850
|
+
/** Remote postings only. */
|
|
2851
|
+
remote?: boolean;
|
|
2852
|
+
[key: string]: unknown;
|
|
2853
|
+
}
|
|
2854
|
+
interface IndeedJobOptions {
|
|
2855
|
+
/**
|
|
2856
|
+
* 16-hex Indeed job key, or any indeed.com URL carrying jk= (/viewjob,
|
|
2857
|
+
* /rc/clk, /pagead/clk).
|
|
2858
|
+
*/
|
|
2859
|
+
job_id: string;
|
|
2860
|
+
[key: string]: unknown;
|
|
2861
|
+
}
|
|
2862
|
+
interface IndeedCompanyOptions {
|
|
2863
|
+
/**
|
|
2864
|
+
* indeed.com/cmp/<slug> slug or a full profile URL, 1-200 characters. Slugs
|
|
2865
|
+
* are untidy - e.g. "Tata-Consultancy-Services-(tcs)".
|
|
2866
|
+
*/
|
|
2867
|
+
company: string;
|
|
2868
|
+
[key: string]: unknown;
|
|
2869
|
+
}
|
|
2870
|
+
interface IndeedCompanyReviewsOptions {
|
|
2871
|
+
/**
|
|
2872
|
+
* indeed.com/cmp/<slug> slug or a full profile URL, 1-200 characters.
|
|
2873
|
+
*/
|
|
2874
|
+
company: string;
|
|
2875
|
+
/** Result page, 1-indexed. 20 reviews per page. */
|
|
2876
|
+
page?: number;
|
|
2877
|
+
[key: string]: unknown;
|
|
2878
|
+
}
|
|
2879
|
+
declare class IndeedNamespace {
|
|
2880
|
+
private client;
|
|
2881
|
+
constructor(client: Scavio);
|
|
2882
|
+
/**
|
|
2883
|
+
* Search Indeed job postings: title, employer, rating, location, salary
|
|
2884
|
+
* range, job type, benefits, posting age and apply route.
|
|
2885
|
+
*
|
|
2886
|
+
* Either `query` or `location` is required; a location-only search is valid
|
|
2887
|
+
* and returns every posting in the metro.
|
|
2888
|
+
*
|
|
2889
|
+
* Paged with `page`, 10 postings per page. `radius` and `max_age_days` are
|
|
2890
|
+
* closed sets - Indeed silently ignores an off-list value and bills the
|
|
2891
|
+
* unfiltered search. `min_salary` filters on Indeed's own ESTIMATE for the
|
|
2892
|
+
* role, not a posted figure.
|
|
2893
|
+
*
|
|
2894
|
+
* Costs 2 credits.
|
|
2895
|
+
*/
|
|
2896
|
+
search(options: IndeedSearchOptions): Promise<Record<string, unknown>>;
|
|
2897
|
+
/**
|
|
2898
|
+
* One Indeed posting in full: description text and HTML, structured salary,
|
|
2899
|
+
* employment types, benefits, geocoded address, employer rating, applicant
|
|
2900
|
+
* count and the original ATS link.
|
|
2901
|
+
*
|
|
2902
|
+
* Single response, no pagination. An unknown job key is a real 404 that
|
|
2903
|
+
* scrape.do BILLS - take `job_id` from a search row.
|
|
2904
|
+
*
|
|
2905
|
+
* Costs 2 credits.
|
|
2906
|
+
*/
|
|
2907
|
+
job(options: IndeedJobOptions): Promise<Record<string, unknown>>;
|
|
2908
|
+
/**
|
|
2909
|
+
* Indeed employer profile: description, industry, HQ, size, revenue, CEO
|
|
2910
|
+
* approval, overall and per-category ratings, reported salaries, open roles
|
|
2911
|
+
* and locations.
|
|
2912
|
+
*
|
|
2913
|
+
* Single response, no pagination. An unknown company slug is a real 404
|
|
2914
|
+
* that scrape.do BILLS.
|
|
2915
|
+
*
|
|
2916
|
+
* Costs 2 credits.
|
|
2917
|
+
*/
|
|
2918
|
+
company(options: IndeedCompanyOptions): Promise<Record<string, unknown>>;
|
|
2919
|
+
/**
|
|
2920
|
+
* Indeed employee reviews with per-category ratings, pros/cons, reviewer
|
|
2921
|
+
* job title and location, plus aggregated sentiment and topic / location /
|
|
2922
|
+
* job-title breakdowns.
|
|
2923
|
+
*
|
|
2924
|
+
* Paged with `page`, 20 reviews per page.
|
|
2925
|
+
*
|
|
2926
|
+
* Costs 2 credits.
|
|
2927
|
+
*/
|
|
2928
|
+
companyReviews(options: IndeedCompanyReviewsOptions): Promise<Record<string, unknown>>;
|
|
2929
|
+
}
|
|
2930
|
+
|
|
2931
|
+
interface GlassdoorCompaniesOptions {
|
|
2932
|
+
/** Company name to resolve (1-120 characters). */
|
|
2933
|
+
query: string;
|
|
2934
|
+
[key: string]: unknown;
|
|
2935
|
+
}
|
|
2936
|
+
interface GlassdoorCompanyOptions {
|
|
2937
|
+
/**
|
|
2938
|
+
* Glassdoor employer id. MUST BE A STRING - a JSON number is rejected.
|
|
2939
|
+
* Accepts 1699, E1699 or IE1699. Either this or `url` is required.
|
|
2940
|
+
*/
|
|
2941
|
+
employer_id?: string;
|
|
2942
|
+
/**
|
|
2943
|
+
* Company name (1-200 characters). COSMETIC ONLY: the profile resolves on
|
|
2944
|
+
* employer_id alone, this is ignored entirely when `url` is set, and it does
|
|
2945
|
+
* NOT satisfy the employer_id-or-url requirement.
|
|
2946
|
+
*/
|
|
2947
|
+
company?: string;
|
|
2948
|
+
/**
|
|
2949
|
+
* Any glassdoor.com employer URL (/Overview/, /Reviews/ or /Salary/).
|
|
2950
|
+
* Non-glassdoor.com hosts are rejected. Either this or `employer_id` is
|
|
2951
|
+
* required.
|
|
2952
|
+
*/
|
|
2953
|
+
url?: string;
|
|
2954
|
+
[key: string]: unknown;
|
|
2955
|
+
}
|
|
2956
|
+
interface GlassdoorReviewsOptions {
|
|
2957
|
+
/**
|
|
2958
|
+
* Glassdoor employer id as a STRING (1699, E1699 or IE1699). Either this or
|
|
2959
|
+
* `url` is required. Addressing by employer_id costs two upstream fetches -
|
|
2960
|
+
* pass reviews_url from company() as `url` instead.
|
|
2961
|
+
*/
|
|
2962
|
+
employer_id?: string;
|
|
2963
|
+
/** Company name (1-200 characters). Cosmetic; does not satisfy the identifier requirement. */
|
|
2964
|
+
company?: string;
|
|
2965
|
+
/**
|
|
2966
|
+
* Pass back the reviews_url that company() returned to skip the resolve
|
|
2967
|
+
* fetch. Either this or `employer_id` is required.
|
|
2968
|
+
*/
|
|
2969
|
+
url?: string;
|
|
2970
|
+
/**
|
|
2971
|
+
* Restrict to reviews about one axis. Closed set - Glassdoor ignores an
|
|
2972
|
+
* unknown value and returns the UNFILTERED set under a 200.
|
|
2973
|
+
*/
|
|
2974
|
+
category?: "career_development" | "compensation" | "culture" | "diversity_and_inclusion" | "management" | "work_life_balance";
|
|
2975
|
+
/**
|
|
2976
|
+
* Restrict to reviewers of one employment type. Closed set - an unknown
|
|
2977
|
+
* value is silently unfiltered. FREELANCE is absent because it was never
|
|
2978
|
+
* confirmed to change the result set.
|
|
2979
|
+
*/
|
|
2980
|
+
employment_status?: "full_time" | "part_time" | "contract" | "intern";
|
|
2981
|
+
[key: string]: unknown;
|
|
2982
|
+
}
|
|
2983
|
+
interface GlassdoorSalariesOptions {
|
|
2984
|
+
/**
|
|
2985
|
+
* Glassdoor employer id as a STRING (1699, E1699 or IE1699). Either this or
|
|
2986
|
+
* `url` is required. Addressing by employer_id costs two upstream fetches -
|
|
2987
|
+
* pass salaries_url from company() as `url` instead.
|
|
2988
|
+
*/
|
|
2989
|
+
employer_id?: string;
|
|
2990
|
+
/** Company name (1-200 characters). Cosmetic; does not satisfy the identifier requirement. */
|
|
2991
|
+
company?: string;
|
|
2992
|
+
/**
|
|
2993
|
+
* Pass back the salaries_url that company() returned to skip the resolve
|
|
2994
|
+
* fetch. Either this or `employer_id` is required.
|
|
2995
|
+
*/
|
|
2996
|
+
url?: string;
|
|
2997
|
+
/**
|
|
2998
|
+
* Result page, 1-indexed. 10 job titles per page; `page_count` on the
|
|
2999
|
+
* response is how many pages exist.
|
|
3000
|
+
*/
|
|
3001
|
+
page?: number;
|
|
3002
|
+
[key: string]: unknown;
|
|
3003
|
+
}
|
|
3004
|
+
declare class GlassdoorNamespace {
|
|
3005
|
+
private client;
|
|
3006
|
+
constructor(client: Scavio);
|
|
3007
|
+
/**
|
|
3008
|
+
* START HERE. Search Glassdoor for a company by NAME and resolve it to the
|
|
3009
|
+
* employer_id every other method needs, ranked by Glassdoor and
|
|
3010
|
+
* de-duplicated.
|
|
3011
|
+
*
|
|
3012
|
+
* company(), reviews() and salaries() all key off an employer_id that exists
|
|
3013
|
+
* only inside Glassdoor's /Overview/ URLs, so this lookup is the entry
|
|
3014
|
+
* point.
|
|
3015
|
+
*
|
|
3016
|
+
* Costs 1 credit. Single response, no pagination.
|
|
3017
|
+
*/
|
|
3018
|
+
companies(options: GlassdoorCompaniesOptions): Promise<Record<string, unknown>>;
|
|
3019
|
+
/**
|
|
3020
|
+
* Employer profile: description, mission, industry, sector, HQ, size band,
|
|
3021
|
+
* revenue band, stock symbol, year founded, overall and per-category
|
|
3022
|
+
* ratings, star distribution, CEO approval, awards, FAQ, the five
|
|
3023
|
+
* server-rendered reviews, AND reviews_url / salaries_url.
|
|
3024
|
+
*
|
|
3025
|
+
* THE CHAINING ENDPOINT: pass reviews_url / salaries_url back as `url` on
|
|
3026
|
+
* reviews() and salaries() to halve the upstream fetches. `employer_id` or
|
|
3027
|
+
* `url` is required - `company` is cosmetic and does not satisfy it.
|
|
3028
|
+
*
|
|
3029
|
+
* Costs 1 credit. Single response, no pagination. Typically ~3-47s.
|
|
3030
|
+
*/
|
|
3031
|
+
company(options: GlassdoorCompanyOptions): Promise<Record<string, unknown>>;
|
|
3032
|
+
/**
|
|
3033
|
+
* Full reviews with per-axis scores, pros, cons, advice, job title,
|
|
3034
|
+
* location, employment status and employer response - plus complete rating
|
|
3035
|
+
* statistics, star distribution, aggregate pro/con highlight terms and
|
|
3036
|
+
* per-job-title review counts.
|
|
3037
|
+
*
|
|
3038
|
+
* HARD CAP OF THREE REVIEW BODIES per response: that is Glassdoor's login
|
|
3039
|
+
* wall, not a limit option. There is deliberately NO `page` param. Move the
|
|
3040
|
+
* window with `category` and `employment_status` and read
|
|
3041
|
+
* filtered_review_count to see how many match; the aggregate statistics are
|
|
3042
|
+
* the full-population signal here, not the bodies.
|
|
3043
|
+
*
|
|
3044
|
+
* `employer_id` or `url` is required. Costs 1 credit. Typically ~75s.
|
|
3045
|
+
*/
|
|
3046
|
+
reviews(options: GlassdoorReviewsOptions): Promise<Record<string, unknown>>;
|
|
3047
|
+
/**
|
|
3048
|
+
* Salaries by job title: base-pay and total-pay percentiles P10-P90 with
|
|
3049
|
+
* medians called out, sample counts, currency, pay period and last-reported
|
|
3050
|
+
* date.
|
|
3051
|
+
*
|
|
3052
|
+
* These are Glassdoor's ESTIMATES for the title, not individual reported
|
|
3053
|
+
* salaries. Paged with `page` at 10 job titles per page; `page_count` on the
|
|
3054
|
+
* response is how many pages exist.
|
|
3055
|
+
*
|
|
3056
|
+
* `employer_id` or `url` is required. Costs 1 credit. Typically ~41s.
|
|
3057
|
+
*/
|
|
3058
|
+
salaries(options: GlassdoorSalariesOptions): Promise<Record<string, unknown>>;
|
|
3059
|
+
}
|
|
3060
|
+
|
|
3061
|
+
interface AppStoreSearchOptions {
|
|
3062
|
+
/**
|
|
3063
|
+
* Search term (1-500 characters). Matches app name, keyword OR publisher
|
|
3064
|
+
* name - searching a developer returns their catalogue.
|
|
3065
|
+
*/
|
|
3066
|
+
term: string;
|
|
3067
|
+
/**
|
|
3068
|
+
* Number of apps to return, 1-200 (default 25). THE ONLY LEVER on result
|
|
3069
|
+
* volume: there is no pagination and every offset spelling is ignored.
|
|
3070
|
+
*/
|
|
3071
|
+
limit?: number;
|
|
3072
|
+
/**
|
|
3073
|
+
* Two-letter storefront code (default "us"). Decides price, currency,
|
|
3074
|
+
* localised title and whether the app is sold there at all. Anything that is
|
|
3075
|
+
* not exactly two letters falls back to US.
|
|
3076
|
+
*/
|
|
3077
|
+
country?: string;
|
|
3078
|
+
/** Which catalogue to search (default "software", i.e. iPhone apps). */
|
|
3079
|
+
entity?: "software" | "ipad_software" | "mac_software";
|
|
3080
|
+
/**
|
|
3081
|
+
* Five-letter locale for the returned text, e.g. "en_us". Independent of
|
|
3082
|
+
* `country`: the storefront sets the price, this sets the words.
|
|
3083
|
+
*/
|
|
3084
|
+
lang?: string;
|
|
3085
|
+
[key: string]: unknown;
|
|
3086
|
+
}
|
|
3087
|
+
interface AppStoreAppOptions {
|
|
3088
|
+
/**
|
|
3089
|
+
* App Store id OR bundle id (notion.id, com.burbn.instagram), auto-detected
|
|
3090
|
+
* and returning an identical payload. 1-255 characters matching
|
|
3091
|
+
* ^[A-Za-z0-9][A-Za-z0-9._-]*$ - a pasted apps.apple.com URL is rejected
|
|
3092
|
+
* with a free 400.
|
|
3093
|
+
*/
|
|
3094
|
+
app_id: string;
|
|
3095
|
+
/**
|
|
3096
|
+
* Two-letter storefront code (default "us"). Decides price, currency,
|
|
3097
|
+
* localised title and availability. Anything not exactly two letters falls
|
|
3098
|
+
* back to US.
|
|
3099
|
+
*/
|
|
3100
|
+
country?: string;
|
|
3101
|
+
[key: string]: unknown;
|
|
3102
|
+
}
|
|
3103
|
+
interface AppStoreReviewsOptions {
|
|
3104
|
+
/**
|
|
3105
|
+
* NUMERIC App Store id only - the reviews RSS feed has no bundle-id form,
|
|
3106
|
+
* unlike app().
|
|
3107
|
+
*/
|
|
3108
|
+
app_id: string;
|
|
3109
|
+
/**
|
|
3110
|
+
* Two-letter storefront code (default "us"). Each storefront has its own
|
|
3111
|
+
* 500-review ceiling, so a different country is how you read past page 10.
|
|
3112
|
+
*/
|
|
3113
|
+
country?: string;
|
|
3114
|
+
/**
|
|
3115
|
+
* Result page, 1-10 (default 1), 50 reviews each. HARD STOP AT PAGE 10 -
|
|
3116
|
+
* 500 reviews per storefront is Apple's anonymous ceiling.
|
|
3117
|
+
*/
|
|
3118
|
+
page?: number;
|
|
3119
|
+
/**
|
|
3120
|
+
* Review sort order (default "most_recent"). Under "most_recent" almost
|
|
3121
|
+
* every review is too new to have been voted on and the vote fields come
|
|
3122
|
+
* back as ZEROES; "most_helpful" returns them densely populated.
|
|
3123
|
+
*/
|
|
3124
|
+
sort?: "most_recent" | "most_helpful";
|
|
3125
|
+
[key: string]: unknown;
|
|
3126
|
+
}
|
|
3127
|
+
declare class AppStoreNamespace {
|
|
3128
|
+
private client;
|
|
3129
|
+
constructor(client: Scavio);
|
|
3130
|
+
/**
|
|
3131
|
+
* Up to 200 fully-shaped App Store apps - the same 43-field row as app() -
|
|
3132
|
+
* which makes this a bulk metadata fetch as well as a search, and a
|
|
3133
|
+
* publisher lookup when the term is a developer name.
|
|
3134
|
+
*
|
|
3135
|
+
* NO PAGINATION. `limit` (1-200, default 25) is the only lever on volume;
|
|
3136
|
+
* every offset spelling is silently ignored. Mac rows carry no iPad or Apple
|
|
3137
|
+
* TV screenshots, advisories, features, supported devices or Game Center
|
|
3138
|
+
* flag.
|
|
3139
|
+
*
|
|
3140
|
+
* Costs 1 credit.
|
|
3141
|
+
*/
|
|
3142
|
+
search(options: AppStoreSearchOptions): Promise<Record<string, unknown>>;
|
|
3143
|
+
/**
|
|
3144
|
+
* Full listing: title, description, developer and seller identity, price and
|
|
3145
|
+
* currency, all-time and current-version ratings, version and release notes,
|
|
3146
|
+
* genres, content rating and advisories, icons at three sizes, screenshots,
|
|
3147
|
+
* download size, minimum OS, languages, supported devices, Game Center and
|
|
3148
|
+
* VPP flags.
|
|
3149
|
+
*
|
|
3150
|
+
* Takes a numeric App Store id or a bundle id interchangeably. An id Apple
|
|
3151
|
+
* cannot resolve is a BILLED 404 - Apple charges for the empty result list.
|
|
3152
|
+
*
|
|
3153
|
+
* Costs 1 credit. Single response, no pagination.
|
|
3154
|
+
*/
|
|
3155
|
+
app(options: AppStoreAppOptions): Promise<Record<string, unknown>>;
|
|
3156
|
+
/**
|
|
3157
|
+
* A page of reviews: star rating, title, full text, author, and the APP
|
|
3158
|
+
* VERSION the review was written against.
|
|
3159
|
+
*
|
|
3160
|
+
* NUMERIC APP IDS ONLY here. Paged 1-10 at 50 reviews each and hard-stopped
|
|
3161
|
+
* at page 10 - 500 reviews per storefront is Apple's anonymous ceiling, so
|
|
3162
|
+
* ask a different `country` to reach further. This endpoint CANNOT 404: an
|
|
3163
|
+
* unknown id and a real app with zero reviews return the same empty feed.
|
|
3164
|
+
* Under sort "most_recent" the vote fields are zeroes.
|
|
3165
|
+
*
|
|
3166
|
+
* Costs 1 credit.
|
|
3167
|
+
*/
|
|
3168
|
+
reviews(options: AppStoreReviewsOptions): Promise<Record<string, unknown>>;
|
|
3169
|
+
}
|
|
3170
|
+
|
|
3171
|
+
interface GooglePlaySearchOptions {
|
|
3172
|
+
/** Search query (1-200 characters). */
|
|
3173
|
+
query: string;
|
|
3174
|
+
/**
|
|
3175
|
+
* Interface language (2-20 characters, default "en"). Changes the
|
|
3176
|
+
* STOREFRONT, not only the strings - title, description, install formatting
|
|
3177
|
+
* and content rating all move with it. Play falls back to English on values
|
|
3178
|
+
* it does not serve.
|
|
3179
|
+
*/
|
|
3180
|
+
hl?: string;
|
|
3181
|
+
/** Country code (2-10 characters, default "us"). */
|
|
3182
|
+
gl?: string;
|
|
3183
|
+
[key: string]: unknown;
|
|
3184
|
+
}
|
|
3185
|
+
interface GooglePlayAppOptions {
|
|
3186
|
+
/**
|
|
3187
|
+
* Android package name (com.spotify.music) or any play.google.com URL
|
|
3188
|
+
* carrying one in its id param. 1-500 characters.
|
|
3189
|
+
*/
|
|
3190
|
+
app_id: string;
|
|
3191
|
+
/**
|
|
3192
|
+
* Interface language (2-20 characters, default "en"). Changes the storefront
|
|
3193
|
+
* as well as the strings.
|
|
3194
|
+
*/
|
|
3195
|
+
hl?: string;
|
|
3196
|
+
/** Country code (2-10 characters, default "us"). */
|
|
3197
|
+
gl?: string;
|
|
3198
|
+
[key: string]: unknown;
|
|
3199
|
+
}
|
|
3200
|
+
interface GooglePlayReviewsOptions {
|
|
3201
|
+
/**
|
|
3202
|
+
* Android package name or any play.google.com URL carrying one in its id
|
|
3203
|
+
* param. 1-500 characters.
|
|
3204
|
+
*/
|
|
3205
|
+
app_id: string;
|
|
3206
|
+
/**
|
|
3207
|
+
* Review sort order (default "newest"). The cursor encodes this value, so
|
|
3208
|
+
* changing `sort` mid-pagination invalidates the cursor.
|
|
3209
|
+
*/
|
|
3210
|
+
sort?: "relevance" | "newest" | "rating";
|
|
3211
|
+
/**
|
|
3212
|
+
* Reviews per page, 1-200 (default 50). Capped at 200 on our side; Play
|
|
3213
|
+
* honours more, but a single page that large is megabytes for one call.
|
|
3214
|
+
*/
|
|
3215
|
+
count?: number;
|
|
3216
|
+
/**
|
|
3217
|
+
* next_cursor from a prior response (1-4000 characters). OPAQUE and
|
|
3218
|
+
* SINGLE-USE, and it encodes the sort as well as the position - send it back
|
|
3219
|
+
* with the SAME `sort` it came from. A cursor past the last review is a 404,
|
|
3220
|
+
* not an empty page.
|
|
3221
|
+
*/
|
|
3222
|
+
cursor?: string;
|
|
3223
|
+
/** Interface language (2-20 characters, default "en"). */
|
|
3224
|
+
hl?: string;
|
|
3225
|
+
/** Country code (2-10 characters, default "us"). */
|
|
3226
|
+
gl?: string;
|
|
3227
|
+
[key: string]: unknown;
|
|
3228
|
+
}
|
|
3229
|
+
declare class GooglePlayNamespace {
|
|
3230
|
+
private client;
|
|
3231
|
+
constructor(client: Scavio);
|
|
3232
|
+
/**
|
|
3233
|
+
* Ranked apps: package name, title, developer, rating, install count, price
|
|
3234
|
+
* and IAP range, content rating, icon and screenshots. A branded query
|
|
3235
|
+
* returns the hero card as result 1 projected to the same row shape, plus
|
|
3236
|
+
* Play's related-query rail.
|
|
3237
|
+
*
|
|
3238
|
+
* NO PAGINATION - one shelf of ~30 apps, with no page or cursor param.
|
|
3239
|
+
* `hl` moves the whole storefront, not just the language of the strings.
|
|
3240
|
+
*
|
|
3241
|
+
* Costs 2 credits.
|
|
3242
|
+
*/
|
|
3243
|
+
search(options: GooglePlaySearchOptions): Promise<Record<string, unknown>>;
|
|
3244
|
+
/**
|
|
3245
|
+
* Full store listing: installs including the REAL count Play publishes but
|
|
3246
|
+
* never renders, rating and star histogram, description, developer identity
|
|
3247
|
+
* and legal contact, price and IAPs, categories and gameplay tags,
|
|
3248
|
+
* screenshots and trailer, version and Android requirement, release and
|
|
3249
|
+
* update dates, changelog, full permission tree, Data safety table, the 20
|
|
3250
|
+
* server-rendered reviews, and the similar-apps and more-by-developer rails.
|
|
3251
|
+
*
|
|
3252
|
+
* Those 20 reviews ride along at no extra cost - use reviews() only to page
|
|
3253
|
+
* past them or to sort differently.
|
|
3254
|
+
*
|
|
3255
|
+
* Costs 2 credits. Single response, no pagination.
|
|
3256
|
+
*/
|
|
3257
|
+
app(options: GooglePlayAppOptions): Promise<Record<string, unknown>>;
|
|
3258
|
+
/**
|
|
3259
|
+
* A page of reviews: star score, full text, author, thumbs-up count,
|
|
3260
|
+
* developer reply, and the APP VERSION the reviewer was running.
|
|
3261
|
+
*
|
|
3262
|
+
* Paged with `cursor` -> next_cursor. The cursor is opaque and SINGLE-USE
|
|
3263
|
+
* and encodes the sort as well as the position, so send it back with the
|
|
3264
|
+
* same `sort` it came from; a cursor past the last review is a 404, not an
|
|
3265
|
+
* empty page. `count` is capped at 200. An empty payload here is a BILLED
|
|
3266
|
+
* 404 - the premium price is paid to learn the package has no reviews or
|
|
3267
|
+
* does not exist.
|
|
3268
|
+
*
|
|
3269
|
+
* Costs 2 credits.
|
|
3270
|
+
*/
|
|
3271
|
+
reviews(options: GooglePlayReviewsOptions): Promise<Record<string, unknown>>;
|
|
3272
|
+
}
|
|
3273
|
+
|
|
3274
|
+
interface G2SearchOptions {
|
|
3275
|
+
/** Search term (1-200 characters). Required unless `url` is given. */
|
|
3276
|
+
query?: string;
|
|
3277
|
+
/** Result page, 1-indexed. 20 per page unless `limit` says otherwise. */
|
|
3278
|
+
page?: number;
|
|
3279
|
+
/**
|
|
3280
|
+
* Results per page (1-100, default 20). Capped at 100 on our side so a
|
|
3281
|
+
* single request cannot ask for a multi-megabyte page on a 60s deadline;
|
|
3282
|
+
* G2 itself keeps paginating at any size.
|
|
3283
|
+
*/
|
|
3284
|
+
limit?: number;
|
|
3285
|
+
/** Result sort order (default "relevance"). */
|
|
3286
|
+
sort?: "relevance" | "popular" | "alphabetical" | "rating";
|
|
3287
|
+
/** Products at or above this star rating. */
|
|
3288
|
+
rating?: 1 | 2 | 3 | 4 | 5;
|
|
3289
|
+
/**
|
|
3290
|
+
* Full g2.com/search URL, as an alternative to `query`. The host is checked
|
|
3291
|
+
* by the transport.
|
|
3292
|
+
*/
|
|
3293
|
+
url?: string;
|
|
3294
|
+
[key: string]: unknown;
|
|
3295
|
+
}
|
|
3296
|
+
interface G2ProductOptions {
|
|
3297
|
+
/**
|
|
3298
|
+
* A G2 slug ("notion") or the numeric G2 id ("82623") AS A STRING - both
|
|
3299
|
+
* resolve on the same upstream path. Required unless `url` is given.
|
|
3300
|
+
*/
|
|
3301
|
+
product_id?: string;
|
|
3302
|
+
/** Full g2.com product URL, as an alternative to `product_id`. */
|
|
3303
|
+
url?: string;
|
|
3304
|
+
[key: string]: unknown;
|
|
3305
|
+
}
|
|
3306
|
+
interface G2ReviewsOptions {
|
|
3307
|
+
/**
|
|
3308
|
+
* A G2 slug ("notion") or the numeric G2 id ("82623") as a string.
|
|
3309
|
+
* Required unless `url` is given.
|
|
3310
|
+
*/
|
|
3311
|
+
product_id?: string;
|
|
3312
|
+
/** Full g2.com reviews URL, as an alternative to `product_id`. */
|
|
3313
|
+
url?: string;
|
|
3314
|
+
/** Result page, 1-indexed. Fixed at 10 reviews per page. */
|
|
3315
|
+
page?: number;
|
|
3316
|
+
/** Review sort order (default "relevance"). */
|
|
3317
|
+
sort?: "relevance" | "newest" | "most_helpful" | "rating_high" | "rating_low";
|
|
3318
|
+
/**
|
|
3319
|
+
* Star bucket. HALF-STAR-INCLUSIVE: 1 returns 0, 0.5 and 1-star reviews.
|
|
3320
|
+
*/
|
|
3321
|
+
rating?: 1 | 2 | 3 | 4 | 5;
|
|
3322
|
+
/** Reviewer's company size: SB <=50, MM 51-1000, Ent >1000. */
|
|
3323
|
+
company_size?: "small_business" | "mid_market" | "enterprise";
|
|
3324
|
+
/** Reviewer's role. */
|
|
3325
|
+
role?: "user" | "administrator" | "executive_sponsor" | "internal_consultant" | "consultant" | "agency" | "industry_analyst";
|
|
3326
|
+
/** Reviewer's region. */
|
|
3327
|
+
region?: "north_america" | "europe" | "asia" | "latin_america" | "anz" | "middle_east" | "africa";
|
|
3328
|
+
/**
|
|
3329
|
+
* Full-text search within the reviews (1-200 characters). Narrows the list
|
|
3330
|
+
* AND every facet count.
|
|
3331
|
+
*/
|
|
3332
|
+
query?: string;
|
|
3333
|
+
[key: string]: unknown;
|
|
3334
|
+
}
|
|
3335
|
+
declare class G2Namespace {
|
|
3336
|
+
private client;
|
|
3337
|
+
constructor(client: Scavio);
|
|
3338
|
+
/**
|
|
3339
|
+
* Ranked B2B software products on G2: star rating, review count, vendor,
|
|
3340
|
+
* categories, seller description and logo. Every row carries `product_id`
|
|
3341
|
+
* and `slug` to feed product() and reviews().
|
|
3342
|
+
*
|
|
3343
|
+
* Paged with `page` and `limit` (1-100, default 20). `total_results` is
|
|
3344
|
+
* G2's Products-tab headline and is CAPPED AT 10000, so treat a 10000 as a
|
|
3345
|
+
* floor rather than a count; `total_by_type` breaks the same query across
|
|
3346
|
+
* products, sellers, categories and discussions.
|
|
3347
|
+
*
|
|
3348
|
+
* Pass `query` or `url`.
|
|
3349
|
+
*
|
|
3350
|
+
* Costs 5 credits.
|
|
3351
|
+
*/
|
|
3352
|
+
search(options: G2SearchOptions): Promise<Record<string, unknown>>;
|
|
3353
|
+
/**
|
|
3354
|
+
* A full G2 software profile: rating with per-star histogram, review count,
|
|
3355
|
+
* vendor, description and seller website, pricing editions with parsed
|
|
3356
|
+
* amounts, feature groups, categories and breadcrumbs, supported languages,
|
|
3357
|
+
* integrations, alternatives, head-to-head comparisons, media, community
|
|
3358
|
+
* discussions and G2's AI-derived pros and cons.
|
|
3359
|
+
*
|
|
3360
|
+
* CARRIES NO REVIEW TEXT. G2 loads review bodies in a separate frame, so
|
|
3361
|
+
* this endpoint returns none at all - call reviews() for text.
|
|
3362
|
+
*
|
|
3363
|
+
* Pass `product_id` (slug or numeric id as a string) or `url`.
|
|
3364
|
+
*
|
|
3365
|
+
* Costs 5 credits. Single response, no pagination.
|
|
3366
|
+
*/
|
|
3367
|
+
product(options: G2ProductOptions): Promise<Record<string, unknown>>;
|
|
3368
|
+
/**
|
|
3369
|
+
* A page of G2 reviews: rating, title, likes and dislikes, problems solved,
|
|
3370
|
+
* reviewer job title, industry and company size, validated and incentivized
|
|
3371
|
+
* flags - PLUS what the profile page has no form of: exact per-star counts,
|
|
3372
|
+
* pros and cons with per-theme counts, and company-size / role / industry /
|
|
3373
|
+
* region / category facets with counts.
|
|
3374
|
+
*
|
|
3375
|
+
* Fixed at 10 reviews per page; advance with `page`. This paginates well
|
|
3376
|
+
* past the 10 pages G2's own widget links to.
|
|
3377
|
+
*
|
|
3378
|
+
* `rating` buckets are HALF-STAR-INCLUSIVE (1 returns 0, 0.5 and 1-star).
|
|
3379
|
+
* Every filter is a closed enum because an unrecognised value matches
|
|
3380
|
+
* nothing upstream and comes back as an empty, plausible-looking result set.
|
|
3381
|
+
*
|
|
3382
|
+
* Pass `product_id` or `url`.
|
|
3383
|
+
*
|
|
3384
|
+
* Costs 5 credits.
|
|
3385
|
+
*/
|
|
3386
|
+
reviews(options: G2ReviewsOptions): Promise<Record<string, unknown>>;
|
|
3387
|
+
}
|
|
3388
|
+
|
|
3389
|
+
interface CapterraSearchOptions {
|
|
3390
|
+
/**
|
|
3391
|
+
* Search term (1-200 characters). Required unless `url` is given: a
|
|
3392
|
+
* term-less search serves a fixed popular-products list that has nothing to
|
|
3393
|
+
* do with the caller.
|
|
3394
|
+
*/
|
|
3395
|
+
query?: string;
|
|
3396
|
+
/**
|
|
3397
|
+
* Full capterra.com search URL, as an alternative to `query`. The host is
|
|
3398
|
+
* checked by the transport, which also covers capterra.co.uk and
|
|
3399
|
+
* capterra.com.br.
|
|
3400
|
+
*/
|
|
3401
|
+
url?: string;
|
|
3402
|
+
[key: string]: unknown;
|
|
3403
|
+
}
|
|
3404
|
+
interface CapterraProductOptions {
|
|
3405
|
+
/**
|
|
3406
|
+
* The number in /p/186596/Notion/, AS A STRING - a JSON number is rejected.
|
|
3407
|
+
* Required unless `url` is given.
|
|
3408
|
+
*/
|
|
3409
|
+
product_id?: string;
|
|
3410
|
+
/** Product slug. COSMETIC on this endpoint - any value returns the same profile. */
|
|
3411
|
+
slug?: string;
|
|
3412
|
+
/** Full capterra.com product URL, as an alternative to `product_id`. */
|
|
3413
|
+
url?: string;
|
|
3414
|
+
[key: string]: unknown;
|
|
3415
|
+
}
|
|
3416
|
+
interface CapterraReviewsOptions {
|
|
3417
|
+
/**
|
|
3418
|
+
* The number in /p/186596/Notion/, as a string. Required unless `url` is
|
|
3419
|
+
* given.
|
|
3420
|
+
*/
|
|
3421
|
+
product_id?: string;
|
|
3422
|
+
/**
|
|
3423
|
+
* Product slug. LOAD-BEARING here, unlike on product(): it is case-sensitive
|
|
3424
|
+
* upstream and a wrong one silently serves PAGE ONE under a billed 200.
|
|
3425
|
+
* Pass back the slug from search() or product().
|
|
3426
|
+
*/
|
|
3427
|
+
slug?: string;
|
|
3428
|
+
/**
|
|
3429
|
+
* Full capterra.com reviews URL. Passing back `reviews_url` from product()
|
|
3430
|
+
* is the reliable way to page.
|
|
3431
|
+
*/
|
|
3432
|
+
url?: string;
|
|
3433
|
+
/**
|
|
3434
|
+
* Result page, 1-100. 25 reviews per page. There is no page past 100
|
|
3435
|
+
* whatever the review count says.
|
|
3436
|
+
*/
|
|
3437
|
+
page?: number;
|
|
3438
|
+
[key: string]: unknown;
|
|
3439
|
+
}
|
|
3440
|
+
declare class CapterraNamespace {
|
|
3441
|
+
private client;
|
|
3442
|
+
constructor(client: Scavio);
|
|
3443
|
+
/**
|
|
3444
|
+
* 20 ranked Capterra software products: name, vendor description, rating,
|
|
3445
|
+
* review count, logo and the paid-placement flag. Every row carries
|
|
3446
|
+
* `product_id` and `slug` to feed product() and reviews().
|
|
3447
|
+
*
|
|
3448
|
+
* NO PAGINATION. Capterra fixes the result set at 20 and page 2 returns the
|
|
3449
|
+
* identical rows, so there is deliberately no page param - narrow the query
|
|
3450
|
+
* instead.
|
|
3451
|
+
*
|
|
3452
|
+
* Pass `query` or `url`.
|
|
3453
|
+
*
|
|
3454
|
+
* Costs 2 credits.
|
|
3455
|
+
*/
|
|
3456
|
+
search(options: CapterraSearchOptions): Promise<Record<string, unknown>>;
|
|
3457
|
+
/**
|
|
3458
|
+
* A full Capterra profile: rating with per-star histogram and the four
|
|
3459
|
+
* scored criteria, likelihood to recommend, review sentiment and topics, the
|
|
3460
|
+
* complete pricing table with every plan and its features, every rated
|
|
3461
|
+
* feature, every integration, AI-derived pros and cons with the quoted
|
|
3462
|
+
* review, FAQs, screenshots, badges and awards, competitor comparisons and
|
|
3463
|
+
* alternatives, and the buyer profile by company size / industry / job
|
|
3464
|
+
* function - PLUS the 25 most recent reviews, which ride along at no extra
|
|
3465
|
+
* cost.
|
|
3466
|
+
*
|
|
3467
|
+
* `vendor` IS ALWAYS NULL here: Capterra does not publish it as structured
|
|
3468
|
+
* data on the product page. The reviews name the vendor per review.
|
|
3469
|
+
*
|
|
3470
|
+
* Pass `product_id` (a string) or `url`. `slug` is cosmetic on this
|
|
3471
|
+
* endpoint.
|
|
3472
|
+
*
|
|
3473
|
+
* Costs 2 credits. Single response, no pagination.
|
|
3474
|
+
*/
|
|
3475
|
+
product(options: CapterraProductOptions): Promise<Record<string, unknown>>;
|
|
3476
|
+
/**
|
|
3477
|
+
* A page of Capterra reviews: overall score plus five per-criterion scores,
|
|
3478
|
+
* title, pros, cons, advice, usage duration, incentivized flag, alternatives
|
|
3479
|
+
* considered and what the reviewer switched from, reviewer job title /
|
|
3480
|
+
* industry / company size, and the vendor response - plus a richer
|
|
3481
|
+
* competitor list than the profile carries, each alternative with its own
|
|
3482
|
+
* rating histogram and starting price.
|
|
3483
|
+
*
|
|
3484
|
+
* 25 reviews per page, CAPPED AT PAGE 100. Past it Capterra answers 200 with
|
|
3485
|
+
* PAGE ONE and the page quietly dropped from the canonical, so nothing
|
|
3486
|
+
* signals the cap but repeated rows. Page 1 is already inside product(), so
|
|
3487
|
+
* use this to page past it.
|
|
3488
|
+
*
|
|
3489
|
+
* Pass `product_id` or `url`. `slug` is load-bearing here and case-sensitive
|
|
3490
|
+
* upstream - a wrong one silently serves page one.
|
|
3491
|
+
*
|
|
3492
|
+
* Costs 2 credits.
|
|
3493
|
+
*/
|
|
3494
|
+
reviews(options: CapterraReviewsOptions): Promise<Record<string, unknown>>;
|
|
3495
|
+
}
|
|
3496
|
+
|
|
3497
|
+
interface SECLookupOptions {
|
|
3498
|
+
/** Ticker, company name, or a fragment (1-200 characters). */
|
|
3499
|
+
query: string;
|
|
3500
|
+
/**
|
|
3501
|
+
* How many matches to return, 1-100 (default 10). This SIZES the response,
|
|
3502
|
+
* it is not a page param - there is no pagination here.
|
|
3503
|
+
*/
|
|
3504
|
+
limit?: number;
|
|
3505
|
+
/**
|
|
3506
|
+
* Restrict to one listing exchange. Matched case-insensitively. Filers
|
|
3507
|
+
* listed with NO exchange are excluded by ANY value.
|
|
3508
|
+
*/
|
|
3509
|
+
exchange?: "NASDAQ" | "NYSE" | "OTC" | "CBOE";
|
|
3510
|
+
[key: string]: unknown;
|
|
3511
|
+
}
|
|
3512
|
+
interface SECCompanyOptions {
|
|
3513
|
+
/**
|
|
3514
|
+
* CIK in any spelling: 320193, 0000320193 or CIK0000320193. A ticker is
|
|
3515
|
+
* accepted here too. Either `cik` or `ticker` is required.
|
|
3516
|
+
*/
|
|
3517
|
+
cik?: string;
|
|
3518
|
+
/**
|
|
3519
|
+
* Ticker, dotted or dashed (BRK.B / BRK-B). WINS over `cik` when both are
|
|
3520
|
+
* given. Either `cik` or `ticker` is required.
|
|
3521
|
+
*/
|
|
3522
|
+
ticker?: string;
|
|
3523
|
+
[key: string]: unknown;
|
|
3524
|
+
}
|
|
3525
|
+
interface SECFilingsOptions {
|
|
3526
|
+
/**
|
|
3527
|
+
* CIK in any spelling; a ticker is accepted here too. Either `cik` or
|
|
3528
|
+
* `ticker` is required.
|
|
3529
|
+
*/
|
|
3530
|
+
cik?: string;
|
|
3531
|
+
/**
|
|
3532
|
+
* Ticker, dotted or dashed. WINS over `cik` when both are given. Either
|
|
3533
|
+
* `cik` or `ticker` is required.
|
|
3534
|
+
*/
|
|
3535
|
+
ticker?: string;
|
|
3536
|
+
/**
|
|
3537
|
+
* Form filter: "10-K", ["10-K", "10-Q"] or "10-K,8-K". Matched against the
|
|
3538
|
+
* form AND its root form, so "10-K" also returns 10-K/A amendments - ask
|
|
3539
|
+
* for "10-K/A" to get only amendments. Up to 25 forms.
|
|
3540
|
+
*/
|
|
3541
|
+
form?: string | string[];
|
|
3542
|
+
/** Earliest filing date, YYYY-MM-DD. */
|
|
3543
|
+
date_from?: string;
|
|
3544
|
+
/** Latest filing date, YYYY-MM-DD. */
|
|
3545
|
+
date_to?: string;
|
|
3546
|
+
/** Result page, 1-indexed. */
|
|
3547
|
+
page?: number;
|
|
3548
|
+
/** Filings per page, 1-500 (default 50). */
|
|
3549
|
+
limit?: number;
|
|
3550
|
+
/**
|
|
3551
|
+
* Reach past EDGAR's "recent" block into up to 10 archived shards. Still
|
|
3552
|
+
* ONE credit. `history_truncated` in the response flags a filer that had
|
|
3553
|
+
* more shards than the cap.
|
|
3554
|
+
*/
|
|
3555
|
+
include_history?: boolean;
|
|
3556
|
+
[key: string]: unknown;
|
|
3557
|
+
}
|
|
3558
|
+
interface SECConceptOptions {
|
|
3559
|
+
/**
|
|
3560
|
+
* CIK in any spelling; a ticker is accepted here too. Either `cik` or
|
|
3561
|
+
* `ticker` is required.
|
|
3562
|
+
*/
|
|
3563
|
+
cik?: string;
|
|
3564
|
+
/**
|
|
3565
|
+
* Ticker, dotted or dashed. WINS over `cik` when both are given. Either
|
|
3566
|
+
* `cik` or `ticker` is required.
|
|
3567
|
+
*/
|
|
3568
|
+
ticker?: string;
|
|
3569
|
+
/**
|
|
3570
|
+
* XBRL tag, e.g. "NetIncomeLoss" (1-120 characters, letters then
|
|
3571
|
+
* alphanumerics). CASE-SENSITIVE - "netincomeloss" is a 404 upstream, not a
|
|
3572
|
+
* match. Use facts() to discover the tags a filer actually reports.
|
|
3573
|
+
*/
|
|
3574
|
+
concept: string;
|
|
3575
|
+
/** Taxonomy: us-gaap, dei, ifrs-full, srt (default "us-gaap"). */
|
|
3576
|
+
taxonomy?: string;
|
|
3577
|
+
/** Unit filter, e.g. "USD" vs "USD/shares". */
|
|
3578
|
+
unit?: string;
|
|
3579
|
+
/**
|
|
3580
|
+
* Form filter. EXACT match here, so "10-K" EXCLUDES 10-K/A - the opposite
|
|
3581
|
+
* of filings().
|
|
3582
|
+
*/
|
|
3583
|
+
form?: string;
|
|
3584
|
+
/**
|
|
3585
|
+
* How many values to return, 1-2000 (default 250). This SIZES the response,
|
|
3586
|
+
* it is not a page param.
|
|
3587
|
+
*/
|
|
3588
|
+
limit?: number;
|
|
3589
|
+
[key: string]: unknown;
|
|
3590
|
+
}
|
|
3591
|
+
interface SECFactsOptions {
|
|
3592
|
+
/**
|
|
3593
|
+
* CIK in any spelling; a ticker is accepted here too. Either `cik` or
|
|
3594
|
+
* `ticker` is required.
|
|
3595
|
+
*/
|
|
3596
|
+
cik?: string;
|
|
3597
|
+
/**
|
|
3598
|
+
* Ticker, dotted or dashed. WINS over `cik` when both are given. Either
|
|
3599
|
+
* `cik` or `ticker` is required.
|
|
3600
|
+
*/
|
|
3601
|
+
ticker?: string;
|
|
3602
|
+
/** Restrict to one taxonomy, e.g. "us-gaap" or "dei". */
|
|
3603
|
+
taxonomy?: string;
|
|
3604
|
+
/**
|
|
3605
|
+
* Case-insensitive substring matched against the tag name and its label
|
|
3606
|
+
* (1-200 characters).
|
|
3607
|
+
*/
|
|
3608
|
+
query?: string;
|
|
3609
|
+
/**
|
|
3610
|
+
* How many concepts to return, 1-2000 (default 250). This SIZES the
|
|
3611
|
+
* response, it is not a page param.
|
|
3612
|
+
*/
|
|
3613
|
+
limit?: number;
|
|
3614
|
+
[key: string]: unknown;
|
|
3615
|
+
}
|
|
3616
|
+
interface SECSearchOptions {
|
|
3617
|
+
/**
|
|
3618
|
+
* Full-text query (1-500 characters). A quoted phrase is an exact match;
|
|
3619
|
+
* bare words are a bag of terms. OPTIONAL - a cik, ticker, form or date
|
|
3620
|
+
* filter on its own is a valid search.
|
|
3621
|
+
*/
|
|
3622
|
+
query?: string;
|
|
3623
|
+
/** One CIK or up to 25. Tickers are accepted here too. */
|
|
3624
|
+
cik?: string | string[];
|
|
3625
|
+
/** One ticker or up to 25. */
|
|
3626
|
+
ticker?: string | string[];
|
|
3627
|
+
/** One form or up to 25, e.g. "8-K" or ["10-K", "10-Q"]. */
|
|
3628
|
+
form?: string | string[];
|
|
3629
|
+
/** Earliest filing date, YYYY-MM-DD. Coverage starts in 2001. */
|
|
3630
|
+
date_from?: string;
|
|
3631
|
+
/** Latest filing date, YYYY-MM-DD. */
|
|
3632
|
+
date_to?: string;
|
|
3633
|
+
/**
|
|
3634
|
+
* EDGAR's own two-character location codes - "CA", "NY", and alphanumeric
|
|
3635
|
+
* codes for foreign jurisdictions. One or up to 25.
|
|
3636
|
+
*/
|
|
3637
|
+
location?: string | string[];
|
|
3638
|
+
/** Result order (default "relevance"). */
|
|
3639
|
+
sort?: "relevance" | "newest" | "oldest";
|
|
3640
|
+
/**
|
|
3641
|
+
* Result page, 1-indexed, CAPPED AT 100. 100 documents per page - the index
|
|
3642
|
+
* refuses a result window past 10,000.
|
|
3643
|
+
*/
|
|
3644
|
+
page?: number;
|
|
3645
|
+
[key: string]: unknown;
|
|
3646
|
+
}
|
|
3647
|
+
declare class SECNamespace {
|
|
3648
|
+
private client;
|
|
3649
|
+
constructor(client: Scavio);
|
|
3650
|
+
/**
|
|
3651
|
+
* START HERE. Resolves a company name or ticker to the CIK every other SEC
|
|
3652
|
+
* EDGAR endpoint is keyed by: matching filers with symbol, listing
|
|
3653
|
+
* exchange, and ready-made submissions / company-facts / EDGAR URLs, tiered
|
|
3654
|
+
* by match quality (each row carries its tier as `match`).
|
|
3655
|
+
*
|
|
3656
|
+
* `limit` sizes the response; there is no pagination. `exchange` is a
|
|
3657
|
+
* closed set matched case-insensitively, and filers listed with no exchange
|
|
3658
|
+
* are excluded by ANY value.
|
|
3659
|
+
*
|
|
3660
|
+
* Costs 1 credit.
|
|
3661
|
+
*/
|
|
3662
|
+
lookup(options: SECLookupOptions): Promise<Record<string, unknown>>;
|
|
3663
|
+
/**
|
|
3664
|
+
* Filer profile: legal and former names, SIC industry, filer category, EIN,
|
|
3665
|
+
* LEI, state of incorporation, fiscal year end, business and mailing
|
|
3666
|
+
* addresses, every ticker with its exchange, which forms it files and how
|
|
3667
|
+
* often, plus a preview of its 10 most recent filings.
|
|
3668
|
+
*
|
|
3669
|
+
* Either `cik` or `ticker` is required; `ticker` wins when both are given.
|
|
3670
|
+
*
|
|
3671
|
+
* Costs 1 credit. Single response, no pagination.
|
|
3672
|
+
*/
|
|
3673
|
+
company(options: SECCompanyOptions): Promise<Record<string, unknown>>;
|
|
3674
|
+
/**
|
|
3675
|
+
* A page of one filer's filings: accession number, form and root form,
|
|
3676
|
+
* filing and period dates, 8-K item codes, and direct links to the primary
|
|
3677
|
+
* document, filing index and attachment directory.
|
|
3678
|
+
*
|
|
3679
|
+
* Either `cik` or `ticker` is required. Paged with `page` + `limit`.
|
|
3680
|
+
* `form` matches the form AND its root form, so "10-K" also returns 10-K/A.
|
|
3681
|
+
* EDGAR's "recent" block is not a fixed window - a decade for a quiet
|
|
3682
|
+
* filer, about a year for a prolific one; `include_history` reaches back
|
|
3683
|
+
* through up to 10 archived shards and sets `history_truncated` when the
|
|
3684
|
+
* filer had more.
|
|
3685
|
+
*
|
|
3686
|
+
* Costs 1 credit - including with `include_history`, which is the one call
|
|
3687
|
+
* that can buy more than one upstream fetch.
|
|
3688
|
+
*/
|
|
3689
|
+
filings(options: SECFilingsOptions): Promise<Record<string, unknown>>;
|
|
3690
|
+
/**
|
|
3691
|
+
* Every value a filer reported for one XBRL concept, newest period first,
|
|
3692
|
+
* with the form and filing each number came from. Restatements are KEPT,
|
|
3693
|
+
* not collapsed; `latest` disambiguates a quarter from its year-to-date
|
|
3694
|
+
* twin using the SEC's comparability flag.
|
|
3695
|
+
*
|
|
3696
|
+
* Either `cik` or `ticker` is required. The `concept` tag is CASE-SENSITIVE
|
|
3697
|
+
* - "netincomeloss" is a 404 upstream, not a match; call facts() to find
|
|
3698
|
+
* the real tag. `form` is an EXACT match here, so "10-K" excludes 10-K/A.
|
|
3699
|
+
* `limit` sizes the response; there is no pagination.
|
|
3700
|
+
*
|
|
3701
|
+
* Costs 1 credit.
|
|
3702
|
+
*/
|
|
3703
|
+
concept(options: SECConceptOptions): Promise<Record<string, unknown>>;
|
|
3704
|
+
/**
|
|
3705
|
+
* The index of every XBRL concept a filer reports - tag, label,
|
|
3706
|
+
* description, units and most recent value - across us-gaap, dei and any
|
|
3707
|
+
* other taxonomy it uses. This is how you find what to ask concept() for.
|
|
3708
|
+
*
|
|
3709
|
+
* Either `cik` or `ticker` is required. `limit` sizes the response; there
|
|
3710
|
+
* is no pagination.
|
|
3711
|
+
*
|
|
3712
|
+
* Costs 1 credit.
|
|
3713
|
+
*/
|
|
3714
|
+
facts(options: SECFactsOptions): Promise<Record<string, unknown>>;
|
|
3715
|
+
/**
|
|
3716
|
+
* EDGAR full-text search: each hit is the matching DOCUMENT with its URL,
|
|
3717
|
+
* form, filing date and filer identity, plus facets breaking the whole
|
|
3718
|
+
* result set down by company, form, industry and state.
|
|
3719
|
+
*
|
|
3720
|
+
* Coverage STARTS IN 2001 - nothing earlier is indexed. Accepts NO query at
|
|
3721
|
+
* all: a cik, ticker, form or date filter on its own is a valid search.
|
|
3722
|
+
* Paged with `page`, capped at 100 (100 documents per page) because the
|
|
3723
|
+
* index refuses a result window past 10,000.
|
|
3724
|
+
*
|
|
3725
|
+
* Costs 1 credit.
|
|
3726
|
+
*/
|
|
3727
|
+
search(options: SECSearchOptions): Promise<Record<string, unknown>>;
|
|
3728
|
+
}
|
|
3729
|
+
|
|
3730
|
+
interface CompaniesHouseSearchOptions {
|
|
3731
|
+
/** Company name or fragment (1-200 characters, non-blank). */
|
|
3732
|
+
query: string;
|
|
3733
|
+
/**
|
|
3734
|
+
* Result page, 1-indexed (default 1). 20 results per page, CAPPED AT 50 -
|
|
3735
|
+
* the register only serves the first 1000 matches for a term.
|
|
3736
|
+
*/
|
|
3737
|
+
page?: number;
|
|
3738
|
+
[key: string]: unknown;
|
|
3739
|
+
}
|
|
3740
|
+
interface CompaniesHouseCompanyOptions {
|
|
3741
|
+
/**
|
|
3742
|
+
* UK company number, 1-20 characters, e.g. "00445790" or "SC090312". Loose
|
|
3743
|
+
* on purpose - it is zero-padded and upper-cased for you, so "445790" and
|
|
3744
|
+
* "sc090312" both work. Prefixes: SC, NI, OC/SO/NC, FC, BR, CE.
|
|
3745
|
+
*/
|
|
3746
|
+
company_number: string;
|
|
3747
|
+
[key: string]: unknown;
|
|
3748
|
+
}
|
|
3749
|
+
interface CompaniesHouseOfficersOptions {
|
|
3750
|
+
/**
|
|
3751
|
+
* UK company number, zero-padded and upper-cased for you.
|
|
3752
|
+
*/
|
|
3753
|
+
company_number: string;
|
|
3754
|
+
/**
|
|
3755
|
+
* Result page, 1-indexed (default 1). 35 officers per page, no upper bound
|
|
3756
|
+
* - past the last page the register answers 200 with an empty list.
|
|
3757
|
+
*/
|
|
3758
|
+
page?: number;
|
|
3759
|
+
[key: string]: unknown;
|
|
3760
|
+
}
|
|
3761
|
+
interface CompaniesHouseFilingHistoryOptions {
|
|
3762
|
+
/**
|
|
3763
|
+
* UK company number, zero-padded and upper-cased for you.
|
|
3764
|
+
*/
|
|
3765
|
+
company_number: string;
|
|
3766
|
+
/**
|
|
3767
|
+
* Result page, 1-indexed (default 1). No upper bound - past the last page
|
|
3768
|
+
* the register answers 200 with an empty list.
|
|
3769
|
+
*/
|
|
3770
|
+
page?: number;
|
|
3771
|
+
[key: string]: unknown;
|
|
3772
|
+
}
|
|
3773
|
+
declare class CompaniesHouseNamespace {
|
|
3774
|
+
private client;
|
|
3775
|
+
constructor(client: Scavio);
|
|
3776
|
+
/**
|
|
3777
|
+
* START HERE. Searches the UK register by name and returns the
|
|
3778
|
+
* `company_number` every other endpoint is keyed by, plus name, status,
|
|
3779
|
+
* incorporation or dissolution date, registered office address and matched
|
|
3780
|
+
* former names.
|
|
3781
|
+
*
|
|
3782
|
+
* Matches CURRENT AND FORMER names. Paged with `page`, 20 results per page,
|
|
3783
|
+
* CAPPED AT PAGE 50 - the register serves a 1000-result window per term
|
|
3784
|
+
* whatever hit count it prints, and answers page 51 with HTTP 416.
|
|
3785
|
+
*
|
|
3786
|
+
* Costs 1 credit.
|
|
3787
|
+
*/
|
|
3788
|
+
search(options: CompaniesHouseSearchOptions): Promise<Record<string, unknown>>;
|
|
3789
|
+
/**
|
|
3790
|
+
* Full register entry: status, type, incorporation and dissolution dates,
|
|
3791
|
+
* registered office, SIC codes, previous names, accounts and
|
|
3792
|
+
* confirmation-statement due dates with overdue flags, and whether it has
|
|
3793
|
+
* charges, insolvency history, officers or UK establishments. FC companies
|
|
3794
|
+
* return home registry / legal form / governing law, BR returns the parent,
|
|
3795
|
+
* CE returns the charity number.
|
|
3796
|
+
*
|
|
3797
|
+
* `company_number` is zero-padded and upper-cased for you, so a number off
|
|
3798
|
+
* a letterhead or out of a spreadsheet that ate its leading zeros still
|
|
3799
|
+
* resolves.
|
|
3800
|
+
*
|
|
3801
|
+
* Costs 1 credit. Single response, no pagination.
|
|
3802
|
+
*/
|
|
3803
|
+
company(options: CompaniesHouseCompanyOptions): Promise<Record<string, unknown>>;
|
|
3804
|
+
/**
|
|
3805
|
+
* Officers current and resigned: name, role, appointment and resignation
|
|
3806
|
+
* dates, correspondence address, nationality, country of residence,
|
|
3807
|
+
* month-and-year date of birth, and identity-verification status.
|
|
3808
|
+
*
|
|
3809
|
+
* Paged with `page`, 35 officers per page, NO upper bound - past the last
|
|
3810
|
+
* page the register answers an ordinary 200 with an empty list, identical
|
|
3811
|
+
* to a company with no officers.
|
|
3812
|
+
*
|
|
3813
|
+
* `officers_count` is EVERY appointment ever made and `resignations_count`
|
|
3814
|
+
* how many ended, so the active count is the difference. There is no
|
|
3815
|
+
* server-side active/resigned filter - filter on each officer's `status` in
|
|
3816
|
+
* the response.
|
|
3817
|
+
*
|
|
3818
|
+
* Costs 1 credit.
|
|
3819
|
+
*/
|
|
3820
|
+
officers(options: CompaniesHouseOfficersOptions): Promise<Record<string, unknown>>;
|
|
3821
|
+
/**
|
|
3822
|
+
* Filings, most recent first: date, filing type code (AA, CS01, SH03),
|
|
3823
|
+
* description, register annotations and child documents, and a link to the
|
|
3824
|
+
* filed PDF with its page count.
|
|
3825
|
+
*
|
|
3826
|
+
* A filing the register has not finished processing carries a
|
|
3827
|
+
* `processing_note` instead of a document.
|
|
3828
|
+
*
|
|
3829
|
+
* Paged with `page`, NO upper bound - past the last page it is an ordinary
|
|
3830
|
+
* 200 with an empty list.
|
|
3831
|
+
*
|
|
3832
|
+
* Costs 1 credit.
|
|
3833
|
+
*/
|
|
3834
|
+
filingHistory(options: CompaniesHouseFilingHistoryOptions): Promise<Record<string, unknown>>;
|
|
3835
|
+
}
|
|
3836
|
+
|
|
3837
|
+
interface GoogleAdsAdvertisersOptions {
|
|
3838
|
+
/** Brand name or domain to resolve (1-200 characters). */
|
|
3839
|
+
query: string;
|
|
3840
|
+
/**
|
|
3841
|
+
* ISO alpha-2 country (US, GB, DE) or a Google geo criteria id as a string.
|
|
3842
|
+
* DEFAULTS TO THE UNITED STATES, not worldwide - the lookup runs against one
|
|
3843
|
+
* country's index at a time, so an advertiser who runs no US ads comes back as
|
|
3844
|
+
* an empty list. Set it to a country the advertiser actually advertises in.
|
|
3845
|
+
*/
|
|
3846
|
+
region?: string;
|
|
3847
|
+
/**
|
|
3848
|
+
* Rows per arm (1-20, default 10). Advertisers and domains are capped
|
|
3849
|
+
* SEPARATELY, so a name query can return up to twice this many rows.
|
|
3850
|
+
*/
|
|
3851
|
+
limit?: number;
|
|
3852
|
+
[key: string]: unknown;
|
|
3853
|
+
}
|
|
3854
|
+
interface GoogleAdsSearchOptions {
|
|
3855
|
+
/**
|
|
3856
|
+
* Bare host, www host or full URL; reduced to the registrable host. THE ONLY
|
|
3857
|
+
* WAY to get the `domain` field back on each row. Required unless
|
|
3858
|
+
* `advertiser_id` is given.
|
|
3859
|
+
*/
|
|
3860
|
+
domain?: string;
|
|
3861
|
+
/**
|
|
3862
|
+
* Google advertiser id, e.g. "AR16735076323512287233". The shape is checked
|
|
3863
|
+
* before any request is made, so a typo costs nothing. Required unless
|
|
3864
|
+
* `domain` is given.
|
|
3865
|
+
*/
|
|
3866
|
+
advertiser_id?: string;
|
|
3867
|
+
/**
|
|
3868
|
+
* ISO alpha-2 country (US, GB, DE) or a Google geo criteria id as a string.
|
|
3869
|
+
* Scopes the deep links on every row - the same advertiser can share ZERO
|
|
3870
|
+
* creatives between two countries. Default: worldwide.
|
|
3871
|
+
*/
|
|
3872
|
+
region?: string;
|
|
3873
|
+
/** Creative format. The three sets are DISJOINT. Default: all formats. */
|
|
3874
|
+
format?: "text" | "image" | "video";
|
|
3875
|
+
/** Google surface the ad ran on. Default: all surfaces. */
|
|
3876
|
+
platform?: "play" | "maps" | "search" | "shopping" | "youtube";
|
|
3877
|
+
/** Ad topic (default "all"). */
|
|
3878
|
+
topic?: "all" | "political";
|
|
3879
|
+
/**
|
|
3880
|
+
* Rows per page (1-100, default 40). 100 is a HARD UPSTREAM CEILING, not our
|
|
3881
|
+
* policy: Google answers a larger request with ZERO rows rather than an
|
|
3882
|
+
* error.
|
|
3883
|
+
*/
|
|
3884
|
+
limit?: number;
|
|
3885
|
+
/**
|
|
3886
|
+
* `next_cursor` from the previous response (1-4000 characters). Re-send the
|
|
3887
|
+
* SAME filters alongside it. Null once the advertiser is exhausted.
|
|
3888
|
+
*/
|
|
3889
|
+
cursor?: string;
|
|
3890
|
+
[key: string]: unknown;
|
|
3891
|
+
}
|
|
3892
|
+
interface GoogleAdsCreativeOptions {
|
|
3893
|
+
/** Google advertiser id, e.g. "AR16735076323512287233". */
|
|
3894
|
+
advertiser_id: string;
|
|
3895
|
+
/**
|
|
3896
|
+
* Creative id. MUST belong to the `advertiser_id` sent with it - the lookup
|
|
3897
|
+
* is keyed by the pair and a mismatch is a 404.
|
|
3898
|
+
*/
|
|
3899
|
+
creative_id: string;
|
|
3900
|
+
[key: string]: unknown;
|
|
3901
|
+
}
|
|
3902
|
+
declare class GoogleAdsNamespace {
|
|
3903
|
+
private client;
|
|
3904
|
+
constructor(client: Scavio);
|
|
3905
|
+
/**
|
|
3906
|
+
* START HERE. Resolves a brand name or a domain to the `advertiser_id` that
|
|
3907
|
+
* search() and creative() are keyed by.
|
|
3908
|
+
*
|
|
3909
|
+
* Returns two row kinds in one list: `advertiser` rows carry the id, the
|
|
3910
|
+
* verified name, the verification country and the total ad count AS A RANGE
|
|
3911
|
+
* (total_ads_min / total_ads_max - Google never publishes an exact figure);
|
|
3912
|
+
* `domain` rows carry a website. A name query returns both kinds, a
|
|
3913
|
+
* domain-shaped query returns domains only.
|
|
3914
|
+
*
|
|
3915
|
+
* NO PAGINATION - this is an autocomplete, roughly 20 rows per arm, and
|
|
3916
|
+
* `limit` caps each arm separately.
|
|
3917
|
+
*
|
|
3918
|
+
* Costs 1 credit.
|
|
3919
|
+
*/
|
|
3920
|
+
advertisers(options: GoogleAdsAdvertisersOptions): Promise<Record<string, unknown>>;
|
|
3921
|
+
/**
|
|
3922
|
+
* Every ad Google is running for one advertiser: the creative (archived
|
|
3923
|
+
* image, rich-media bundle, Google's renderer link, dimensions), advertiser
|
|
3924
|
+
* id and name, format, first and last seen dates, days actually run, plus
|
|
3925
|
+
* total_ads_min / total_ads_max.
|
|
3926
|
+
*
|
|
3927
|
+
* Cursor-paginated: read `next_cursor` off the response and send it back as
|
|
3928
|
+
* `cursor` WITH THE SAME FILTERS, up to 100 rows per page. `next_cursor` is
|
|
3929
|
+
* null once exhausted. A `limit` above 100 is not an error - Google answers
|
|
3930
|
+
* it with ZERO rows.
|
|
3931
|
+
*
|
|
3932
|
+
* The three `format` sets are disjoint, and `domain` is dropped from every
|
|
3933
|
+
* row when the query is by `advertiser_id`, so query by domain if you need
|
|
3934
|
+
* that field. The headline total is a RANGE, never an exact count.
|
|
3935
|
+
*
|
|
3936
|
+
* Pass `domain` or `advertiser_id`.
|
|
3937
|
+
*
|
|
3938
|
+
* Costs 1 credit per page.
|
|
3939
|
+
*/
|
|
3940
|
+
search(options: GoogleAdsSearchOptions): Promise<Record<string, unknown>>;
|
|
3941
|
+
/**
|
|
3942
|
+
* One creative in full, and the ONLY endpoint carrying its history: every
|
|
3943
|
+
* size variation of the asset, the impression bucket, the per-region
|
|
3944
|
+
* breakdown with first and last shown dates and a per-surface impression
|
|
3945
|
+
* split inside each region, the format, Google's category label, and the
|
|
3946
|
+
* funder disclosure on political ads.
|
|
3947
|
+
*
|
|
3948
|
+
* IMPRESSIONS AND REACH ARE EEA-ONLY: impressions_min, impressions_max and
|
|
3949
|
+
* first_shown are NULL on US creatives because Google publishes reach only
|
|
3950
|
+
* where the DSA compels it. A bucket row can carry a lower bound, an upper
|
|
3951
|
+
* bound, or one alone.
|
|
3952
|
+
*
|
|
3953
|
+
* Keyed by the `advertiser_id` + `creative_id` PAIR - a mismatched pair is a
|
|
3954
|
+
* 404, not an empty response.
|
|
3955
|
+
*
|
|
3956
|
+
* Costs 1 credit. Single response, no pagination.
|
|
3957
|
+
*/
|
|
3958
|
+
creative(options: GoogleAdsCreativeOptions): Promise<Record<string, unknown>>;
|
|
3959
|
+
}
|
|
3960
|
+
|
|
3961
|
+
interface MetaAdsSearchOptions {
|
|
3962
|
+
/** Search term (1-200 characters). */
|
|
3963
|
+
query: string;
|
|
3964
|
+
/** Two-letter country code (default "US"). */
|
|
3965
|
+
country?: string;
|
|
3966
|
+
/** Whether to include ads that have stopped running (default "all"). */
|
|
3967
|
+
active_status?: "all" | "active" | "inactive";
|
|
3968
|
+
/**
|
|
3969
|
+
* Ad category (default "all"). "political_and_issue_ads" is the only way to
|
|
3970
|
+
* get spend, reach, impressions and the paid-for-by disclosure back.
|
|
3971
|
+
*/
|
|
3972
|
+
ad_type?: "all" | "political_and_issue_ads";
|
|
3973
|
+
/** Creative media filter. Default: no media filter. */
|
|
3974
|
+
media_type?: "all" | "image" | "video" | "meme" | "image_and_meme" | "none";
|
|
3975
|
+
/** How the query terms are matched (default "keyword_unordered"). */
|
|
3976
|
+
search_type?: "keyword_unordered" | "keyword_exact_phrase";
|
|
3977
|
+
/**
|
|
3978
|
+
* `next_cursor` from the previous response. Page 1 is 30 ads, then 10 per
|
|
3979
|
+
* page. EVERY OTHER FILTER IS IGNORED when this is present - the cursor
|
|
3980
|
+
* already carries them.
|
|
3981
|
+
*/
|
|
3982
|
+
cursor?: string;
|
|
3983
|
+
[key: string]: unknown;
|
|
3984
|
+
}
|
|
3985
|
+
interface MetaAdsAdvertiserOptions {
|
|
3986
|
+
/** The advertiser's numeric Facebook Page id (3-25 digits, as a string). */
|
|
3987
|
+
page_id: string;
|
|
3988
|
+
/** Two-letter country code (default "US"). */
|
|
3989
|
+
country?: string;
|
|
3990
|
+
/** Whether to include ads that have stopped running (default "all"). */
|
|
3991
|
+
active_status?: "all" | "active" | "inactive";
|
|
3992
|
+
/**
|
|
3993
|
+
* Ad category (default "all"). "political_and_issue_ads" is the only way to
|
|
3994
|
+
* get spend, reach, impressions and the paid-for-by disclosure back.
|
|
3995
|
+
*/
|
|
3996
|
+
ad_type?: "all" | "political_and_issue_ads";
|
|
3997
|
+
/** Creative media filter. Default: no media filter. */
|
|
3998
|
+
media_type?: "all" | "image" | "video" | "meme" | "image_and_meme" | "none";
|
|
3999
|
+
/**
|
|
4000
|
+
* `next_cursor` from the previous response. Page 1 is 30 ads, then 10 per
|
|
4001
|
+
* page. EVERY OTHER FILTER IS IGNORED when this is present.
|
|
4002
|
+
*/
|
|
4003
|
+
cursor?: string;
|
|
4004
|
+
[key: string]: unknown;
|
|
4005
|
+
}
|
|
4006
|
+
interface MetaAdsAdOptions {
|
|
4007
|
+
/** The ad's archive id (3-25 digits, as a string). */
|
|
4008
|
+
ad_archive_id: string;
|
|
4009
|
+
[key: string]: unknown;
|
|
4010
|
+
}
|
|
4011
|
+
declare class MetaAdsNamespace {
|
|
4012
|
+
private client;
|
|
4013
|
+
constructor(client: Scavio);
|
|
4014
|
+
/**
|
|
4015
|
+
* Search the Meta Ad Library. Page 1 returns 30 ads with the full creative:
|
|
4016
|
+
* page name, ad copy, headline, CTA, images and videos, the platforms each
|
|
4017
|
+
* ran on, and run dates - plus `total_results`, `total_is_capped`,
|
|
4018
|
+
* `has_next_page` and `next_cursor`.
|
|
4019
|
+
*
|
|
4020
|
+
* Cursor-paginated the whole way down: 30 ads on page 1, then 10 per page.
|
|
4021
|
+
* Walk `has_next_page` to pull an entire query. THE OTHER FILTERS ARE
|
|
4022
|
+
* IGNORED once `cursor` is set, because the cursor carries them itself.
|
|
4023
|
+
*
|
|
4024
|
+
* `total_results` CAPS AT 50000 with `total_is_capped: true` - Meta only
|
|
4025
|
+
* reports ">50,000", so never present it as an exact count. Spend, reach,
|
|
4026
|
+
* impressions and the paid-for-by disclosure are null unless
|
|
4027
|
+
* `ad_type` is "political_and_issue_ads".
|
|
4028
|
+
*
|
|
4029
|
+
* Costs 1 credit PER PAGE, so depth costs roughly 10 ads per credit past the
|
|
4030
|
+
* first 30.
|
|
4031
|
+
*/
|
|
4032
|
+
search(options: MetaAdsSearchOptions): Promise<Record<string, unknown>>;
|
|
4033
|
+
/**
|
|
4034
|
+
* Every ad a Facebook Page is running, addressed by its numeric page id.
|
|
4035
|
+
* Page 1 returns 30 ads with the same creative detail as search(), then 10
|
|
4036
|
+
* per page off `next_cursor`; walk `has_next_page` to pull the advertiser's
|
|
4037
|
+
* whole library.
|
|
4038
|
+
*
|
|
4039
|
+
* The other filters are ignored once `cursor` is set. Spend, reach,
|
|
4040
|
+
* impressions and the paid-for-by disclosure are null on commercial ads -
|
|
4041
|
+
* only political/issue ads carry them.
|
|
4042
|
+
*
|
|
4043
|
+
* Costs 1 credit per page.
|
|
4044
|
+
*/
|
|
4045
|
+
advertiser(options: MetaAdsAdvertiserOptions): Promise<Record<string, unknown>>;
|
|
4046
|
+
/**
|
|
4047
|
+
* One ad in full by archive id: creative, advertiser, run dates, platforms
|
|
4048
|
+
* and any political disclosure.
|
|
4049
|
+
*
|
|
4050
|
+
* Spend, reach and impressions are null unless the ad is a political/issue
|
|
4051
|
+
* ad.
|
|
4052
|
+
*
|
|
4053
|
+
* Costs 1 credit. Single response, no pagination.
|
|
4054
|
+
*/
|
|
4055
|
+
ad(options: MetaAdsAdOptions): Promise<Record<string, unknown>>;
|
|
4056
|
+
}
|
|
4057
|
+
|
|
4058
|
+
/**
|
|
4059
|
+
* Default client-side rate limit, safe on every plan including free.
|
|
4060
|
+
*/
|
|
4061
|
+
declare const DEFAULT_MAX_REQUESTS_PER_SECOND = 1;
|
|
4062
|
+
/**
|
|
4063
|
+
* Highest client-side rate limit accepted, matching the largest plan limit.
|
|
4064
|
+
*/
|
|
4065
|
+
declare const MAX_REQUESTS_PER_SECOND = 50;
|
|
4066
|
+
interface ScavioConfig {
|
|
4067
|
+
apiKey?: string;
|
|
4068
|
+
baseUrl?: string;
|
|
4069
|
+
timeout?: number;
|
|
4070
|
+
maxRequestsPerSecond?: number;
|
|
4071
|
+
/**
|
|
4072
|
+
* Additional retry attempts after the first request on transient failures
|
|
4073
|
+
* (HTTP 429/500/502/503/504 and network/timeout errors). Defaults to 2.
|
|
4074
|
+
* Set to 0 to disable retries.
|
|
4075
|
+
*/
|
|
4076
|
+
maxRetries?: number;
|
|
4077
|
+
}
|
|
4078
|
+
/**
|
|
4079
|
+
* Options for the top-level `extract()` method.
|
|
4080
|
+
*
|
|
4081
|
+
* Extract is a CORE endpoint, not a platform: it reads any URL, so it hangs
|
|
4082
|
+
* off the client itself rather than a namespace.
|
|
4083
|
+
*/
|
|
4084
|
+
interface ExtractOptions {
|
|
4085
|
+
/**
|
|
4086
|
+
* Page to read. http(s) only; a bare host is upgraded to https. Loopback,
|
|
4087
|
+
* private, link-local and cloud-metadata hosts are rejected with a 400.
|
|
4088
|
+
* 1-2048 characters.
|
|
4089
|
+
*/
|
|
4090
|
+
url: string;
|
|
4091
|
+
/**
|
|
4092
|
+
* Output format (default "markdown").
|
|
4093
|
+
*
|
|
4094
|
+
* - "html": the raw page, unmodified.
|
|
4095
|
+
* - "markdown": readability extraction - boilerplate stripped.
|
|
4096
|
+
* - "text": that markdown flattened to plain text.
|
|
4097
|
+
*/
|
|
4098
|
+
format?: "html" | "markdown" | "text";
|
|
4099
|
+
/**
|
|
4100
|
+
* Fetch tier, and THE PRICE-BEARING PARAM (default "normal").
|
|
4101
|
+
*
|
|
4102
|
+
* - "normal": plain datacenter fetch - 1 credit.
|
|
4103
|
+
* - "advanced": headless browser render, for JS-built pages - 1 credit.
|
|
4104
|
+
* - "ultra": residential proxy, for hard bot walls - 2 credits.
|
|
4105
|
+
*/
|
|
4106
|
+
mode?: "normal" | "advanced" | "ultra";
|
|
4107
|
+
[key: string]: unknown;
|
|
4108
|
+
}
|
|
4109
|
+
declare class Scavio {
|
|
4110
|
+
readonly google: GoogleNamespace;
|
|
4111
|
+
readonly amazon: AmazonNamespace;
|
|
4112
|
+
readonly walmart: WalmartNamespace;
|
|
4113
|
+
readonly youtube: YouTubeNamespace;
|
|
4114
|
+
readonly reddit: RedditNamespace;
|
|
4115
|
+
readonly tiktok: TikTokNamespace;
|
|
4116
|
+
readonly tiktokShop: TikTokShopNamespace;
|
|
4117
|
+
readonly instagram: InstagramNamespace;
|
|
4118
|
+
readonly x: XNamespace;
|
|
4119
|
+
readonly linkedin: LinkedInNamespace;
|
|
4120
|
+
readonly threads: ThreadsNamespace;
|
|
4121
|
+
readonly kuaishou: KuaishouNamespace;
|
|
4122
|
+
readonly ebay: EbayNamespace;
|
|
4123
|
+
readonly target: TargetNamespace;
|
|
4124
|
+
readonly homeDepot: HomeDepotNamespace;
|
|
4125
|
+
readonly zillow: ZillowNamespace;
|
|
4126
|
+
readonly redfin: RedfinNamespace;
|
|
4127
|
+
readonly booking: BookingNamespace;
|
|
4128
|
+
readonly airbnb: AirbnbNamespace;
|
|
4129
|
+
readonly tripadvisor: TripadvisorNamespace;
|
|
4130
|
+
readonly yelp: YelpNamespace;
|
|
4131
|
+
readonly indeed: IndeedNamespace;
|
|
4132
|
+
readonly glassdoor: GlassdoorNamespace;
|
|
4133
|
+
readonly appStore: AppStoreNamespace;
|
|
4134
|
+
readonly googlePlay: GooglePlayNamespace;
|
|
4135
|
+
readonly g2: G2Namespace;
|
|
4136
|
+
readonly capterra: CapterraNamespace;
|
|
4137
|
+
readonly sec: SECNamespace;
|
|
4138
|
+
readonly companiesHouse: CompaniesHouseNamespace;
|
|
4139
|
+
readonly googleAds: GoogleAdsNamespace;
|
|
4140
|
+
readonly metaAds: MetaAdsNamespace;
|
|
4141
|
+
private readonly apiKey;
|
|
4142
|
+
private readonly baseUrl;
|
|
4143
|
+
private readonly timeout;
|
|
4144
|
+
private readonly maxRetries;
|
|
4145
|
+
private readonly rateLimiter;
|
|
4146
|
+
constructor(config?: ScavioConfig);
|
|
4147
|
+
/** @internal */
|
|
4148
|
+
_post(path: string, body: object): Promise<Record<string, unknown>>;
|
|
4149
|
+
/** @internal */
|
|
4150
|
+
_get(path: string): Promise<Record<string, unknown>>;
|
|
4151
|
+
search(options: GoogleSearchOptions): Promise<Record<string, unknown>>;
|
|
4152
|
+
/**
|
|
4153
|
+
* Read ANY web page and get it back as readability Markdown (the default),
|
|
4154
|
+
* plain text, or raw HTML. Returns `{ url, format, mode, content,
|
|
4155
|
+
* content_length }`.
|
|
4156
|
+
*
|
|
4157
|
+
* This is a core endpoint, not a platform, so it lives on the client itself:
|
|
4158
|
+
* `scavio.extract({ url })`, never `scavio.extract.extract()`.
|
|
4159
|
+
*
|
|
4160
|
+
* Credits are a function of `mode`, not a flat per-call constant:
|
|
4161
|
+
* "normal" costs 1, "advanced" costs 1, "ultra" costs 2. Billing happens
|
|
4162
|
+
* only on a successful extraction - a dead link, bot wall or timeout costs
|
|
4163
|
+
* nothing.
|
|
4164
|
+
*
|
|
4165
|
+
* Start on "normal". Move to "advanced" when the page builds its content in
|
|
4166
|
+
* the browser, and to "ultra" only when a bot wall blocks the other two.
|
|
4167
|
+
*
|
|
4168
|
+
* @example
|
|
4169
|
+
* const page = await scavio.extract({ url: "https://example.com/pricing" });
|
|
4170
|
+
* console.log(page.content);
|
|
4171
|
+
*/
|
|
4172
|
+
extract(options: ExtractOptions): Promise<Record<string, unknown>>;
|
|
4173
|
+
getUsage(): Promise<Record<string, unknown>>;
|
|
4174
|
+
}
|
|
4175
|
+
|
|
4176
|
+
declare class ScavioError extends Error {
|
|
4177
|
+
constructor(message: string);
|
|
4178
|
+
}
|
|
4179
|
+
declare class MissingAPIKeyError extends ScavioError {
|
|
4180
|
+
constructor();
|
|
4181
|
+
}
|
|
4182
|
+
/** The request could not reach the API (DNS, connection reset, TLS, ...). */
|
|
4183
|
+
declare class ScavioConnectionError extends ScavioError {
|
|
4184
|
+
constructor(message?: string);
|
|
4185
|
+
}
|
|
4186
|
+
/** The request did not complete within the configured timeout. */
|
|
4187
|
+
declare class ScavioTimeoutError extends ScavioError {
|
|
4188
|
+
constructor(message?: string);
|
|
4189
|
+
}
|
|
4190
|
+
declare class InvalidAPIKeyError extends ScavioError {
|
|
4191
|
+
readonly statusCode = 401;
|
|
4192
|
+
readonly responseBody?: Record<string, unknown>;
|
|
4193
|
+
constructor(message?: string, responseBody?: Record<string, unknown>);
|
|
4194
|
+
}
|
|
4195
|
+
declare class InsufficientCreditsError extends ScavioError {
|
|
4196
|
+
readonly statusCode = 402;
|
|
4197
|
+
readonly responseBody?: Record<string, unknown>;
|
|
4198
|
+
constructor(message?: string, responseBody?: Record<string, unknown>);
|
|
4199
|
+
}
|
|
4200
|
+
/**
|
|
4201
|
+
* The request body failed validation. Raised for HTTP 400 and for HTTP 422,
|
|
4202
|
+
* which is what Threads and Kuaishou return when an identifier is missing or
|
|
4203
|
+
* conflicting - those routes have no 400. `statusCode` reports whichever the
|
|
4204
|
+
* API actually sent.
|
|
4205
|
+
*/
|
|
4206
|
+
declare class BadRequestError extends ScavioError {
|
|
4207
|
+
readonly statusCode: number;
|
|
4208
|
+
readonly responseBody?: Record<string, unknown>;
|
|
4209
|
+
constructor(message?: string, responseBody?: Record<string, unknown>, statusCode?: number);
|
|
1366
4210
|
}
|
|
1367
4211
|
declare class NotFoundError extends ScavioError {
|
|
1368
4212
|
readonly statusCode = 404;
|
|
@@ -1380,4 +4224,4 @@ declare class ScavioAPIError extends ScavioError {
|
|
|
1380
4224
|
constructor(statusCode: number, message: string, responseBody?: Record<string, unknown>);
|
|
1381
4225
|
}
|
|
1382
4226
|
|
|
1383
|
-
export { type AmazonOffersOptions, type AmazonProductOptions, type AmazonSearchOptions, BadRequestError, type GoogleAiModeOptions, type GoogleFlightsOptions, type GoogleHotelsDetailOptions, type GoogleHotelsOptions, type GoogleMapsPlaceOptions, type GoogleMapsReviewsOptions, type GoogleMapsSearchOptions, type GoogleNewsOptions, type GoogleSearchOptions, type GoogleShoppingOptions, type GoogleShoppingProductOptions, type GoogleShoppingStoresOptions, type GoogleTrendingOptions, type GoogleTrendsOptions, type InstagramCommentRepliesOptions, type InstagramFollowOptions, type InstagramPostCommentsOptions, type InstagramPostOptions, type InstagramProfileOptions, type InstagramSearchOptions, type InstagramStoriesOptions, type InstagramUserFeedOptions, InsufficientCreditsError, InvalidAPIKeyError, type LinkedInCompanyOptions, type LinkedInCompanyPostsOptions, type LinkedInCompanyPostsRequest, type LinkedInCompanyRefOptions, type LinkedInJobOptions, type LinkedInPersonContactOptions, type LinkedInPersonOptions, type LinkedInPersonPostsOptions, type LinkedInPersonPostsRequest, type LinkedInPersonRefOptions, type LinkedInPostCommentsOptions, type LinkedInPostOptions, type LinkedInSearchJobsOptions, type LinkedInSearchPeopleOptions, type LinkedInSearchPostsOptions, MissingAPIKeyError, NotFoundError, RateLimitError, type RedditCommentRepliesOptions, type RedditFeedSort, type RedditPopularOptions, type RedditPostCommentsOptions, type RedditPostOptions, type RedditSearchOptions, type RedditSearchSuggestionsOptions, type RedditSort, type RedditSubredditOptions, type RedditSubredditPostsOptions, type RedditUserFeedOptions, type RedditUserOptions, Scavio, ScavioAPIError, type ScavioConfig, ScavioConnectionError, ScavioError, ScavioTimeoutError, type TikTokCommentRepliesOptions, type TikTokHashtagOptions, type TikTokHashtagVideosOptions, type TikTokProfileOptions, type TikTokSearchUsersOptions, type TikTokSearchVideosOptions, type TikTokShopCategoryProductsOptions, type TikTokShopListingRegion, type TikTokShopProductOptions, type TikTokShopProductReviewsOptions, type TikTokShopRegion, type TikTokShopResolveOptions, type TikTokShopReviewSort, type TikTokShopSearchOptions, type TikTokShopShopProductsOptions, type TikTokShopSuggestionsOptions, type TikTokUserFollowersOptions, type TikTokUserFollowingsOptions, type TikTokUserPostsOptions, type TikTokVideoCommentsOptions, type TikTokVideoOptions, type WalmartProductOptions, type WalmartSearchOptions, type XSearchOptions, type XTrendingOptions, type XTweetCommentsOptions, type XTweetOptions, type XTweetRetweetersOptions, type XUserFeedOptions, type XUserOptions, type YouTubeChannelCommunityOptions, type YouTubeChannelOptions, type YouTubeChannelResolveOptions, type YouTubeChannelSearchOptions, type YouTubeChannelShortsOptions, type YouTubeChannelVideosOptions, type YouTubeCommentRepliesOptions, type YouTubeCommentsOptions, type YouTubeMetadataOptions, type YouTubeRelatedOptions, type YouTubeSearchOptions, type YouTubeShortsOptions, type YouTubeStreamsOptions, type YouTubeSuggestionsOptions, type YouTubeTranscriptOptions, type YouTubeVideoOptions };
|
|
4227
|
+
export { type AirbnbListingOptions, AirbnbNamespace, type AirbnbReviewsOptions, type AirbnbSearchOptions, AmazonNamespace, type AmazonOffersOptions, type AmazonProductOptions, type AmazonSearchOptions, type AppStoreAppOptions, AppStoreNamespace, type AppStoreReviewsOptions, type AppStoreSearchOptions, BadRequestError, type BookingHotelOptions, BookingNamespace, type BookingReviewsOptions, type BookingSearchOptions, CapterraNamespace, type CapterraProductOptions, type CapterraReviewsOptions, type CapterraSearchOptions, type CompaniesHouseCompanyOptions, type CompaniesHouseFilingHistoryOptions, CompaniesHouseNamespace, type CompaniesHouseOfficersOptions, type CompaniesHouseSearchOptions, DEFAULT_MAX_REQUESTS_PER_SECOND, EbayNamespace, type EbayProductOptions, type EbaySearchOptions, type EbaySellerOptions, type ExtractOptions, G2Namespace, type G2ProductOptions, type G2ReviewsOptions, type G2SearchOptions, type GlassdoorCompaniesOptions, type GlassdoorCompanyOptions, GlassdoorNamespace, type GlassdoorReviewsOptions, type GlassdoorSalariesOptions, type GoogleAdsAdvertisersOptions, type GoogleAdsCreativeOptions, GoogleAdsNamespace, type GoogleAdsSearchOptions, type GoogleAiModeOptions, type GoogleFlightsOptions, type GoogleHotelsDetailOptions, type GoogleHotelsOptions, type GoogleMapsPlaceOptions, type GoogleMapsReviewsOptions, type GoogleMapsSearchOptions, GoogleNamespace, type GoogleNewsOptions, type GooglePlayAppOptions, GooglePlayNamespace, type GooglePlayReviewsOptions, type GooglePlaySearchOptions, type GoogleSearchOptions, type GoogleShoppingOptions, type GoogleShoppingProductOptions, type GoogleShoppingStoresOptions, type GoogleTrendingOptions, type GoogleTrendsOptions, HomeDepotNamespace, type HomeDepotProductOptions, type HomeDepotReviewsOptions, type HomeDepotSearchOptions, type IndeedCompanyOptions, type IndeedCompanyReviewsOptions, type IndeedJobOptions, IndeedNamespace, type IndeedSearchOptions, type InstagramCommentRepliesOptions, type InstagramFollowOptions, InstagramNamespace, type InstagramPostCommentsOptions, type InstagramPostOptions, type InstagramProfileOptions, type InstagramSearchOptions, type InstagramStoriesOptions, type InstagramUserFeedOptions, InsufficientCreditsError, InvalidAPIKeyError, type KuaishouCommentRepliesOptions, KuaishouNamespace, type KuaishouProfileOptions, type KuaishouSearchLiveOptions, type KuaishouSearchOptions, type KuaishouSearchUsersOptions, type KuaishouSearchVideosOptions, type KuaishouTagFeedOptions, type KuaishouTrendingOptions, type KuaishouUserLiveOptions, type KuaishouUserPostsOptions, type KuaishouUserResolveOptions, type KuaishouVideoCommentsOptions, type KuaishouVideoOptions, type KuaishouVideosBatchOptions, type LinkedInCompanyOptions, type LinkedInCompanyPostsOptions, type LinkedInCompanyPostsRequest, type LinkedInCompanyRefOptions, type LinkedInJobOptions, LinkedInNamespace, type LinkedInPersonContactOptions, type LinkedInPersonOptions, type LinkedInPersonPostsOptions, type LinkedInPersonPostsRequest, type LinkedInPersonRefOptions, type LinkedInPostCommentsOptions, type LinkedInPostOptions, type LinkedInSearchJobsOptions, type LinkedInSearchPeopleOptions, type LinkedInSearchPostsOptions, MAX_REQUESTS_PER_SECOND, type MetaAdsAdOptions, type MetaAdsAdvertiserOptions, MetaAdsNamespace, type MetaAdsSearchOptions, MissingAPIKeyError, NotFoundError, RateLimitError, type RedditCommentRepliesOptions, type RedditFeedSort, RedditNamespace, type RedditPopularOptions, type RedditPostCommentsOptions, type RedditPostOptions, type RedditSearchOptions, type RedditSearchSuggestionsOptions, type RedditSort, type RedditSubredditOptions, type RedditSubredditPostsOptions, type RedditUserFeedOptions, type RedditUserOptions, type RedfinMarketOptions, RedfinNamespace, type RedfinPropertyOptions, type RedfinSearchOptions, type SECCompanyOptions, type SECConceptOptions, type SECFactsOptions, type SECFilingsOptions, type SECLookupOptions, SECNamespace, type SECSearchOptions, Scavio, ScavioAPIError, type ScavioConfig, ScavioConnectionError, ScavioError, ScavioTimeoutError, type TargetCategoryOptions, TargetNamespace, type TargetProductOptions, type TargetReviewsOptions, type TargetSearchOptions, ThreadsNamespace, type ThreadsPostCommentsOptions, type ThreadsPostOptions, type ThreadsProfileOptions, type ThreadsSearchUsersOptions, type ThreadsUserPostsOptions, type ThreadsUserRepliesOptions, type TikTokCommentRepliesOptions, type TikTokHashtagOptions, type TikTokHashtagVideosOptions, TikTokNamespace, type TikTokProfileOptions, type TikTokSearchUsersOptions, type TikTokSearchVideosOptions, type TikTokShopCategoryProductsOptions, type TikTokShopListingRegion, TikTokShopNamespace, type TikTokShopProductOptions, type TikTokShopProductReviewsOptions, type TikTokShopRegion, type TikTokShopResolveOptions, type TikTokShopReviewSort, type TikTokShopSearchOptions, type TikTokShopShopProductsOptions, type TikTokShopSuggestionsOptions, type TikTokUserFollowersOptions, type TikTokUserFollowingsOptions, type TikTokUserPostsOptions, type TikTokVideoCommentsOptions, type TikTokVideoOptions, type TripadvisorLocationOptions, type TripadvisorLocationsOptions, TripadvisorNamespace, type TripadvisorReviewsOptions, type TripadvisorSearchOptions, type WalmartCategoryOptions, WalmartNamespace, type WalmartOffersOptions, type WalmartProductOptions, type WalmartReviewsOptions, type WalmartSearchOptions, type WalmartSellerOptions, type WalmartSellerProductsOptions, XNamespace, type XSearchOptions, type XTrendingOptions, type XTweetCommentsOptions, type XTweetOptions, type XTweetRetweetersOptions, type XUserFeedOptions, type XUserOptions, type YelpBusinessOptions, YelpNamespace, type YelpReviewsOptions, type YelpSearchOptions, type YouTubeChannelCommunityOptions, type YouTubeChannelOptions, type YouTubeChannelResolveOptions, type YouTubeChannelSearchOptions, type YouTubeChannelShortsOptions, type YouTubeChannelVideosOptions, type YouTubeCommentRepliesOptions, type YouTubeCommentsOptions, type YouTubeMetadataOptions, YouTubeNamespace, type YouTubeRelatedOptions, type YouTubeSearchOptions, type YouTubeShortsOptions, type YouTubeStreamsOptions, type YouTubeSuggestionsOptions, type YouTubeTranscriptOptions, type YouTubeVideoOptions, type ZillowAgentReviewsOptions, ZillowNamespace, type ZillowPropertyOptions, type ZillowSearchOptions };
|