{
  "openapi": "3.0.1",
  "info": {
    "title": "eMAG.ro Scraper — Products, Prices, Sellers & Reviews",
    "description": "Scrape eMAG.ro products from categories, searches, seller pages or product codes: price, discount, PRP, all seller offers, stock, EAN, specifications, images, rating breakdown and reviews. Exact limits, list-only fast mode, no proxy setup.",
    "version": "0.2",
    "x-build-id": "zKMleMsihtcc4h8VE"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/teodor_banea~emag-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-teodor_banea-emag-scraper",
        "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/teodor_banea~emag-scraper/runs": {
      "post": {
        "operationId": "runs-sync-teodor_banea-emag-scraper",
        "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/teodor_banea~emag-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-teodor_banea-emag-scraper",
        "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": {
          "mode": {
            "title": "What to scrape",
            "enum": [
              "listings",
              "products",
              "reviews"
            ],
            "type": "string",
            "description": "Choose one kind of row per run. Listings: one row per product straight from list pages (price, seller, stock, rating, badges) — fastest. Products: one full row per product (EAN, specifications, description, gallery, all seller offers, rating breakdown, variants). Reviews: one row per review of each product (stars, title, text, date, verified purchase — no reviewer names). Every row costs the same.",
            "default": "products"
          },
          "startUrls": {
            "title": "eMAG URLs",
            "type": "array",
            "description": "Paste eMAG.ro pages: categories (https://www.emag.ro/laptopuri/c), brand pages (…/brands/brand/x), filter, price or sorted lists, search results (https://www.emag.ro/search/aspirator), seller pages, or single product and fashion pages (…/pd/DZ4H93YBM/, …/fd/…). Lists are always read from their first page. Listings and Products modes read the products of lists; Reviews mode reads the reviews of those products.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Enter words to search on eMAG.ro, one per line (e.g. \"aspirator robot\"). Each one is read like the site's search results.",
            "items": {
              "type": "string"
            }
          },
          "productCodes": {
            "title": "Product codes",
            "type": "array",
            "description": "Enter eMAG product codes (the code after /pd/ in a product URL, e.g. \"DZ4H93YBM\") or full product URLs — for price and stock monitoring (Products mode) or to read their reviews (Reviews mode). Up to 5,000 per run. In Listings mode, product codes are read in full. In Reviews mode, product codes and product URLs take their reviews first; lists start after them.",
            "items": {
              "type": "string"
            }
          },
          "sort": {
            "title": "Sort lists by",
            "enum": [
              "relevance",
              "priceAsc",
              "priceDesc",
              "newest",
              "mostReviewed",
              "biggestDiscount"
            ],
            "type": "string",
            "description": "Choose the order for lists and searches whose URL has no sort of its own. Lists read to the end are read newest first so that no product is skipped.",
            "default": "relevance"
          },
          "minPrice": {
            "title": "Minimum price",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "Keep only products from this price up (lists and searches). Leave empty for no lower limit."
          },
          "maxPrice": {
            "title": "Maximum price",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "Keep only products up to this price (lists and searches). Leave empty for no upper limit."
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Stop after this many rows in total — products in Listings / Products mode, reviews in Reviews mode. The run stops exactly there. 0 = no limit (capped at 20,000 per run).",
            "default": 100
          },
          "maxResultsPerSource": {
            "title": "Maximum results per URL or search term",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Limit how many products each URL or search term may contribute (in Reviews mode: how many of its products have their reviews read). Leave empty or 0 to use only Maximum results."
          },
          "includeOffers": {
            "title": "Include all seller offers",
            "type": "boolean",
            "description": "Products mode: add every seller's offer (price, stock, seller, fulfilled by eMAG, warranty) to each row. Offer counts and the lowest / highest offer price are filled either way.",
            "default": true
          },
          "includeDescription": {
            "title": "Include description",
            "type": "boolean",
            "description": "Products mode: add the product description as plain text (paragraphs kept). Turn off for smaller rows.",
            "default": true
          },
          "maxReviewsPerProduct": {
            "title": "Reviews per product",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Reviews mode: read up to this many reviews of each product, newest first. 0 = all of them (up to 10,000 per product). Reviewer names are never collected.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}