# Magalu API scraper — magazineluiza.com.br (Brazil): search and browse products with the card price, PIX price, struck list price and interest-free installments kept apart, coupons, Magalu or marketplace seller with seller rating, EAN, specifications, variants, ratings and reviews, and delivery quotes by CEP. No account, no browser.

> Search Magalu by keyword. Each product comes with the card price, the PIX price and its discount, the struck list price, the best interest-free installment plan, any coupon (not applied to the price), the seller (Magalu itself or a marketplace seller), availability, rating and review count, badges and category. Sort by price, best sellers, rating, newest or fastest delivery; filter by brand, seller, price range, category or subcategory. Sponsored rows are removed and counted.
> ReefAPI engine `magalu` · 6 endpoints · clean JSON, no scraping or browsers to manage.

## How to call
- **Endpoint:** `POST https://api.reefapi.com/magalu/v1/<action>` with a JSON body.
- **Auth:** header `x-api-key: <YOUR_REEFAPI_KEY>` — create one free (1,000 credits, no card): https://reefapi.com/signup
- **Response (every call):** `{ ok: boolean, data: ..., meta: { record_count, credits, ... }, error: { code, message } }` — branch on `ok`. Failed calls are free except verified SHEIN NOT_FOUND on product/detail and price (4 credits).
- **One key + one shared credit pool** across every ReefAPI API. Per-call credits are listed on each endpoint below.
- **Use it from an AI agent (MCP):** connect `https://api.reefapi.com/mcp` (remote streamable-http, `Authorization: Bearer <key>`) and your assistant can call these actions directly.

## Endpoints

### POST /magalu/v1/search — 1 credit
Search Magalu by keyword. Each product comes with the card price, the PIX price and its discount, the struck list price, the best interest-free installment plan, any coupon (not applied to the price), the seller (Magalu itself or a marketplace seller), availability, rating and review count, badges and category. Sort by price, best sellers, rating, newest or fastest delivery; filter by brand, seller, price range, category or subcategory. Sponsored rows are removed and counted.

