scavio 0.20.1 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,14 +1,14 @@
1
1
  # Scavio
2
2
 
3
3
  TypeScript SDK for the [Scavio API](https://scavio.dev?utm_source=npm-scavio-js&utm_medium=package&utm_campaign=readme) — real-time web scraping
4
- and data extraction across 35 platforms on one API key, plus `extract()` to read
4
+ and data extraction across 36 platforms on one API key, plus `extract()` to read
5
5
  any URL as clean Markdown.
6
6
 
7
7
  Structured JSON in, structured JSON out. No proxies, no headless browsers, no
8
8
  per-site parsers to maintain.
9
9
 
10
10
  - **Search and SERP** — Google (organic, news, maps, shopping, flights, hotels, trends, AI Mode)
11
- - **E-commerce** — Amazon, Walmart, Costco, eBay, Target, Home Depot, TikTok Shop
11
+ - **E-commerce** — Amazon, Walmart, Costco, Mercado Libre, eBay, Target, Home Depot, TikTok Shop
12
12
  - **Real estate and travel** — Zillow, Redfin, Realtor.com, Rightmove, Booking, Airbnb, Tripadvisor
13
13
  - **Reviews and local** — Trustpilot, Yelp, G2, Capterra, Glassdoor, App Store, Google Play
14
14
  - **Jobs and companies** — Indeed, Glassdoor, SEC EDGAR, Companies House
@@ -308,6 +308,53 @@ warehouses on us and 2 per warehouse on ca). The clearance price codes are the
308
308
  member-community decode of Costco shelf prices; Costco does not publish them,
309
309
  and only items Costco lists online are covered.
310
310
 
311
+ ### Mercado Libre
312
+
313
+ Five endpoints, new in 0.21.0: `reviews` costs 1 credit, the other four 2. The
314
+ `best-sellers` endpoint is `bestSellers()`. Mexico (`mx`), Brazil (`br`,
315
+ Mercado Livre), Argentina (`ar`) and Colombia (`co`); prices come back in MXN,
316
+ BRL, ARS or COP. Chile is not supported.
317
+
318
+ ```typescript
319
+ // Keyword search: about 48 rows per page, up to 42 pages.
320
+ const found = await client.mercadolibre.search({
321
+ country: "mx",
322
+ query: "iphone 15",
323
+ condition: "new",
324
+ free_shipping: true,
325
+ sort: "price_asc", // relevance (default), price_asc or price_desc
326
+ });
327
+
328
+ // A seller's catalogue: by numeric seller_id (filters and paging work), or by
329
+ // nickname (first page, unfiltered, plus the seller_id).
330
+ await client.mercadolibre.search({ country: "mx", seller_id: "527927603", min_discount: 20 });
331
+ await client.mercadolibre.search({ country: "mx", seller_nickname: "MERCADOLIBRE ELECTRONICA_MX" });
332
+
333
+ // One product or listing: buy-box seller with reputation, variations, star
334
+ // distribution, specs. Exactly one of url, product_id or item_id.
335
+ await client.mercadolibre.product({ product_id: "MLM1027172667" });
336
+
337
+ // Reviews, 15 per page, optionally by star rating (1 credit).
338
+ await client.mercadolibre.reviews({ product_id: "MLM1027172667", rating: 1 });
339
+
340
+ // Buyer questions with the seller's answers; page with next_offset.
341
+ await client.mercadolibre.questions({ item_id: "MLM3571336480" });
342
+
343
+ // Top 20 best sellers in a category (mx, ar or co; not Brazil).
344
+ await client.mercadolibre.bestSellers({ country: "mx", category_id: "MLM1055" });
345
+ ```
346
+
347
+ A query reaches about 2,000 results (42 pages of 48), so slice by price range,
348
+ condition or seller to go further. Units sold are lower bounds
349
+ (`sold_quantity_min`, e.g. "+1000 vendidos"), not exact counts, and sort is
350
+ relevance or price only. Mercado Libre may narrow a query to a category, brand
351
+ or line on its own, and Brazil and Argentina may auto-apply a "new" condition;
352
+ `auto_applied_filters` lists what it applied. `product` returns only the
353
+ buy-box seller. Reviews translated into the site's language keep
354
+ `original_text`. Questions carry answer dates but no question dates. A
355
+ zero-result search is an empty, billed page; an unknown product, item or seller
356
+ nickname, or a listing with no public questions, is a billed 404.
357
+
311
358
  ### YouTube
