{
  "openapi": "3.0.1",
  "info": {
    "title": "AliExpress Product Analysis & US Sourcing Reports",
    "description": "Analyze authorized AliExpress product CSV/JSON exports for US sourcing: shipping-cost gaps, offer-basis checks, hypothetical contribution scenarios and supplied price-change findings. No live scraping, API or proxy. Labeled demos; start/result and platform usage fees apply.",
    "version": "1.1",
    "x-build-id": "hkSvseygXLV0D9pcS"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fascinating_lentil~aliexpress-products-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fascinating_lentil-aliexpress-products-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/fascinating_lentil~aliexpress-products-scraper/runs": {
      "post": {
        "operationId": "runs-sync-fascinating_lentil-aliexpress-products-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/fascinating_lentil~aliexpress-products-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-fascinating_lentil-aliexpress-products-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Data mode",
            "enum": [
              "demo",
              "import"
            ],
            "type": "string",
            "description": "Choose explicitly. Old live search/proxy inputs receive a migration error. Demo creates zero dataset rows and product-result events, but start/platform usage fees still apply. Imports require your own processing rights."
          },
          "demoPreset": {
            "title": "Synthetic US preview",
            "enum": [
              "us-cost-comparison",
              "us-margin-scenario",
              "us-price-change-review"
            ],
            "type": "string",
            "description": "Invented developer examples only, not real AliExpress offers, history or source access. For the contribution preview, enter a hypothetical retail price and your fee/cost assumptions below.",
            "default": "us-cost-comparison"
          },
          "importJson": {
            "title": "Authorized product observations — JSON text",
            "type": "string",
            "description": "Paste a JSON ARRAY as text. Exactly one of importJson/importCsv, maximum 2 MiB and 1,000 observations. Required per row: productId as an 8–24 digit string, title, observedAt (UTC date/timestamp), numeric price. Do not submit private seller/customer data or credentials. No URLs/files are fetched."
          },
          "importCsv": {
            "title": "Authorized product observations — CSV text",
            "type": "string",
            "description": "Paste CSV with a header, maximum 2 MiB / 1,000 observations / 60 columns. Use numeric prices without currency symbols, locale decimal commas, ranges or sold-count shorthand. Explicitly provide currency, destination, variant and offer/tax/per-unit context for valid comparisons. See README column guide."
          },
          "importSource": {
            "title": "Your export provider/source label",
            "type": "string",
            "description": "Required for import, maximum 160 characters. Identify your authorized feed/export. A label or confirmation does not establish a license; the Actor does not verify source accuracy, rights, freshness or current AliExpress availability. Leave empty for demo."
          },
          "authorizedData": {
            "title": "I have the right to process this export through this paid service",
            "type": "boolean",
            "description": "Required TRUE for import only. Confirm only for your own or properly licensed product observations. Mere public visibility, an API account or another scraper's output does not automatically allow resale/redistribution. Never auto-checked by an example.",
            "default": false
          },
          "maxResults": {
            "title": "Maximum saved product analyses",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Import only: one billed dataset row per unique productId, including all its supplied variants and times. First-seen products are selected; omitted products are not exported or billed. This is not a row or per-query cap. Demo creates no product results.",
            "default": 1
          },
          "retailPriceUsd": {
            "title": "Hypothetical resale price — USD per unit",
            "minimum": 0.01,
            "maximum": 1000000,
            "type": "number",
            "description": "Optional scenario assumption, NOT a forecast. Same entered retail price applies to all selected quotes. Calculated only for explicit US / USD / per-unit / standard offers with known shipping, additional tax and duty. No currency conversion or legal tax/tariff estimates."
          },
          "marketplaceFeePercent": {
            "title": "Assumed marketplace fee — % of resale price",
            "minimum": 0,
            "maximum": 99,
            "type": "number",
            "description": "Your assumption, not current Amazon/Shopify/TikTok rates. Default 0 is an assumption, not proof that fees are absent. Combined marketplace/payment/returns reserve must be below 100%.",
            "default": 0
          },
          "paymentFeePercent": {
            "title": "Assumed payment fee — % of resale price",
            "minimum": 0,
            "maximum": 99,
            "type": "number",
            "description": "Your scenario assumption. Default 0; enter the applicable value for your workflow. Not a current rate lookup.",
            "default": 0
          },
          "returnsReservePercent": {
            "title": "Assumed returns reserve — % of resale price",
            "minimum": 0,
            "maximum": 99,
            "type": "number",
            "description": "Your modeled reserve, not a predicted return rate. Default 0. Overhead and income taxes are not modeled.",
            "default": 0
          },
          "fixedFeeUsd": {
            "title": "Assumed fixed fee — USD per unit",
            "minimum": 0,
            "maximum": 1000000,
            "type": "number",
            "description": "User-entered scenario fee. Default 0, not a verified absence of costs.",
            "default": 0
          },
          "fulfillmentCostUsd": {
            "title": "Assumed fulfillment — USD per unit",
            "minimum": 0,
            "maximum": 1000000,
            "type": "number",
            "description": "Per-unit scenario cost beyond the imported quote. Do not double-count costs already included in imported shipping. Default 0.",
            "default": 0
          },
          "adCostUsd": {
            "title": "Assumed advertising — USD per sold unit",
            "minimum": 0,
            "maximum": 1000000,
            "type": "number",
            "description": "Your acquisition-cost assumption, not a conversion or sales prediction. Default 0.",
            "default": 0
          },
          "targetContributionMarginPercent": {
            "title": "Scenario contribution target — % of resale price",
            "minimum": 0,
            "maximum": 95,
            "type": "number",
            "description": "Used for the hypothetical ad-budget threshold. Contribution is not net profit or a guarantee the product will sell. Negative margins and negative affordable ad budgets remain visible.",
            "default": 25
          },
          "priceChangeThresholdPercent": {
            "title": "Supplied price change review threshold — %",
            "minimum": 0.01,
            "maximum": 1000,
            "type": "number",
            "description": "Findings for rises or falls between matching supplied standard quotes. Raw unrounded change decides the threshold. Zero baselines and changed context do not produce percent alerts. No live monitoring or notification.",
            "default": 5
          },
          "landedCostRiseThresholdPercent": {
            "title": "Entered landed-cost rise review threshold — %",
            "minimum": 0.01,
            "maximum": 1000,
            "type": "number",
            "description": "Only when both supplied quotes have all required cost components and matching context. Never fills missing shipping, tax or duty with zero.",
            "default": 10
          },
          "deliveryIncreaseThresholdDays": {
            "title": "Supplied maximum delivery increase threshold — days",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Review increased deliveryDaysMax between comparable supplied quotes. The estimate is user-provided and is not a delivery promise.",
            "default": 3
          },
          "comparisonWindowDays": {
            "title": "Maximum comparison time gap — days",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Larger supplied time gaps remain explicit but do not trigger numerical price/cost/delivery/stock findings. No hidden persistent history or schedule is created.",
            "default": 30
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}