{
  "openapi": "3.0.1",
  "info": {
    "title": "Magalu Scraper - Magazine Luiza Prices, Pix & Sellers",
    "description": "Scrape Magazine Luiza (Magalu, Brazil) products from searches, categories, seller stores or product links: price, Pix price, installments, list price, seller, rating, reviews, stock and position. Optional product page with full specs and variants. Price tracking for schedules. Error rows are free.",
    "version": "0.1",
    "x-build-id": "18f1Q6X1mNFqX0sJi"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapewise~magalu-produtos/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapewise-magalu-produtos",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/scrapewise~magalu-produtos/runs": {
      "post": {
        "operationId": "runs-sync-scrapewise-magalu-produtos",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/scrapewise~magalu-produtos/run-sync": {
      "post": {
        "operationId": "run-sync-scrapewise-magalu-produtos",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Words to search on Magazine Luiza, one per line, as you would type them on the site (for example air fryer, iphone 16, geladeira frost free). Portuguese works best. Leave empty to use only the URLs below.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Magalu URLs",
            "type": "array",
            "description": "Search or category URLs copied from your browser after setting the filters on magazineluiza.com.br (for example https://www.magazineluiza.com.br/busca/air+fryer/ or https://www.magazineluiza.com.br/celulares-e-smartphones/l/te/), one per line. Filters and sort order in the URL are kept. Product URLs (with /p/<code>/) also work and come back with the full product page. A seller's store URL (/lojista/<id>/) returns the seller's whole catalog.",
            "items": {
              "type": "string"
            }
          },
          "brands": {
            "title": "Brands",
            "type": "array",
            "description": "Keep only these brands, one per line (for example Samsung, LG, Electrolux). Uses Magalu's own brand filter; each brand runs as its own search, so the limit applies per brand. Applies to search terms and /busca/ URLs; category and store URLs run as pasted.",
            "items": {
              "type": "string"
            }
          },
          "sellers": {
            "title": "Sellers",
            "type": "array",
            "description": "Keep only products sold by these Magalu sellers, one per line: the seller ID from the store URL (for example mideacarrier from https://www.magazineluiza.com.br/lojista/mideacarrier/) or the store URL itself. Combine with search terms to read a seller's catalog or watch a competitor's prices. Use magazineluiza for products sold by Magalu itself. Each seller runs as its own search.",
            "items": {
              "type": "string"
            }
          },
          "minPrice": {
            "title": "Minimum price (BRL)",
            "minimum": 0,
            "type": "integer",
            "description": "Only products at or above this price in Brazilian reais. Uses Magalu's own price filter. Applies to search terms and /busca/ URLs."
          },
          "maxPrice": {
            "title": "Maximum price (BRL)",
            "minimum": 0,
            "type": "integer",
            "description": "Only products at or below this price in Brazilian reais."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "priceLowToHigh",
              "priceHighToLow",
              "bestSellers",
              "topRated",
              "newest",
              "lowestPriceWithShipping",
              "fastestDelivery",
              "price_asc",
              "price_desc",
              "best_selling",
              "best_rated"
            ],
            "type": "string",
            "description": "Magalu's own orders. With a product limit it also decides which products you get. Position in the results is saved on every row, so 'Relevance' doubles as a ranking tracker.",
            "default": "relevance"
          },
          "onlyInStock": {
            "title": "Only products in stock",
            "type": "boolean",
            "description": "Skip products that cannot be bought right now. Skipped products are not charged.",
            "default": false
          },
          "minRating": {
            "title": "Minimum rating",
            "enum": [
              "1",
              "2",
              "3",
              "4",
              "4.5"
            ],
            "type": "string",
            "description": "Keep only products rated at or above this many stars. Products without reviews are skipped too. Skipped products are not charged. Empty = any rating."
          },
          "excludeSponsored": {
            "title": "Leave out sponsored products",
            "type": "boolean",
            "description": "Magalu mixes paid placements into its results. They are kept by default and flagged with isSponsored; turn this on to leave them out (not charged).",
            "default": false
          },
          "maxItems": {
            "title": "Max products per search",
            "minimum": 0,
            "type": "integer",
            "description": "Stop each search (each term, URL or brand) after this many products. Magalu shows 40 per page and at most 25 pages (1,000 products) per search. 0 = up to 1,000.",
            "default": 50
          },
          "maxTotalItems": {
            "title": "Max products in the whole run",
            "minimum": 1,
            "type": "integer",
            "description": "Optional cap for the whole run, across every term, URL and brand (maxItems is per search). Also works as a spend cap. Empty = no cap."
          },
          "includeDetails": {
            "title": "Full product pages",
            "type": "boolean",
            "description": "Also open each product's own page: description, the full specifications sheet, reference and model, category path, every variant (color, size, voltage...) with its stock, all images, dimensions and weight, and the 1 to 5 star rating distribution. Charged as a second event per product.",
            "default": false
          },
          "onlyNew": {
            "title": "Only new products since the last run",
            "type": "boolean",
            "description": "For scheduled runs. Remembers which products each search (with its filters) already returned, in a named key-value store in your account ('magalu-scraper-state'), and delivers only products not seen before. The first run delivers up to the limit and marks everything it read as seen. Seen products are not delivered and not charged. Forces the newest-first order. Delete the store to start over.",
            "default": false
          },
          "trackPriceChanges": {
            "title": "Track price changes",
            "type": "boolean",
            "description": "Compares each product's price with the price seen in your previous runs of the same search (same key-value store) and adds previousPrice, priceChange, priceChangePct, isPriceDrop, isNewProduct, firstSeenAt and previousSeenAt. With 'Only new products' on too, products whose price changed are delivered as well.",
            "default": false
          },
          "onlyPriceDrops": {
            "title": "Only price drops (not increases)",
            "type": "boolean",
            "description": "With 'Only new products' and 'Track price changes' both on: of the products seen before, deliver only those whose price went down.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Searches, categories and seller URLs go through Magalu's own search service with no browser. Product pages sit behind Akamai: the Actor opens a session in a real browser, then reads pages with plain HTTP on the same IP, so the cheap datacenter proxy (the default) works. If you get BLOCKED rows, run again in a few minutes.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}