{
  "openapi": "3.0.1",
  "info": {
    "title": "AliExpress Product Scraper & Price Monitor",
    "description": "Search AliExpress by keyword, pull exact products by URL or ID, or track factual price and stock changes. Localized prices as numbers, parsed sold counts, and an explicit coverage state on every run.",
    "version": "0.1",
    "x-build-id": "hDscXbXw27gFHFTN7"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/luminar~aliexpress-product-scraper-price-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-luminar-aliexpress-product-scraper-price-monitor",
        "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/luminar~aliexpress-product-scraper-price-monitor/runs": {
      "post": {
        "operationId": "runs-sync-luminar-aliexpress-product-scraper-price-monitor",
        "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/luminar~aliexpress-product-scraper-price-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-luminar-aliexpress-product-scraper-price-monitor",
        "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": {
          "workflow": {
            "title": "What do you want to do?",
            "enum": [
              "search_products",
              "scrape_exact_products",
              "track_product_changes"
            ],
            "type": "string",
            "description": "Search returns current products. Exact mode resolves specific URLs or IDs. Monitoring keeps a baseline, then emits factual NEW, UPDATED, or confirmed ENDED rows after two comparable absences.",
            "default": "search_products"
          },
          "searchQueries": {
            "title": "Search keywords",
            "maxItems": 10,
            "uniqueItems": true,
            "type": "array",
            "description": "Up to 10 phrases. Each keyword is a separate search target with keyword-fidelity checks.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120
            },
            "default": [
              "wireless earbuds"
            ]
          },
          "searchUrls": {
            "title": "AliExpress search URLs (use as-is)",
            "maxItems": 10,
            "uniqueItems": true,
            "type": "array",
            "description": "Optional. Paste AliExpress search result URLs you already filtered on the site; they are scraped exactly as-is.",
            "items": {
              "type": "string",
              "maxLength": 2000
            }
          },
          "productUrls": {
            "title": "Exact AliExpress product URLs",
            "maxItems": 100,
            "uniqueItems": true,
            "type": "array",
            "description": "Exact mode: public AliExpress item URLs. Resolved anonymously; non-AliExpress hosts are rejected.",
            "items": {
              "type": "string",
              "maxLength": 2000
            }
          },
          "productIds": {
            "title": "Bare AliExpress product IDs",
            "maxItems": 100,
            "uniqueItems": true,
            "type": "array",
            "description": "Optional. Numeric AliExpress product IDs without the URL.",
            "items": {
              "type": "string",
              "pattern": "^[0-9]{5,}$",
              "maxLength": 32
            }
          },
          "shipTo": {
            "title": "Ship-to country",
            "enum": [
              "US",
              "GB",
              "DE",
              "FR",
              "ES",
              "IT",
              "NL",
              "PL",
              "SE",
              "NO",
              "DK",
              "FI",
              "CZ",
              "AT",
              "BE",
              "CH",
              "PT",
              "GR",
              "IE",
              "RO",
              "HU",
              "HR",
              "SI",
              "RS",
              "BA",
              "ME",
              "MK",
              "AL",
              "CA",
              "MX",
              "BR",
              "AU",
              "NZ",
              "JP",
              "KR",
              "SG",
              "MY",
              "TH",
              "VN",
              "PH",
              "ID",
              "IN",
              "TR",
              "AE",
              "SA",
              "IL",
              "EG",
              "ZA",
              "NG",
              "KE"
            ],
            "type": "string",
            "description": "Localizes results: shippable items, prices, and currency follow the selected market.",
            "default": "US"
          },
          "currency": {
            "title": "Currency",
            "enum": [
              "USD",
              "EUR",
              "GBP",
              "AUD",
              "CAD",
              "CHF",
              "SEK",
              "NOK",
              "DKK",
              "PLN",
              "CZK",
              "HUF",
              "RON",
              "JPY",
              "KRW",
              "SGD",
              "MYR",
              "THB",
              "VND",
              "PHP",
              "IDR",
              "INR",
              "TRY",
              "AED",
              "SAR",
              "ILS",
              "EGP",
              "ZAR",
              "NGN",
              "KES",
              "BRL",
              "MXN",
              "NZD",
              "HKD"
            ],
            "type": "string",
            "description": "Currency requested from the public storefront. Reported only when the source confirms it.",
            "default": "USD"
          },
          "language": {
            "title": "Language",
            "enum": [
              "en",
              "de",
              "fr",
              "es",
              "it",
              "nl",
              "pl",
              "pt",
              "ru",
              "tr",
              "ja",
              "ko",
              "th",
              "vi",
              "id",
              "ms",
              "ar",
              "he"
            ],
            "type": "string",
            "description": "Storefront language for titles and labels.",
            "default": "en"
          },
          "sortBy": {
            "title": "Result order",
            "enum": [
              "default",
              "orders",
              "price_asc",
              "price_desc",
              "newest"
            ],
            "type": "string",
            "description": "Source-native ordering. Most orders surfaces best sellers; Newest surfaces recent listings.",
            "default": "default"
          },
          "minPrice": {
            "title": "Minimum price",
            "minimum": 0,
            "maximum": 100000,
            "type": "number",
            "description": "Keep rows at or above this price."
          },
          "maxPrice": {
            "title": "Maximum price",
            "minimum": 0,
            "maximum": 100000,
            "type": "number",
            "description": "Keep rows at or below this price."
          },
          "freeShipping": {
            "title": "Free shipping only",
            "type": "boolean",
            "description": "Keep only products marked with free shipping in the source listing.",
            "default": false
          },
          "maxProductsPerQuery": {
            "title": "Maximum products per keyword",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Hard ceiling per keyword. Coverage becomes CAPPED when more source rows remain. On monitoring runs the whole scope is additionally capped at 5,000 products, because monitoring has to remember every product it tracks.",
            "default": 60
          },
          "maxBuyerChargeUsd": {
            "title": "Maximum spend for this run (USD)",
            "minimum": 0.05,
            "maximum": 30,
            "type": "number",
            "description": "The run stops before exceeding this total charge.",
            "default": 30
          },
          "monitorStoreName": {
            "title": "Monitoring namespace",
            "maxLength": 64,
            "type": "string",
            "description": "Use the same name on every scheduled run of one watch. The first run creates the baseline; later runs return factual NEW, UPDATED, and confirmed ENDED rows."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}