{
  "openapi": "3.0.1",
  "info": {
    "title": "eMAG.ro Scraper: Romania Prices & Stock",
    "description": "Search emag.ro or scrape any category: one row per product with price in lei, recommended price and discount, stock status, rating, review count and category path. Filter by price band, sort order, rating, discount, stock and exact words. Unofficial.",
    "version": "0.1",
    "x-build-id": "4n03NLbfxwtiVpsfn"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/reventadata~emag-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-reventadata-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/reventadata~emag-scraper/runs": {
      "post": {
        "operationId": "runs-sync-reventadata-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/reventadata~emag-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-reventadata-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": {
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "Search terms for emag.ro, one search per term (for example televizor, aspirator robot, iphone 16). Leave empty if you give listing URLs instead.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Listing URLs",
            "type": "array",
            "description": "emag.ro category or search URLs to scrape, one per line. Only https://www.emag.ro/search/<term> and category paths ending in /c are accepted, for example https://www.emag.ro/laptopuri/c. Filters already in the URL are kept.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Maximum items",
            "minimum": 1,
            "type": "integer",
            "description": "Total number of products to save across all search terms and URLs. Each result page holds up to 60 products.",
            "default": 100
          },
          "maxPagesPerListing": {
            "title": "Maximum pages per listing",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Result pages to walk per search term or URL. The site serves at most 100 pages (6,000 products) per listing; narrow a big category with a price band or a sort to reach further.",
            "default": 5
          },
          "sort": {
            "title": "Sort order",
            "enum": [
              "RELEVANCE",
              "PRICE_ASC",
              "PRICE_DESC",
              "REVIEWS",
              "DISCOUNT",
              "NEWEST"
            ],
            "type": "string",
            "description": "Order of the results on the site. Applied through the site's own sort link for that listing.",
            "default": "RELEVANCE"
          },
          "minPrice": {
            "title": "Minimum price (RON)",
            "minimum": 0,
            "type": "number",
            "description": "Keep only products priced at or above this amount in lei. Also narrows what the site returns, so a band can reach products beyond the 100-page limit. Leave empty for no minimum."
          },
          "maxPrice": {
            "title": "Maximum price (RON)",
            "minimum": 0,
            "type": "number",
            "description": "Keep only products priced at or below this amount in lei. Also narrows what the site returns. Leave empty for no maximum."
          },
          "minRating": {
            "title": "Minimum rating",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Keep only products with an average customer rating at or above this value (0 to 5). Products with no reviews are dropped when this is set."
          },
          "minDiscountPercent": {
            "title": "Minimum discount (%)",
            "minimum": 1,
            "maximum": 99,
            "type": "integer",
            "description": "Keep only products whose price is at least this many percent under the struck-through price or, when none is shown, the PRP printed on the card. Products showing neither are dropped when this is set."
          },
          "onlyInStock": {
            "title": "Only products in stock",
            "type": "boolean",
            "description": "Keep only products that can be bought now: in stock or last units. Drops pre-orders, out-of-stock and showroom-only products.",
            "default": false
          },
          "exactMatchesOnly": {
            "title": "Exact matches only",
            "type": "boolean",
            "description": "For search terms, keep only products whose name contains every word of the term, ignoring case and accents. The site's search is fuzzy and returns loosely related products, even books for a nonsense term.",
            "default": false
          },
          "includeKeywords": {
            "title": "Must contain",
            "type": "array",
            "description": "Keep only products whose name or category contains every one of these words, ignoring case and accents.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Must not contain",
            "type": "array",
            "description": "Drop products whose name or category contains any of these words, ignoring case and accents.",
            "items": {
              "type": "string"
            }
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify residential proxy in Romania is required: plain, datacenter and Unblocker requests get a captcha page from eMAG.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "RO"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}