312
359
 
313
360
  Credit cost varies by endpoint: `transcript` costs 8; `streams` costs 3;
@@ -732,7 +779,8 @@ const comps = await client.realtor.search({
732
779
  page_size: 200,
733
780
  });
734
781
 
735
- // Listing-text keyword watch, a radius search, or one agent's listings.
782
+ // Listing-text keyword watch (a listing must contain ALL the keywords, so each
783
+ // extra keyword narrows the results), a radius search, or one agent's listings.
736
784
  await client.realtor.search({ location: "Austin, TX", keywords: ["workshop"] });
737
785
  await client.realtor.search({ latitude: 30.27, longitude: -97.74, radius_miles: 5 });
738
786
  await client.realtor.search({ agent_id: "1918615" });
@@ -1170,7 +1218,7 @@ key, structured JSON, no proxies or browser farms to run. It is a real-time
1170
1218
  What teams build on it:
1171
1219
 
1172
1220
  - **SERP and answer engines** — [Google Search API](https://scavio.dev/google-search-api?utm_source=npm-scavio-js&utm_medium=package&utm_campaign=readme) for organic results, news, images, maps and the knowledge graph
1173
- - **Price and catalog monitoring** — [Amazon Product API](https://scavio.dev/amazon-product-api?utm_source=npm-scavio-js&utm_medium=package&utm_campaign=readme), [Walmart Product API](https://scavio.dev/walmart-product-api?utm_source=npm-scavio-js&utm_medium=package&utm_campaign=readme), eBay, Target and Home Depot product, review and seller data
1221
+ - **Price and catalog monitoring** — [Amazon Product API](https://scavio.dev/amazon-product-api?utm_source=npm-scavio-js&utm_medium=package&utm_campaign=readme), [Walmart Product API](https://scavio.dev/walmart-product-api?utm_source=npm-scavio-js&utm_medium=package&utm_campaign=readme), eBay, Target and Home Depot product, review and seller data, Mercado Libre listings, reviews and best sellers in Mexico, Brazil, Argentina and Colombia
1174
1222
  - **Real estate and travel pipelines** — Zillow, Redfin and Realtor.com listings and market stats, Rightmove UK listings and England and Wales sold prices since 1995, Booking, Airbnb and Tripadvisor rates and reviews
1175
1223
  - **Review mining and competitive research** — Trustpilot, Yelp, G2, Capterra, Glassdoor, App Store and Google Play reviews on one shape
1176
1224
  - **Recruiting and company intelligence** — Indeed jobs, Glassdoor salaries, SEC EDGAR filings and XBRL facts, UK Companies House officers and filing history
package/dist/index.cjs CHANGED
@@ -43,6 +43,7 @@ __export(index_exports, {
43
43
  KuaishouNamespace: () => KuaishouNamespace,
44
44
  LinkedInNamespace: () => LinkedInNamespace,
45
45
  MAX_REQUESTS_PER_SECOND: () => MAX_REQUESTS_PER_SECOND,
46
+ MercadoLibreNamespace: () => MercadoLibreNamespace,
46
47
  MetaAdsNamespace: () => MetaAdsNamespace,
47
48
  MissingAPIKeyError: () => MissingAPIKeyError,
48
49
  NotFoundError: () => NotFoundError,
@@ -202,7 +203,7 @@ function parseRetryAfter(header) {
202
203
  var BASE_URL = "https://api.scavio.dev";
203
204
  var DEFAULT_TIMEOUT = 3e4;
204
205
  var DEFAULT_MAX_RETRIES = 2;
205
- var SDK_VERSION = true ? "0.20.1" : "0.0.0";
206
+ var SDK_VERSION = true ? "0.21.0" : "0.0.0";
206
207
  var USER_AGENT = `scavio-js/${SDK_VERSION}`;
207
208
  function isServerRuntime() {
208
209
  const g = globalThis;
@@ -2721,6 +2722,76 @@ var RightmoveNamespace = class {
2721
2722
  }
2722
2723
  };
2723
2724
 
2725
+ // src/namespaces/mercadolibre.ts
2726
+ var MercadoLibreNamespace = class {
2727
+ constructor(client) {
2728
+ this.client = client;
2729
+ }
2730
+ client;
2731
+ /**
2732
+ * Search Mercado Libre listings in Mexico, Brazil (Mercado Livre), Argentina
2733
+ * or Colombia by keyword or seller, with condition, price range, discount,
2734
+ * free shipping, Full fulfillment, official stores and interest-free
2735
+ * installment filters, sorted by relevance or price. Each row has price,
2736
+ * list price, discount, installments, seller and official-store flag where
2737
+ * shown, rating, units sold as a lower bound ("at least 500"), shipping
2738
+ * flags, a sponsored flag and catalog ids. About 48 rows per page and 42
2739
+ * pages (about 2,000 results) per query.
2740
+ *
2741
+ * Costs 2 credits.
2742
+ */
2743
+ async search(options) {
2744
+ return this.client._post("/api/v1/mercadolibre/search", options);
2745
+ }
2746
+ /**
2747
+ * One Mercado Libre catalog product or listing: title, price, list price,
2748
+ * installments, promotions, the buy-box seller with reputation level and
2749
+ * seller tier, stock, shipping, rating with its star distribution,
2750
+ * variations with sibling product ids, specs, description, pictures and
2751
+ * categories. Only the buy-box seller is returned; units sold is a lower
2752
+ * bound. Some fields are null where the page omits them. Pass exactly one of
2753
+ * url, product_id or item_id; the id prefix (MLM, MLB, MLA, MCO) sets the
2754
+ * country.
2755
+ *
2756
+ * Costs 2 credits.
2757
+ */
2758
+ async product(options) {
2759
+ return this.client._post("/api/v1/mercadolibre/product", options);
2760
+ }
2761
+ /**
2762
+ * One page of up to 15 Mercado Libre product reviews (page until a page
2763
+ * comes back empty), optionally filtered by star rating: rating, text, the
2764
+ * original text when Mercado Libre translated it, exact date, likes, the
2765
+ * review's country and photos. Catalog products pool reviews from several
2766
+ * countries. Totals and the star distribution come from product().
2767
+ *
2768
+ * Costs 1 credit.
2769
+ */
2770
+ async reviews(options) {
2771
+ return this.client._post("/api/v1/mercadolibre/reviews", options);
2772
+ }
2773
+ /**
2774
+ * A page of buyer questions on a Mercado Libre listing with the seller's
2775
+ * answers and answer dates (Mercado Libre shows no question dates). Page
2776
+ * through with next_offset. A listing with no public questions returns 404.
2777
+ *
2778
+ * Costs 2 credits.
2779
+ */
2780
+ async questions(options) {
2781
+ return this.client._post("/api/v1/mercadolibre/questions", options);
2782
+ }
2783
+ /**
2784
+ * The ranked top 20 best sellers in a Mercado Libre category in Mexico,
2785
+ * Argentina or Colombia, with price, discount, installments, rating, units
2786
+ * sold as a lower bound and seller where shown. Not available for Brazil.
2787
+ *
2788
+ * Costs 2 credits.
2789
+ */
2790
+ async bestSellers(options) {
2791
+ return this.client._post("/api/v1/mercadolibre/best-sellers", options);
2792
+ }
2793
+ };
2794
+
2724
2795
  // src/client.ts
2725
2796
  var DEFAULT_MAX_REQUESTS_PER_SECOND = 1;
2726
2797
  var MAX_REQUESTS_PER_SECOND = 50;
@@ -2760,6 +2831,7 @@ var Scavio = class {
2760
2831
  trustpilot;
2761
2832
  realtor;
2762
2833
  rightmove;
2834
+ mercadolibre;
2763
2835
  apiKey;
2764
2836
  baseUrl;
2765
2837
  timeout;
@@ -2815,6 +2887,7 @@ var Scavio = class {
2815
2887
  this.trustpilot = new TrustpilotNamespace(this);
2816
2888
  this.realtor = new RealtorNamespace(this);
2817
2889
  this.rightmove = new RightmoveNamespace(this);
2890
+ this.mercadolibre = new MercadoLibreNamespace(this);
2818
2891
  }
2819
2892
  /** @internal */
2820
2893
  async _post(path, body) {
@@ -2896,6 +2969,7 @@ var Scavio = class {
2896
2969
  KuaishouNamespace,
2897
2970
  LinkedInNamespace,
2898
2971
  MAX_REQUESTS_PER_SECOND,
2972
+ MercadoLibreNamespace,
2899
2973
  MetaAdsNamespace,
2900
2974
  MissingAPIKeyError,
2901
2975
  NotFoundError,