scavio 0.24.0 → 0.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  /**
2
- * Amazon moved to a new upstream in 2026-07 and the API now returns a
3
- * normalized shape instead of the old raw provider payload. Nine options went
4
- * with the old provider: language, currency, device, sort_by, pages,
2
+ * The Amazon API changed in 2026-07 and now returns a normalized shape
3
+ * instead of the old raw payload. Nine options were removed: language, currency, device, sort_by, pages,
5
4
  * category_id, merchant_id, zip_code and autoselect_variant. They are removed
6
5
  * rather than kept as no-ops - notably `sort_by`, which the marketplace was
7
6
  * verified to ignore entirely (every sort value returned the same unordered
@@ -57,9 +56,9 @@ declare class AmazonNamespace {
57
56
  }
58
57
 
59
58
  /**
60
- * Google endpoints (scrape.do engine, /api/v2/google). A faithful passthrough
61
- * that returns Google's full response. Every endpoint costs 1 credit. Any
62
- * additional scrape.do parameter can be added to the options object.
59
+ * Google endpoints (/api/v2/google). A faithful passthrough that returns
60
+ * Google's full response. Every endpoint costs 1 credit. Any additional
61
+ * API parameter can be added to the options object.
63
62
  * See https://scavio.dev/docs/search-api.
64
63
  */