**Parameters:**
- `query` (string, required) — Words a shopper would type on Magalu (Portuguese).
- `country` (enum, optional, default "br") — Magalu sells in Brazil only (magazineluiza.com.br, BRL). [one of: br]
- `page` (integer, optional, default 1) — Result page, from 1. Magalu serves 100 pages at most.
- `page_size` (integer, optional, default 40) — Products per page (Magalu's own page shows 40).
- `sort` (enum, optional, default "relevance") — Magalu's own sort orders. price_asc / price_desc order by the BEST price Magalu shows (the PIX price when there is one), not by the card price. [one of: relevance, price_asc, price_desc, bestsellers, rating, newest, fastest_delivery]
- `brand` (string, optional) — One brand, as the `value` in filters_available.brands (e.g. electrolux).
- `seller` (string, optional) — One seller id, as in filters_available.sellers or a row's seller.id (magazineluiza = sold by Magalu itself).
- `min_price` (number, optional) — Lowest price in BRL (reais). Magalu applies it to the best price (PIX when offered), not the card price, and lets a few rows just outside the range through.
- `max_price` (number, optional) — Highest price in BRL (reais), applied by Magalu to the best price (PIX when offered).
- `category_id` (string, optional) — Limit to one Magalu category id (a row's category.id, e.g. TE).
- `subcategory_id` (string, optional) — Limit to one Magalu subcategory id (a row's subcategory.id, e.g. IP17).
- `include_sponsored` (boolean, optional, default false) — Rows Magalu marks as sponsored are left out and counted in sponsored_dropped. true: they are returned with sponsored true.
- `include_fallback_results` (boolean, optional, default false) — When no product matches the keyword, Magalu sometimes fills the page with unrelated products. They are dropped and counted in fallback_results_dropped; true returns them separately in fallback_results.
- `max_rotations` (integer, optional, default 3) — How many fresh exits to try before giving up.

**Returns:** results[]{product_id, type, title, brand, url, image, price, pix_price, pix_discount_pct, list_price, discount_pct, best_price_other_method, installments{count, amount, total, interest_free, label}, currency, price_source, coupon{code, discount_type, discount_value, message, valid_from, valid_until}, offer_discounts[], seller{id, sku, is_magalu, name}, availability, search_index_rating, search_index_review_count (search-index figures; product/detail has the product page's), rating_scale, badges[], max_quantity, has_variants, category{id, name}, subcategory{id, name}, sponsored}, count (organic rows), sponsored_dropped, sponsored_included, fallback_results_dropped, total_results, total_results_capped, total_pages, page, page_size, has_more, page_notice, filters_available{brands[], sellers[], categories[] ({value, label, count}), price_range{min, max}, attributes[]{name, slug, values[]}}, sort, applied_filters, country, currency, query, matched_query, keyword_matches_on_page, fallback_total, fallback_results[] (opt-in)

**Example request body:**
```json
{
  "query": "geladeira"
}
```

### POST /magalu/v1/category — 1 credit
Every product in a Magalu category or subcategory (by id such as TE / IP17, or by the category URL), paged, with the same rows, sorts and filters as search.

**Parameters:**
- `category` (string, required) — A Magalu category id (TE) or a category / subcategory URL (/celulares-e-smartphones/l/te/ or /iphone-17/celulares-e-smartphones/s/te/ip17/).
- `subcategory` (string, optional) — A subcategory id inside the category (IP17). A subcategory URL sets it by itself.
- `country` (enum, optional, default "br") — Magalu sells in Brazil only (magazineluiza.com.br, BRL). [one of: br]
- `page` (integer, optional, default 1) — Result page, from 1. Magalu serves 100 pages at most.
- `page_size` (integer, optional, default 40) — Products per page (Magalu's own page shows 40).
- `sort` (enum, optional, default "relevance") — Magalu's own sort orders. price_asc / price_desc order by the BEST price Magalu shows (the PIX price when there is one), not by the card price. [one of: relevance, price_asc, price_desc, bestsellers, rating, newest, fastest_delivery]
- `brand` (string, optional) — One brand, as the `value` in filters_available.brands (e.g. electrolux).
- `seller` (string, optional) — One seller id, as in filters_available.sellers or a row's seller.id (magazineluiza = sold by Magalu itself).
- `min_price` (number, optional) — Lowest price in BRL (reais). Magalu applies it to the best price (PIX when offered), not the card price, and lets a few rows just outside the range through.
- `max_price` (number, optional) — Highest price in BRL (reais), applied by Magalu to the best price (PIX when offered).
- `include_sponsored` (boolean, optional, default false) — Rows Magalu marks as sponsored are left out and counted in sponsored_dropped. true: they are returned with sponsored true.
- `max_rotations` (integer, optional, default 3) — How many fresh exits to try before giving up.

**Returns:** results[]{product_id, type, title, brand, url, image, price, pix_price, pix_discount_pct, list_price, discount_pct, best_price_other_method, installments{count, amount, total, interest_free, label}, currency, price_source, coupon{code, discount_type, discount_value, message, valid_from, valid_until}, offer_discounts[], seller{id, sku, is_magalu, name}, availability, search_index_rating, search_index_review_count (search-index figures; product/detail has the product page's), rating_scale, badges[], max_quantity, has_variants, category{id, name}, subcategory{id, name}, sponsored}, count (organic rows), sponsored_dropped, sponsored_included, fallback_results_dropped, total_results, total_results_capped, total_pages, page, page_size, has_more, page_notice, filters_available{brands[], sellers[], categories[] ({value, label, count}), price_range{min, max}, attributes[]{name, slug, values[]}}, sort, applied_filters, country, currency, category_id, subcategory_id

### POST /magalu/v1/product/detail — 1 credit
The full Magalu product record by id or URL: title, brand, EAN, reference, card price, PIX price, list price and discount, best installment plan, coupon, promotions, the seller (Magalu or marketplace) with seller rating, total sales and response/delivery reputation, availability including out-of-stock items, rating with distribution, description, specifications, images, videos, variants with their own ids, package dimensions and category breadcrumb.

**Parameters:**
- `product_id` (string, required) — A Magalu product id (the code after /p/ in a product URL, e.g. 241267100 or gf8hj05ja2) or the product URL.
- `country` (enum, optional, default "br") — Magalu sells in Brazil only (magazineluiza.com.br, BRL). [one of: br]
- `max_rotations` (integer, optional, default 3) — How many fresh exits to try before giving up.

**Returns:** product{product_id, type, title, brand, brand_slug, ean, reference, product_type, url, price, pix_price, pix_discount_pct, list_price, discount_pct, best_price_other_method, installments{}, currency, price_source, coupon{}, promotions[], offer_discounts[], badges[], seller{id, name, is_magalu, sku, delivered_by, seller_since, rating, rating_scale, total_sales, answer_rate, delivery_rate, city, state}, marketplace, availability, max_quantity, minimum_order_quantity, offer_timer, rating, review_count, rating_scale, comment_count, rating_distribution{}, description, specifications{name: value}, images[], videos[], variants[]{attribute, value, product_id, available, url, selected}, variant_count, package{length_m, width_m, height_m, weight_kg}, category, subcategory, breadcrumb[], tags[], is_buy_box}, country, currency

**Example request body:**
```json
{
  "product_id": "241267100"
}
```

### POST /magalu/v1/product/reviews — 1 credit
Customer reviews of a Magalu product, paged and sorted (most relevant, newest, positive, negative), with rating, title, text, date, reviewer first name, the variant bought and review photos, plus the average rating, rating count and star distribution.

**Parameters:**
- `product_id` (string, required) — A Magalu product id (the code after /p/ in a product URL, e.g. 241267100 or gf8hj05ja2) or the product URL.
- `country` (enum, optional, default "br") — Magalu sells in Brazil only (magazineluiza.com.br, BRL). [one of: br]
- `page` (integer, optional, default 1) — Review page, from 1.
- `page_size` (integer, optional, default 10) — Reviews per page (Magalu's own page shows 8).
- `sort` (enum, optional, default "relevant") — Magalu's own review orders. [one of: relevant, newest, positive, negative]
- `max_rotations` (integer, optional, default 3) — How many fresh exits to try before giving up.

**Returns:** reviews[]{review_id, rating, title, text, date, author, variant{}, reviewed_product_id, images[]}, count, page, page_size, total_reviews (reviews with text), total_pages, has_more, average_rating, rating_count (all ratings), rating_scale, comment_count, rating_distribution{}, product_id, sort, country

**Example request body:**
```json
{
  "product_id": "241267100"
}
```

### POST /magalu/v1/product/shipping — 1 credit
Delivery options and prices for a Magalu product to a Brazilian CEP, as Magalu quotes them on the product page: standard delivery and store pickup with cost, working days or hours, expected delivery dates and who ships it.

**Parameters:**
- `product_id` (string, required) — A Magalu product id (the code after /p/ in a product URL, e.g. 241267100 or gf8hj05ja2) or the product URL.
- `zipcode` (string, required) — Brazilian CEP, 8 digits (01310-100 or 01310100).
- `quantity` (integer, optional, default 1) — Units to quote.
- `country` (enum, optional, default "br") — Magalu sells in Brazil only (magazineluiza.com.br, BRL). [one of: br]
- `max_rotations` (integer, optional, default 3) — How many fresh exits to try before giving up.

**Returns:** options[]{type, name, cost, free, currency, time_unit, time_min, time_max, delivery_date_min, delivery_date_max, description}, count, deliverable, shipping_status, message, shipped_by, disclaimers[], product_id, seller_id, zipcode, quantity, country

### POST /magalu/v1/search/suggest — 1 credit
Magalu's search-box suggestions for what a shopper has typed.

**Parameters:**
- `query` (string, required) — What a shopper has typed so far.
- `country` (enum, optional, default "br") — Magalu sells in Brazil only (magazineluiza.com.br, BRL). [one of: br]
- `max_rotations` (integer, optional, default 3) — How many fresh exits to try before giving up.

**Returns:** suggestions[]{term, position}, count, query, country

**Example request body:**
```json
{
  "query": "geladeira"
}
```

## More
- Try it live, no code: https://reefapi.com/playground?engine=magalu
- Human docs page: https://reefapi.com/docs/magalu
- Overview page: https://reefapi.com/magalu-api
- Every ReefAPI API in one file (for your AI): https://reefapi.com/llms-full.txt
