{
  "openapi": "3.0.1",
  "info": {
    "title": "AliExpress Deals & Flash Sales",
    "description": "Every live AliExpress deal in one table, with the clock attached: deal price, was-price, discount, stock, rating and the exact moment each offer expires, stamped beside the moment it was collected. Filter by discount, price or time left. Pick your country. No account, no login.",
    "version": "0.0",
    "x-build-id": "fgijUogdEGwbsWmLL"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/apt_marble~aliexpress-deals-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-apt_marble-aliexpress-deals-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/apt_marble~aliexpress-deals-scraper/runs": {
      "post": {
        "operationId": "runs-sync-apt_marble-aliexpress-deals-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/apt_marble~aliexpress-deals-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-apt_marble-aliexpress-deals-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": {
          "country": {
            "title": "Country to shop from",
            "enum": [
              "us",
              "gb",
              "de",
              "fr",
              "es",
              "it",
              "nl",
              "pl",
              "ca",
              "au",
              "br",
              "mx",
              "ru",
              "sa",
              "ae",
              "il",
              "kr",
              "jp",
              "in",
              "sg",
              "cl",
              "za"
            ],
            "type": "string",
            "description": "Which country's version of the site to read. This sets the currency AND the catalogue: each country gets its own selection of deals, its own prices and its own shipping options, so two countries are never the same list translated.",
            "default": "us"
          },
          "feeds": {
            "title": "Home-page deal sections",
            "uniqueItems": true,
            "type": "array",
            "description": "The deal strips the site puts on its own front page. These are the sections that publish a real expiry time, so leave both selected if you want countdowns.",
            "items": {
              "type": "string",
              "enum": [
                "home_pc",
                "home_msite"
              ],
              "enumTitles": [
                "Desktop front page",
                "Mobile front page"
              ]
            },
            "default": [
              "home_pc",
              "home_msite"
            ]
          },
          "channels": {
            "title": "Deal channels",
            "uniqueItems": true,
            "type": "array",
            "description": "The site's dedicated deal venues. They carry the Choice and free-delivery badges and the saving amount that the front page does not, but they publish no expiry time, and only Bundle Deals publishes a real stock figure. Selecting many of them makes a run slower, because the site serves them one at a time.",
            "items": {
              "type": "string",
              "enum": [
                "superdeals",
                "bundle_deals",
                "choice",
                "category_venue",
                "brand_deals"
              ],
              "enumTitles": [
                "SuperDeals",
                "Bundle Deals",
                "Choice",
                "Category venue",
                "Brand Deals"
              ]
            },
            "default": [
              "superdeals",
              "bundle_deals"
            ]
          },
          "maxDeals": {
            "title": "Maximum deals to return",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "How many deals to keep after ordering and filtering. Each deal section publishes a fixed snapshot, so a run returns what the site is showing right now rather than an unlimited catalogue.",
            "default": 100
          },
          "sortBy": {
            "title": "Order results by",
            "enum": [
              "ending_soonest",
              "biggest_discount",
              "lowest_price",
              "most_sold",
              "source_order"
            ],
            "type": "string",
            "description": "How to order the deals before the maximum is applied. Deals with no published countdown always sort last under Ending soonest.",
            "default": "ending_soonest"
          },
          "onlyWithExpiry": {
            "title": "Only deals with a countdown",
            "type": "boolean",
            "description": "Keep only the deals for which the site publishes an exact end time. Turn this on when you are building an expiry alert and a deal without a deadline is of no use to you.",
            "default": false
          },
          "expiringWithinHours": {
            "title": "Ending within (hours)",
            "minimum": 1,
            "maximum": 8760,
            "type": "integer",
            "description": "Keep only deals that end within this many hours of collection. Deals with no published end time are excluded when this is set. Leave empty for no time window."
          },
          "minDiscountPercent": {
            "title": "Minimum discount (%)",
            "minimum": 0,
            "maximum": 99,
            "type": "integer",
            "description": "Keep only deals discounted by at least this much, using the discount figure the site itself prints on the card.",
            "default": 0
          },
          "minPrice": {
            "title": "Minimum price",
            "minimum": 0,
            "maximum": 1000000,
            "type": "number",
            "description": "Keep only deals at or above this price, in the currency of the country you selected. The run summary lists every currency that actually came back — if more than one appears, this single figure was applied across all of them. Leave empty for no floor."
          },
          "maxPrice": {
            "title": "Maximum price",
            "minimum": 0,
            "maximum": 1000000,
            "type": "number",
            "description": "Keep only deals at or below this price, in the currency of the country you selected. Leave empty for no ceiling."
          },
          "minRating": {
            "title": "Minimum star rating",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Keep only deals rated at or above this figure. Products that have never been rated are excluded when this is set, because no rating is not the same as a low one."
          },
          "onlyChoice": {
            "title": "Only Choice items",
            "type": "boolean",
            "description": "Keep only deals the site marks as Choice. The front-page strips do not publish this marking at all, so switching this on returns deal-channel results only.",
            "default": false
          },
          "excludeSoldOut": {
            "title": "Exclude deals shown as sold out",
            "type": "boolean",
            "description": "Drop deals whose remaining stock is published as zero. Deals with no published stock figure are always kept, because unknown stock is not the same as none, and several deal venues publish no real figure at all.",
            "default": false
          },
          "includeTrendingKeywords": {
            "title": "Also save trending searches",
            "type": "boolean",
            "description": "Save the list of trending search terms the site is promoting alongside the deals. They arrive as their own record, separate from the deal table.",
            "default": true
          },
          "channelDelaySeconds": {
            "title": "Gap between deal channels (seconds)",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "How long to wait between deal channels. The site serves these venues slowly and stops serving them for a while if they are asked for too quickly, so raise this if you are selecting several.",
            "default": 2
          },
          "channelRecoveryWaitSeconds": {
            "title": "Wait before retrying a deal channel (seconds)",
            "minimum": 60,
            "maximum": 900,
            "type": "integer",
            "description": "If the deal channels stop serving mid-run, wait this long once and try again. If they still will not serve, the remaining channels are reported as not attempted rather than as empty.",
            "default": 180
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}