{
  "openapi": "3.0.1",
  "info": {
    "title": "1688 Supplier & Product Analyzer",
    "description": "Analyze data from any 1688 scraper or product export. Score supplier evidence, compare MOQ cash exposure, model cross-border margins, detect repeated-snapshot trends, and rank sourcing candidates.",
    "version": "0.1",
    "x-build-id": "kVuhaiWZADZiUU3PJ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrupulous_buckler~1688-supplier-sourcing-intelligence/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrupulous_buckler-1688-supplier-sourcing-intelligence",
        "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/scrupulous_buckler~1688-supplier-sourcing-intelligence/runs": {
      "post": {
        "operationId": "runs-sync-scrupulous_buckler-1688-supplier-sourcing-intelligence",
        "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/scrupulous_buckler~1688-supplier-sourcing-intelligence/run-sync": {
      "post": {
        "operationId": "run-sync-scrupulous_buckler-1688-supplier-sourcing-intelligence",
        "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": "Report mode",
            "enum": [
              "demo",
              "supplierDiligence",
              "landedCost",
              "productSelection",
              "fullReport"
            ],
            "type": "string",
            "description": "Try the free synthetic demo or generate one focused or complete sourcing report.",
            "default": "demo"
          },
          "uploadedRecords": {
            "title": "1688 product or supplier records",
            "type": "array",
            "description": "Paste JSON records exported by a 1688 scraper or spreadsheet workflow. Common offer, pricing-tier, MOQ, supplier, sales, review, logistics, stock, and certification aliases are recognized.",
            "default": []
          },
          "sourceDatasetIds": {
            "title": "Private Apify dataset IDs",
            "type": "array",
            "description": "Optional private datasets from upstream 1688 collection tasks. Only IDs explicitly supplied here are read; up to 10 datasets.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "targetMarketplace": {
            "title": "Target sales channel",
            "enum": [
              "amazonFba",
              "tiktokShop",
              "shopify",
              "ebay",
              "temu",
              "other"
            ],
            "type": "string",
            "description": "Report context for marketplace fees and the final verification checklist.",
            "default": "amazonFba"
          },
          "destinationCountry": {
            "title": "Destination country or market",
            "type": "string",
            "description": "Used as report context only. Duty, tax, product compliance, and customs treatment must be supplied or independently verified.",
            "default": "United States"
          },
          "destinationCurrency": {
            "title": "Destination currency",
            "type": "string",
            "description": "For example USD, NZD, AUD, EUR, or GBP.",
            "default": "USD"
          },
          "exchangeRateCnyToTarget": {
            "title": "1 CNY in destination currency",
            "minimum": 0.000001,
            "maximum": 100,
            "type": "number",
            "description": "Example: enter 0.14 when 1 CNY equals 0.14 USD. Update this assumption before financial decisions.",
            "default": 0.14
          },
          "purchaseQuantity": {
            "title": "Planned order quantity per product",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "The analyzer applies the product's MOQ and the best eligible quantity price tier.",
            "default": 100
          },
          "targetSalePrice": {
            "title": "Expected sale price per unit",
            "minimum": 0.01,
            "maximum": 1000000,
            "type": "number",
            "description": "In destinationCurrency.",
            "default": 29.99
          },
          "targetMarginRate": {
            "title": "Target profit margin (%)",
            "minimum": -100,
            "maximum": 99,
            "type": "number",
            "description": "Used to flag candidates whose baseline modeled margin is below your target.",
            "default": 30
          },
          "inventoryBudget": {
            "title": "Maximum first-order inventory budget",
            "minimum": 0,
            "maximum": 1000000000,
            "type": "number",
            "description": "In destinationCurrency. Set 0 to disable the budget-fit check.",
            "default": 5000
          },
          "defaultWeightKg": {
            "title": "Default chargeable weight per unit (kg)",
            "minimum": 0,
            "maximum": 10000,
            "type": "number",
            "description": "Used only when a product record does not include a usable weight.",
            "default": 0.5
          },
          "domesticShippingPerUnitCny": {
            "title": "China domestic shipping per unit (CNY)",
            "minimum": 0,
            "maximum": 100000,
            "type": "number",
            "description": "Estimated domestic transport allocation per unit before international freight.",
            "default": 1
          },
          "packagingPerUnitCny": {
            "title": "Packaging/customization per unit (CNY)",
            "minimum": 0,
            "maximum": 100000,
            "type": "number",
            "description": "Estimated packaging, labeling, or customization allocation per unit.",
            "default": 1
          },
          "qualityControlPerUnitCny": {
            "title": "Quality control per unit (CNY)",
            "minimum": 0,
            "maximum": 100000,
            "type": "number",
            "description": "Estimated inspection and quality-control allocation per unit.",
            "default": 0.5
          },
          "internationalFreightPerKg": {
            "title": "International freight per kg",
            "minimum": 0,
            "maximum": 100000,
            "type": "number",
            "description": "In destinationCurrency.",
            "default": 4
          },
          "dutyRate": {
            "title": "Duty rate (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Use 0 only when duty does not apply or has not yet been estimated.",
            "default": 0
          },
          "taxRate": {
            "title": "Import tax or VAT rate (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "A simplified landed-cost assumption, not tax advice.",
            "default": 0
          },
          "platformFeeRate": {
            "title": "Marketplace/platform fee (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Percentage of sale price paid to the destination marketplace or selling platform.",
            "default": 15
          },
          "paymentFeeRate": {
            "title": "Payment processing fee (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Percentage of sale price allocated to payment processing.",
            "default": 3
          },
          "adCostRate": {
            "title": "Advertising cost as share of sales (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Expected advertising spend divided by sales revenue.",
            "default": 12
          },
          "returnRate": {
            "title": "Expected return rate (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Expected share of sold units that create the configured return loss.",
            "default": 5
          },
          "returnLossPerReturnedUnit": {
            "title": "Expected loss per returned unit",
            "minimum": 0,
            "maximum": 1000000,
            "type": "number",
            "description": "In destinationCurrency. Include reverse logistics, disposal, lost fees, or markdown loss.",
            "default": 8
          },
          "fulfillmentFeePerUnit": {
            "title": "Fulfillment fee per unit",
            "minimum": 0,
            "maximum": 100000,
            "type": "number",
            "description": "In destinationCurrency.",
            "default": 4
          },
          "otherCostPerUnit": {
            "title": "Other cost per unit",
            "minimum": 0,
            "maximum": 100000,
            "type": "number",
            "description": "In destinationCurrency. Add labeling, inspection allocation, software, warehousing, or other known costs.",
            "default": 0
          },
          "maxCandidates": {
            "title": "Maximum shortlisted products",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Limits the number of ranked product candidates in the report.",
            "default": 20
          },
          "maxEvidence": {
            "title": "Maximum source records per supplier",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Limits the source evidence records attached to each supplier result.",
            "default": 10
          },
          "maxRecords": {
            "title": "Maximum input records",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Hard processing limit across uploads and private datasets.",
            "default": 5000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}