65
64
  interface GoogleSearchOptions {
@@ -378,11 +377,128 @@ interface GoogleTrendingOptions {
378
377
  status?: "all" | "active";
379
378
  [key: string]: unknown;
380
379
  }
380
+ interface GoogleCustomSearchOptions {
381
+ /** Search query. */
382
+ q: string;
383
+ /** Accepted and echoed back; results come from the whole web. */
384
+ cx?: string;
385
+ /** Results to return, 1-10 (default 10). */
386
+ num?: number;
387
+ /** 1-based index of the first result (default 1); start + num <= 100. */
388
+ start?: number;
389
+ /** Country of the search (ISO 3166-1 alpha-2, e.g. 'us'). */
390
+ gl?: string;
391
+ /** UI language (e.g. 'en', 'zh-TW'). */
392
+ hl?: string;
393
+ /** Language restrict (e.g. 'lang_en'). */
394
+ lr?: string;
395
+ /** Country restrict, a single value (e.g. 'countryUS'). */
396
+ cr?: string;
397
+ /** SafeSearch (default 'off'). */
398
+ safe?: "active" | "off";
399
+ /** '0' turns off duplicate-content filtering. */
400
+ filter?: "0" | "1";
401
+ /** d[N], w[N], m[N] or y[N] (e.g. 'm6'). Sent as dateRestrict. */
402
+ date_restrict?: string;
403
+ /** Site to include or exclude (e.g. 'example.com'); enforced on results. Sent as siteSearch. */
404
+ site_search?: string;
405
+ /** 'i' include site_search (default), 'e' exclude it. Sent as siteSearchFilter. */
406
+ site_search_filter?: "i" | "e";
407
+ /** Phrase every result must contain. Sent as exactTerms. */
408
+ exact_terms?: string;
409
+ /** Word or phrase no result may contain. Sent as excludeTerms. */
410
+ exclude_terms?: string;
411
+ /** Space-separated terms; each result contains at least one. Sent as orTerms. */
412
+ or_terms?: string;
413
+ /** Extra terms ANDed onto the query. */
414
+ hq?: string;
415
+ /** File extension to restrict to (e.g. 'pdf'). Sent as fileType. */
416
+ file_type?: string;
417
+ /** Google domain to search (e.g. 'google.co.uk'). */
418
+ googlehost?: string;
419
+ /** Canonical location name (Scavio extension). */
420
+ location?: string;
421
+ /** Device to emulate (Scavio extension). */
422
+ device?: "desktop" | "mobile";
423
+ /** Disable spelling autocorrection when true (Scavio extension). */
424
+ nfpr?: boolean;
425
+ /** Skip the 24h result cache when true (Scavio extension). */
426
+ no_cache?: boolean;
427
+ [key: string]: unknown;
428
+ }
429
+ /** One result in the Custom Search JSON API format. */
430
+ interface GoogleCustomSearchItem {
431
+ kind: "customsearch#result";
432
+ title: string;
433
+ htmlTitle: string;
434
+ link: string;
435
+ displayLink: string;
436
+ snippet: string;
437
+ htmlSnippet: string;
438
+ formattedUrl: string;
439
+ htmlFormattedUrl: string;
440
+ pagemap?: {
441
+ cse_thumbnail?: {
442
+ src: string;
443
+ }[];
444
+ [key: string]: unknown;
445
+ };
446
+ }
447
+ /** queries.request / nextPage / previousPage entry. */
448
+ interface GoogleCustomSearchQuery {
449
+ title: string;
450
+ totalResults: string;
451
+ searchTerms: string;
452
+ count: number;
453
+ startIndex: number;
454
+ inputEncoding: string;
455
+ outputEncoding: string;
456
+ safe: string;
457
+ cx?: string;
458
+ [key: string]: unknown;
459
+ }
460
+ /** customsearch#search response, plus Scavio's billing object. */
461
+ interface GoogleCustomSearchResponse {
462
+ kind: "customsearch#search";
463
+ url: {
464
+ type: string;
465
+ template: string;
466
+ };
467
+ queries: {
468
+ request: GoogleCustomSearchQuery[];
469
+ nextPage?: GoogleCustomSearchQuery[];
470
+ previousPage?: GoogleCustomSearchQuery[];
471
+ };
472
+ searchInformation: {
473
+ searchTime: number;
474
+ formattedSearchTime: string;
475
+ totalResults: string;
476
+ formattedTotalResults: string;
477
+ };
478
+ /** Omitted when there are no results, as in the Custom Search JSON API. */
479
+ items?: GoogleCustomSearchItem[];
480
+ scavio: {
481
+ credits_used: number;
482
+ credits_remaining: number;
483
+ cached: boolean;
484
+ response_time: number;
485
+ };
486
+ [key: string]: unknown;
487
+ }
381
488
  declare class GoogleNamespace {
382
489
  private client;
383
490
  constructor(client: Scavio);
384
491
  /** Google SERP search (includes the AI Overview when Google returns one). */
385
492
  search(options: GoogleSearchOptions): Promise<Record<string, unknown>>;
493
+ /**
494
+ * Google search in the Custom Search JSON API format: a drop-in for cse.list.
495
+ * Returns customsearch#search (items[], searchInformation, queries.nextPage)
496
+ * plus a scavio billing object, so CSE parsing code keeps working. For the
497
+ * full SERP (knowledge graph, AI overview, People Also Ask) use search().
498
+ * Unsupported CSE params (image search, sort, rights) throw BadRequestError.
499
+ * 1 credit.
500
+ */
501
+ customSearch(options: GoogleCustomSearchOptions): Promise<GoogleCustomSearchResponse>;
386
502
  /** Google AI Mode answer. */
387
503
  aiMode(options: GoogleAiModeOptions): Promise<Record<string, unknown>>;
388
504
  /** Google Maps local results. */
@@ -1727,18 +1843,18 @@ interface LinkedInPostCommentsOptions extends LinkedInPostOptions {
1727
1843
  /** 1-based page number. Page size varies, so page until a page comes back empty. */
1728
1844
  page?: number;
1729
1845
  }
1730
- /** @deprecated Retired upstream; always returns HTTP 410. */
1846
+ /** @deprecated Retired; always returns HTTP 410. */
1731
1847
  interface LinkedInPersonContactOptions {
1732
1848
  username?: string;
1733
1849
  [key: string]: unknown;
1734
1850
  }
1735
- /** @deprecated Retired upstream; always returns HTTP 410. */
1851
+ /** @deprecated Retired; always returns HTTP 410. */
1736
1852
  interface LinkedInCompanyRefOptions {
1737
1853
  company_id?: string;
1738
1854
  company?: string;
1739
1855
  [key: string]: unknown;
1740
1856
  }
1741
- /** @deprecated Retired upstream; always returns HTTP 410. */
1857
+ /** @deprecated Retired; always returns HTTP 410. */
1742
1858
  interface LinkedInSearchPeopleOptions {
1743
1859
  search?: string;
1744
1860
  title?: string;
@@ -1747,7 +1863,7 @@ interface LinkedInSearchPeopleOptions {
1747
1863
  location?: string;
1748
1864
  [key: string]: unknown;
1749
1865
  }
1750
- /** @deprecated Retired upstream; always returns HTTP 410. */
1866
+ /** @deprecated Retired; always returns HTTP 410. */
1751
1867
  interface LinkedInSearchPostsOptions {
1752
1868
  search?: string;
1753
1869
  [key: string]: unknown;
@@ -1780,28 +1896,28 @@ declare class LinkedInNamespace {
1780
1896
  /** Comments with their replies. Page size varies - keep paging until empty. */
1781
1897
  postComments(options: LinkedInPostCommentsOptions): Promise<Record<string, unknown>>;
1782
1898
  /**
1783
- * @deprecated Retired by the upstream provider. Always returns HTTP 410 and is
1899
+ * @deprecated Retired. Always returns HTTP 410 and is
1784
1900
  * never billed.
1785
1901
  */
1786
1902
  personContact(options: LinkedInPersonContactOptions): Promise<Record<string, unknown>>;
1787
1903
  /**
1788
- * @deprecated Retired by the upstream provider. Always returns HTTP 410 and is
1904
+ * @deprecated Retired. Always returns HTTP 410 and is
1789
1905
  * never billed. `company()` returns `featured_employees`, a small sample of
1790
1906
  * staff profiles.
1791
1907
  */
1792
1908
  companyPeople(options: LinkedInCompanyRefOptions): Promise<Record<string, unknown>>;
1793
1909
  /**
1794
- * @deprecated Retired by the upstream provider. Always returns HTTP 410 and is
1910
+ * @deprecated Retired. Always returns HTTP 410 and is
1795
1911
  * never billed. Use `searchJobs()` with the company name as the search term.
1796
1912
  */
1797
1913
  companyJobs(options: LinkedInCompanyRefOptions): Promise<Record<string, unknown>>;
1798
1914
  /**
1799
- * @deprecated Retired by the upstream provider. Always returns HTTP 410 and is
1915
+ * @deprecated Retired. Always returns HTTP 410 and is
1800
1916
  * never billed.
1801
1917
  */
1802
1918
  searchPeople(options: LinkedInSearchPeopleOptions): Promise<Record<string, unknown>>;
1803
1919
  /**
1804
- * @deprecated Retired by the upstream provider. Always returns HTTP 410 and is
1920
+ * @deprecated Retired. Always returns HTTP 410 and is
1805
1921
  * never billed.
1806
1922
  */
1807
1923
  searchPosts(options: LinkedInSearchPostsOptions): Promise<Record<string, unknown>>;
@@ -1815,7 +1931,7 @@ interface ThreadsProfileOptions {
1815
1931
  user_id?: string;
1816
1932
  /**
1817
1933
  * Handle without the leading @ (1-60 characters). Costs 2 extra credits
1818
- * because the id has to be resolved upstream first - prefer `user_id`.
1934
+ * because the id has to be resolved first - prefer `user_id`.
1819
1935
  */
1820
1936
  username?: string;
1821
1937
  [key: string]: unknown;
@@ -2246,7 +2362,7 @@ declare class TargetNamespace {
2246
2362
  * Paged with `page` + `count` (1-28, default 24). `seller_id` and
2247
2363
  * `seller_name` are null on first-party rows, which means "sold by Target".
2248
2364
  *
2249
- * Costs 1 credit. Typically ~9s - it runs through a headless browser.
2365
+ * Costs 1 credit. Typically ~9s.
2250
2366
  */
2251
2367
  search(options: TargetSearchOptions): Promise<Record<string, unknown>>;
2252
2368
  /**
@@ -2621,9 +2737,8 @@ declare class RedfinNamespace {
2621
2737
  * houses, schools, climate risk, walkability and location scores, sun
2622
2738
  * exposure, monthly weather, permits, zoning, comparable sales and photos.
2623
2739
  *
2624
- * Reads the property PAGE, whose inlined request cache replaces the ~40
2625
- * upstream calls that page made - which is why it is the same price as
2626
- * search().
2740
+ * Returns the whole property page in one call, which is why it is the same
2741
+ * price as search().
2627
2742
  *
2628
2743
  * Costs 1 credit. Single response, no pagination.
2629
2744
  */
@@ -2700,7 +2815,7 @@ interface BookingSearchOptions {
2700
2815
  rooms?: number;
2701
2816
  /**
2702
2817
  * ISO 4217 currency, 3 letters (default "USD"). Leave it set - without a
2703
- * currency Booking prices off the proxy exit.
2818
+ * currency Booking picks a currency itself.
2704
2819
  */
2705
2820
  currency?: string;
2706
2821
  [key: string]: unknown;
@@ -2859,7 +2974,7 @@ interface AirbnbSearchOptions {
2859
2974
  amenities?: string;
2860
2975
  /**
2861
2976
  * ISO 4217 currency (default "USD"). Leave it set - without a currency
2862
- * Airbnb prices off the proxy exit.
2977
+ * Airbnb picks a currency itself.
2863
2978
  */
2864
2979
  currency?: string;
2865
2980
  /**
@@ -3115,8 +3230,7 @@ interface YelpSearchOptions {
3115
3230
  term?: string;
3116
3231
  /**
3117
3232
  * Where to search (1-200 characters), e.g. "Austin, TX". Effectively
3118
- * REQUIRED - without it Yelp geolocates off the proxy exit and the same
3119
- * request answers about a different metro run to run.
3233
+ * REQUIRED - without it Yelp picks a location itself and the same request can answer about a different metro run to run.
3120
3234
  */
3121
3235
  location?: string;
3122
3236
  /** Result page, 1-indexed. Yelp fixes the page size at 10. */
@@ -3188,7 +3302,7 @@ declare class YelpNamespace {
3188
3302
  * count.
3189
3303
  *
3190
3304
  * `term` + `location` or `url` is required, and `location` is effectively
3191
- * mandatory - Yelp geolocates a location-less search off the proxy exit.
3305
+ * mandatory - without it Yelp picks a location itself.
3192
3306
  * Paged with `page`; the page size is fixed at 10.
3193
3307
  *
3194
3308
  * Costs 2 credits.
@@ -3308,8 +3422,7 @@ declare class IndeedNamespace {
3308
3422
  * employment types, benefits, geocoded address, employer rating, applicant
3309
3423
  * count and the original ATS link.
3310
3424
  *
3311
- * Single response, no pagination. An unknown job key is a real 404 that
3312
- * scrape.do BILLS - take `job_id` from a search row.
3425
+ * Single response, no pagination. An unknown job key is a real 404 and IS BILLED - take `job_id` from a search row.
3313
3426
  *
3314
3427
  * Costs 2 credits.
3315
3428
  */
@@ -3319,8 +3432,7 @@ declare class IndeedNamespace {
3319
3432
  * approval, overall and per-category ratings, reported salaries, open roles
3320
3433
  * and locations.
3321
3434
  *
3322
- * Single response, no pagination. An unknown company slug is a real 404
3323
- * that scrape.do BILLS.
3435
+ * Single response, no pagination. An unknown company slug is a real 404 and IS BILLED.
3324
3436
  *
3325
3437
  * Costs 2 credits.
3326
3438
  */
@@ -3365,7 +3477,7 @@ interface GlassdoorCompanyOptions {
3365
3477
  interface GlassdoorReviewsOptions {
3366
3478
  /**
3367
3479
  * Glassdoor employer id as a STRING (1699, E1699 or IE1699). Either this or
3368
- * `url` is required. Addressing by employer_id costs two upstream fetches -
3480
+ * `url` is required. Addressing by employer_id costs two lookups -
3369
3481
  * pass reviews_url from company() as `url` instead.
3370
3482
  */
3371
3483
  employer_id?: string;
@@ -3392,7 +3504,7 @@ interface GlassdoorReviewsOptions {
3392
3504
  interface GlassdoorSalariesOptions {
3393
3505
  /**
3394
3506
  * Glassdoor employer id as a STRING (1699, E1699 or IE1699). Either this or
3395
- * `url` is required. Addressing by employer_id costs two upstream fetches -
3507
+ * `url` is required. Addressing by employer_id costs two lookups -
3396
3508
  * pass salaries_url from company() as `url` instead.
3397
3509
  */
3398
3510
  employer_id?: string;
@@ -3432,7 +3544,7 @@ declare class GlassdoorNamespace {
3432
3544
  * server-rendered reviews, AND reviews_url / salaries_url.
3433
3545
  *
3434
3546
  * THE CHAINING ENDPOINT: pass reviews_url / salaries_url back as `url` on
3435
- * reviews() and salaries() to halve the upstream fetches. `employer_id` or
3547
+ * reviews() and salaries() to halve the lookups. `employer_id` or
3436
3548
  * `url` is required - `company` is cosmetic and does not satisfy it.
3437
3549
  *
3438
3550
  * Costs 1 credit. Single response, no pagination. Typically ~3-47s.
@@ -4093,7 +4205,7 @@ declare class SECNamespace {
4093
4205
  * filer had more.
4094
4206
  *
4095
4207
  * Costs 1 credit - including with `include_history`, which is the one call
4096
- * that can buy more than one upstream fetch.
4208
+ * that can buy more than one lookup.
4097
4209
  */
4098
4210
  filings(options: SECFilingsOptions): Promise<Record<string, unknown>>;
4099
4211
  /**
@@ -5721,7 +5833,7 @@ interface ExtractOptions {
5721
5833
  *
5722
5834
  * - "normal": the standard fetch - 1 credit.
5723
5835
  * - "advanced": renders JavaScript, for JS-built pages - 1 credit.
5724
- * - "ultra": the hardest pages and bot walls - 2 credits.
5836
+ * - "ultra": the hardest pages - 2 credits.
5725
5837
  */
5726
5838
  mode?: "normal" | "advanced" | "ultra";
5727
5839
  [key: string]: unknown;
@@ -5903,4 +6015,4 @@ declare class ScavioJobTimeoutError extends ScavioError {
5903
6015
  constructor(jobType: "crawl" | "batch", jobId: string, statusUrl: string, lastStatus: string);
5904
6016
  }
5905
6017
 
5906
- 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, type CostcoAutocompleteOptions, type CostcoAvailabilityOptions, type CostcoCategoriesOptions, type CostcoCategoryOptions, type CostcoClearanceOptions, type CostcoCountry, type CostcoCouponsOptions, type CostcoDealType, type CostcoDealsOptions, type CostcoGasOptions, type CostcoListingFilters, type CostcoNaCountry, CostcoNamespace, type CostcoPriceCode, type CostcoPricesOptions, type CostcoProductOptions, type CostcoReviewsOptions, type CostcoSearchOptions, type CostcoSortBy, type CostcoWarehousesOptions, DEFAULT_MAX_REQUESTS_PER_SECOND, EbayNamespace, type EbayProductOptions, type EbaySearchOptions, type EbaySellerOptions, type Extract, type ExtractBatchOptions, type ExtractCrawlOptions, type ExtractFormat, type ExtractJobCreatedResponse, type ExtractJobRequestOptions, type ExtractJobResult, type ExtractJobState, type ExtractJobStatusQuery, type ExtractJobStatusResponse, type ExtractJobSummary, type ExtractJobSummaryResponse, type ExtractJobWaitResponse, type ExtractMapLink, type ExtractMapOptions, type ExtractMapResponse, type ExtractMode, ExtractNamespace, type ExtractOptions, type ExtractSitemapMode, 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, type InstagramHighlightStoriesOptions, type InstagramKeywordOptions, type InstagramMusicPostsOptions, InstagramNamespace, type InstagramPostCommentsOptions, type InstagramPostLikersOptions, type InstagramPostOptions, type InstagramProfileOptions, type InstagramSearchOptions, type InstagramStoriesOptions, type InstagramUserFeedOptions, type InstagramUserRefOptions, 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 MercadoLibreBestSellersCountry, type MercadoLibreBestSellersOptions, type MercadoLibreCondition, type MercadoLibreCountry, type MercadoLibreDiscount, MercadoLibreNamespace, type MercadoLibreProductOptions, type MercadoLibreQuestionsOptions, type MercadoLibreReviewsOptions, type MercadoLibreSearchOptions, type MercadoLibreSort, type MetaAdsAdOptions, type MetaAdsAdvertiserOptions, MetaAdsNamespace, type MetaAdsSearchOptions, MissingAPIKeyError, NotFoundError, RateLimitError, type RealtorAgentOptions, type RealtorAgentsOptions, type RealtorListingStatus, type RealtorLocationsOptions, type RealtorMarketOptions, RealtorNamespace, type RealtorPropertyOptions, type RealtorPropertyType, type RealtorSearchOptions, type RealtorSort, type RedditCommentRepliesOptions, type RedditCommentSearchSort, type RedditFeedSort, RedditNamespace, type RedditPopularOptions, type RedditPostCommentsOptions, type RedditPostOptions, type RedditSearchCommentsOptions, type RedditSearchOptions, type RedditSearchSubredditsOptions, type RedditSearchSuggestionsOptions, type RedditSort, type RedditSubredditOptions, type RedditSubredditPostsOptions, type RedditUserFeedOptions, type RedditUserOptions, type RedfinMarketOptions, RedfinNamespace, type RedfinPropertyOptions, type RedfinSearchOptions, type RightmoveAgentOptions, type RightmoveAgentsOptions, type RightmoveExclude, type RightmoveFurnishing, type RightmoveLetType, type RightmoveListingStatus, type RightmoveLocationsOptions, type RightmoveMustHave, RightmoveNamespace, type RightmovePropertyOptions, type RightmovePropertyType, type RightmoveRadius, type RightmoveSearchOptions, type RightmoveSoldOptions, type RightmoveSoldPropertyOptions, type RightmoveSoldPropertyType, type RightmoveSoldSort, type RightmoveSort, type RightmoveTenure, type SECCompanyOptions, type SECConceptOptions, type SECFactsOptions, type SECFilingsOptions, type SECLookupOptions, SECNamespace, type SECSearchOptions, Scavio, ScavioAPIError, type ScavioConfig, ScavioConnectionError, ScavioError, ScavioJobTimeoutError, 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, type TikTokMusicChartOptions, type TikTokMusicOptions, type TikTokMusicVideosOptions, TikTokNamespace, type TikTokPlaylistVideosOptions, type TikTokProfileOptions, type TikTokSearchMusicOptions, type TikTokSearchSuggestionsOptions, 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 TikTokTrendingVideosOptions, type TikTokUserFollowersOptions, type TikTokUserFollowingsOptions, type TikTokUserPlaylistsOptions, type TikTokUserPostsOptions, type TikTokUserSimilarOptions, type TikTokUsernameOptions, type TikTokVideoCommentsOptions, type TikTokVideoOptions, type TikTokVideoTranscriptOptions, type TripadvisorLocationOptions, type TripadvisorLocationsOptions, TripadvisorNamespace, type TripadvisorReviewsOptions, type TripadvisorSearchOptions, type TrustpilotBusinessAddress, type TrustpilotBusinessOptions, type TrustpilotCategoriesOptions, type TrustpilotCategoryOptions, type TrustpilotCategorySort, TrustpilotNamespace, type TrustpilotReviewOptions, type TrustpilotReviewsDateRange, type TrustpilotReviewsOptions, type TrustpilotReviewsSort, type TrustpilotSearchOptions, type TrustpilotStars, type WalmartCategoryOptions, WalmartNamespace, type WalmartOffersOptions, type WalmartProductOptions, type WalmartReviewsOptions, type WalmartSearchOptions, type WalmartSellerOptions, type WalmartSellerProductsOptions, type WalmartStore, type WalmartStoresData, type WalmartStoresOptions, type WalmartStoresResponse, type XCommunityOptions, type XCommunityTweetsOptions, XNamespace, type XSearchCommunitiesOptions, 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 YouTubeCommunityPostCommentsOptions, type YouTubeCommunityPostOptions, type YouTubeMetadataOptions, YouTubeNamespace, type YouTubeRelatedOptions, type YouTubeSearchOptions, type YouTubeShortsOptions, type YouTubeStreamsOptions, type YouTubeSuggestionsOptions, type YouTubeTranscriptOptions, type YouTubeVideoOptions, type ZillowAgentReviewsOptions, ZillowNamespace, type ZillowPropertyOptions, type ZillowSearchOptions, verifyWebhook };
6018
+ 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, type CostcoAutocompleteOptions, type CostcoAvailabilityOptions, type CostcoCategoriesOptions, type CostcoCategoryOptions, type CostcoClearanceOptions, type CostcoCountry, type CostcoCouponsOptions, type CostcoDealType, type CostcoDealsOptions, type CostcoGasOptions, type CostcoListingFilters, type CostcoNaCountry, CostcoNamespace, type CostcoPriceCode, type CostcoPricesOptions, type CostcoProductOptions, type CostcoReviewsOptions, type CostcoSearchOptions, type CostcoSortBy, type CostcoWarehousesOptions, DEFAULT_MAX_REQUESTS_PER_SECOND, EbayNamespace, type EbayProductOptions, type EbaySearchOptions, type EbaySellerOptions, type Extract, type ExtractBatchOptions, type ExtractCrawlOptions, type ExtractFormat, type ExtractJobCreatedResponse, type ExtractJobRequestOptions, type ExtractJobResult, type ExtractJobState, type ExtractJobStatusQuery, type ExtractJobStatusResponse, type ExtractJobSummary, type ExtractJobSummaryResponse, type ExtractJobWaitResponse, type ExtractMapLink, type ExtractMapOptions, type ExtractMapResponse, type ExtractMode, ExtractNamespace, type ExtractOptions, type ExtractSitemapMode, 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 GoogleCustomSearchItem, type GoogleCustomSearchOptions, type GoogleCustomSearchQuery, type GoogleCustomSearchResponse, 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, type InstagramHighlightStoriesOptions, type InstagramKeywordOptions, type InstagramMusicPostsOptions, InstagramNamespace, type InstagramPostCommentsOptions, type InstagramPostLikersOptions, type InstagramPostOptions, type InstagramProfileOptions, type InstagramSearchOptions, type InstagramStoriesOptions, type InstagramUserFeedOptions, type InstagramUserRefOptions, 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 MercadoLibreBestSellersCountry, type MercadoLibreBestSellersOptions, type MercadoLibreCondition, type MercadoLibreCountry, type MercadoLibreDiscount, MercadoLibreNamespace, type MercadoLibreProductOptions, type MercadoLibreQuestionsOptions, type MercadoLibreReviewsOptions, type MercadoLibreSearchOptions, type MercadoLibreSort, type MetaAdsAdOptions, type MetaAdsAdvertiserOptions, MetaAdsNamespace, type MetaAdsSearchOptions, MissingAPIKeyError, NotFoundError, RateLimitError, type RealtorAgentOptions, type RealtorAgentsOptions, type RealtorListingStatus, type RealtorLocationsOptions, type RealtorMarketOptions, RealtorNamespace, type RealtorPropertyOptions, type RealtorPropertyType, type RealtorSearchOptions, type RealtorSort, type RedditCommentRepliesOptions, type RedditCommentSearchSort, type RedditFeedSort, RedditNamespace, type RedditPopularOptions, type RedditPostCommentsOptions, type RedditPostOptions, type RedditSearchCommentsOptions, type RedditSearchOptions, type RedditSearchSubredditsOptions, type RedditSearchSuggestionsOptions, type RedditSort, type RedditSubredditOptions, type RedditSubredditPostsOptions, type RedditUserFeedOptions, type RedditUserOptions, type RedfinMarketOptions, RedfinNamespace, type RedfinPropertyOptions, type RedfinSearchOptions, type RightmoveAgentOptions, type RightmoveAgentsOptions, type RightmoveExclude, type RightmoveFurnishing, type RightmoveLetType, type RightmoveListingStatus, type RightmoveLocationsOptions, type RightmoveMustHave, RightmoveNamespace, type RightmovePropertyOptions, type RightmovePropertyType, type RightmoveRadius, type RightmoveSearchOptions, type RightmoveSoldOptions, type RightmoveSoldPropertyOptions, type RightmoveSoldPropertyType, type RightmoveSoldSort, type RightmoveSort, type RightmoveTenure, type SECCompanyOptions, type SECConceptOptions, type SECFactsOptions, type SECFilingsOptions, type SECLookupOptions, SECNamespace, type SECSearchOptions, Scavio, ScavioAPIError, type ScavioConfig, ScavioConnectionError, ScavioError, ScavioJobTimeoutError, 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, type TikTokMusicChartOptions, type TikTokMusicOptions, type TikTokMusicVideosOptions, TikTokNamespace, type TikTokPlaylistVideosOptions, type TikTokProfileOptions, type TikTokSearchMusicOptions, type TikTokSearchSuggestionsOptions, 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 TikTokTrendingVideosOptions, type TikTokUserFollowersOptions, type TikTokUserFollowingsOptions, type TikTokUserPlaylistsOptions, type TikTokUserPostsOptions, type TikTokUserSimilarOptions, type TikTokUsernameOptions, type TikTokVideoCommentsOptions, type TikTokVideoOptions, type TikTokVideoTranscriptOptions, type TripadvisorLocationOptions, type TripadvisorLocationsOptions, TripadvisorNamespace, type TripadvisorReviewsOptions, type TripadvisorSearchOptions, type TrustpilotBusinessAddress, type TrustpilotBusinessOptions, type TrustpilotCategoriesOptions, type TrustpilotCategoryOptions, type TrustpilotCategorySort, TrustpilotNamespace, type TrustpilotReviewOptions, type TrustpilotReviewsDateRange, type TrustpilotReviewsOptions, type TrustpilotReviewsSort, type TrustpilotSearchOptions, type TrustpilotStars, type WalmartCategoryOptions, WalmartNamespace, type WalmartOffersOptions, type WalmartProductOptions, type WalmartReviewsOptions, type WalmartSearchOptions, type WalmartSellerOptions, type WalmartSellerProductsOptions, type WalmartStore, type WalmartStoresData, type WalmartStoresOptions, type WalmartStoresResponse, type XCommunityOptions, type XCommunityTweetsOptions, XNamespace, type XSearchCommunitiesOptions, 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 YouTubeCommunityPostCommentsOptions, type YouTubeCommunityPostOptions, type YouTubeMetadataOptions, YouTubeNamespace, type YouTubeRelatedOptions, type YouTubeSearchOptions, type YouTubeShortsOptions, type YouTubeStreamsOptions, type YouTubeSuggestionsOptions, type YouTubeTranscriptOptions, type YouTubeVideoOptions, type ZillowAgentReviewsOptions, ZillowNamespace, type ZillowPropertyOptions, type ZillowSearchOptions, verifyWebhook };
package/dist/index.js CHANGED
@@ -145,7 +145,7 @@ function parseRetryAfter(header) {
145
145
  var BASE_URL = "https://api.scavio.dev";
146
146
  var DEFAULT_TIMEOUT = 3e4;
147
147
  var DEFAULT_MAX_RETRIES = 2;
148
- var SDK_VERSION = true ? "0.24.0" : "0.0.0";
148
+ var SDK_VERSION = true ? "0.25.0" : "0.0.0";
149
149
  var USER_AGENT = `scavio-js/${SDK_VERSION}`;
150
150
  function isServerRuntime() {
151
151
  const g = globalThis;
@@ -334,6 +334,15 @@ var AmazonNamespace = class {
334
334
  };
335
335
 
336
336
  // src/namespaces/google.ts
337
+ var CUSTOM_SEARCH_WIRE = {
338
+ date_restrict: "dateRestrict",
339
+ site_search: "siteSearch",
340
+ site_search_filter: "siteSearchFilter",
341
+ exact_terms: "exactTerms",
342
+ exclude_terms: "excludeTerms",
343
+ or_terms: "orTerms",
344
+ file_type: "fileType"
345
+ };
337
346
  var GoogleNamespace = class {
338
347
  constructor(client) {
339
348
  this.client = client;
@@ -343,6 +352,21 @@ var GoogleNamespace = class {
343
352
  async search(options) {
344
353
  return this.client._post("/api/v2/google", options);
345
354
  }
355
+ /**
356
+ * Google search in the Custom Search JSON API format: a drop-in for cse.list.
357
+ * Returns customsearch#search (items[], searchInformation, queries.nextPage)
358
+ * plus a scavio billing object, so CSE parsing code keeps working. For the
359
+ * full SERP (knowledge graph, AI overview, People Also Ask) use search().
360
+ * Unsupported CSE params (image search, sort, rights) throw BadRequestError.
361
+ * 1 credit.
362
+ */
363
+ async customSearch(options) {
364
+ const body = {};
365
+ for (const [key, value] of Object.entries(options)) {
366
+ body[CUSTOM_SEARCH_WIRE[key] ?? key] = value;
367
+ }
368
+ return await this.client._post("/api/v1/google/customsearch", body);
369
+ }
346
370
  /** Google AI Mode answer. */
347
371
  async aiMode(options) {
348
372
  return this.client._post("/api/v2/google/ai-mode", options);
@@ -1105,14 +1129,14 @@ var LinkedInNamespace = class {
1105
1129
  return this.client._post("/api/v1/linkedin/post/comments", options);
1106
1130
  }
1107
1131
  /**
1108
- * @deprecated Retired by the upstream provider. Always returns HTTP 410 and is
1132
+ * @deprecated Retired. Always returns HTTP 410 and is
1109
1133
  * never billed.
1110
1134
  */
1111
1135
  async personContact(options) {
1112
1136
  return this.client._post("/api/v1/linkedin/person/contact", options);
1113
1137
  }
1114
1138
  /**
1115
- * @deprecated Retired by the upstream provider. Always returns HTTP 410 and is
1139
+ * @deprecated Retired. Always returns HTTP 410 and is
1116
1140
  * never billed. `company()` returns `featured_employees`, a small sample of
1117
1141
  * staff profiles.
1118
1142
  */
@@ -1120,21 +1144,21 @@ var LinkedInNamespace = class {
1120
1144
  return this.client._post("/api/v1/linkedin/company/people", options);
1121
1145
  }
1122
1146
  /**
1123
- * @deprecated Retired by the upstream provider. Always returns HTTP 410 and is
1147
+ * @deprecated Retired. Always returns HTTP 410 and is
1124
1148
  * never billed. Use `searchJobs()` with the company name as the search term.
1125
1149
  */
1126
1150
  async companyJobs(options) {
1127
1151
  return this.client._post("/api/v1/linkedin/company/jobs", options);
1128
1152
  }
1129
1153
  /**
1130
- * @deprecated Retired by the upstream provider. Always returns HTTP 410 and is
1154
+ * @deprecated Retired. Always returns HTTP 410 and is
1131
1155
  * never billed.
1132
1156
  */
1133
1157
  async searchPeople(options) {
1134
1158
  return this.client._post("/api/v1/linkedin/search/people", options);
1135
1159
  }
1136
1160
  /**
1137
- * @deprecated Retired by the upstream provider. Always returns HTTP 410 and is
1161
+ * @deprecated Retired. Always returns HTTP 410 and is
1138
1162
  * never billed.
1139
1163
  */
1140
1164
  async searchPosts(options) {
@@ -1394,7 +1418,7 @@ var TargetNamespace = class {
1394
1418
  * Paged with `page` + `count` (1-28, default 24). `seller_id` and
1395
1419
  * `seller_name` are null on first-party rows, which means "sold by Target".
1396
1420
  *
1397
- * Costs 1 credit. Typically ~9s - it runs through a headless browser.
1421
+ * Costs 1 credit. Typically ~9s.
1398
1422
  */
1399
1423
  async search(options) {
1400
1424
  return this.client._post("/api/v1/target/search", options);
@@ -1560,9 +1584,8 @@ var RedfinNamespace = class {
1560
1584
  * houses, schools, climate risk, walkability and location scores, sun
1561
1585
  * exposure, monthly weather, permits, zoning, comparable sales and photos.
1562
1586
  *
1563
- * Reads the property PAGE, whose inlined request cache replaces the ~40
1564
- * upstream calls that page made - which is why it is the same price as
1565
- * search().
1587
+ * Returns the whole property page in one call, which is why it is the same
1588
+ * price as search().
1566
1589
  *
1567
1590
  * Costs 1 credit. Single response, no pagination.
1568
1591
  */
@@ -1792,7 +1815,7 @@ var YelpNamespace = class {
1792
1815
  * count.
1793
1816
  *
1794
1817
  * `term` + `location` or `url` is required, and `location` is effectively
1795
- * mandatory - Yelp geolocates a location-less search off the proxy exit.
1818
+ * mandatory - without it Yelp picks a location itself.
1796
1819
  * Paged with `page`; the page size is fixed at 10.
1797
1820
  *
1798
1821
  * Costs 2 credits.
@@ -1864,8 +1887,7 @@ var IndeedNamespace = class {
1864
1887
  * employment types, benefits, geocoded address, employer rating, applicant
1865
1888
  * count and the original ATS link.
1866
1889
  *
1867
- * Single response, no pagination. An unknown job key is a real 404 that
1868
- * scrape.do BILLS - take `job_id` from a search row.
1890
+ * Single response, no pagination. An unknown job key is a real 404 and IS BILLED - take `job_id` from a search row.
1869
1891
  *
1870
1892
  * Costs 2 credits.
1871
1893
  */
@@ -1877,8 +1899,7 @@ var IndeedNamespace = class {
1877
1899
  * approval, overall and per-category ratings, reported salaries, open roles
1878
1900
  * and locations.
1879
1901
  *
1880
- * Single response, no pagination. An unknown company slug is a real 404
1881
- * that scrape.do BILLS.
1902
+ * Single response, no pagination. An unknown company slug is a real 404 and IS BILLED.
1882
1903
  *
1883
1904
  * Costs 2 credits.
1884
1905
  */
@@ -1926,7 +1947,7 @@ var GlassdoorNamespace = class {
1926
1947
  * server-rendered reviews, AND reviews_url / salaries_url.
1927
1948
  *
1928
1949
  * THE CHAINING ENDPOINT: pass reviews_url / salaries_url back as `url` on
1929
- * reviews() and salaries() to halve the upstream fetches. `employer_id` or
1950
+ * reviews() and salaries() to halve the lookups. `employer_id` or
1930
1951
  * `url` is required - `company` is cosmetic and does not satisfy it.
1931
1952
  *
1932
1953
  * Costs 1 credit. Single response, no pagination. Typically ~3-47s.
@@ -2250,7 +2271,7 @@ var SECNamespace = class {
2250
2271
  * filer had more.
2251
2272
  *
2252
2273
  * Costs 1 credit - including with `include_history`, which is the one call
2253
- * that can buy more than one upstream fetch.
2274
+ * that can buy more than one lookup.
2254
2275
  */
2255
2276
  async filings(options) {
2256
2277
  return this.client._post("/api/v1/sec/filings", options);