{
  "openapi": "3.0.1",
  "info": {
    "title": "China Global B2B Wholesale & Factory Price Comparator",
    "description": "Live multi-platform B2B wholesale and factory supplier price comparator across Made-in-China, YiwuGo (Yiwu Trade City), and DHgate. Compares OEM/ODM manufacturing, bulk MOQs, audited suppliers, and direct RFQ links.",
    "version": "0.0",
    "x-build-id": "Sqjkl4eZhbCUEkScF"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lonwabo~global-b2b-wholesale-comparator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lonwabo-global-b2b-wholesale-comparator",
        "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/lonwabo~global-b2b-wholesale-comparator/runs": {
      "post": {
        "operationId": "runs-sync-lonwabo-global-b2b-wholesale-comparator",
        "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/lonwabo~global-b2b-wholesale-comparator/run-sync": {
      "post": {
        "operationId": "run-sync-lonwabo-global-b2b-wholesale-comparator",
        "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": [
          "searchTerms"
        ],
        "properties": {
          "searchTerms": {
            "title": "B2B Products, Materials, or OEM/ODM Manufacturing Items",
            "type": "array",
            "description": "List of wholesale products, components, or manufacturing categories to compare across global factory platforms (e.g. 'CNC Machining Aluminum Parts', 'Silicone Kitchen Cooking Utensils Set', 'Stainless Steel Insulated Water Bottle', 'Custom Magnetic Phone Case', 'Solar Panel 400W Monocrystalline', 'Biodegradable Packaging Kraft Box').",
            "items": {
              "type": "string"
            }
          },
          "includeMadeInChina": {
            "title": "Made-in-China (made-in-china.com)",
            "type": "boolean",
            "description": "Include Made-in-China — #1 Alibaba rival for SGS/TÜV audited OEM/ODM factories.",
            "default": true
          },
          "includeYiwuGo": {
            "title": "YiwuGo (en.yiwugo.com)",
            "type": "boolean",
            "description": "Include YiwuGo — official digital marketplace of Yiwu International Trade City stalls.",
            "default": true
          },
          "includeDHgate": {
            "title": "DHgate B2B (dhgate.com)",
            "type": "boolean",
            "description": "Include DHgate B2B — tiered wholesale lot exporter for bulk consumer & tech goods.",
            "default": true
          },
          "maxItemsPerPlatform": {
            "title": "Max Items Per Platform",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum factory candidates to inspect per B2B platform for each query.",
            "default": 5
          },
          "minPrice": {
            "title": "Minimum Unit Price ($)",
            "minimum": 0,
            "type": "number",
            "description": "Ignore items with unit prices lower than this amount.",
            "default": 0.01
          },
          "maxPrice": {
            "title": "Maximum Unit Price ($)",
            "minimum": 1,
            "type": "number",
            "description": "Ignore items with unit prices higher than this amount.",
            "default": 10000
          },
          "excludeAccessories": {
            "title": "Exclude Small Spare Cables & Cases",
            "type": "boolean",
            "description": "Filters out minor spare cables, sleeves, covers, and stickers when sourcing main equipment or products.",
            "default": false
          },
          "onlyMultiPlatformMatches": {
            "title": "Only Multi-Platform Matches",
            "type": "boolean",
            "description": "When enabled, only outputs products found on 2 or more B2B platforms for direct factory price comparison.",
            "default": false
          },
          "sortBy": {
            "title": "Sort Results By",
            "enum": [
              "priceSpreadDesc",
              "bestPriceAsc",
              "storesComparedDesc",
              "savingsPercentDesc"
            ],
            "type": "string",
            "description": "Choose how the wholesale comparison dataset is ordered.",
            "default": "priceSpreadDesc"
          },
          "includeFields": {
            "title": "Included Columns / Fields",
            "type": "array",
            "description": "Selectively customize columns in the output dataset.",
            "items": {
              "type": "string",
              "enum": [
                "productImage",
                "supplier",
                "platformColumns",
                "rawOffers",
                "dealVerdict"
              ],
              "enumTitles": [
                "Product Image (URL)",
                "Supplier Name & Audit Badges (SGS/TÜV, Yiwu Booth)",
                "Individual Platform Columns (Unit Prices, MOQs, RFQ Links)",
                "Raw Factory Offers Object (Full Nested JSON)",
                "Wholesale Verdict & Savings Percentages"
              ]
            },
            "default": [
              "productImage",
              "supplier",
              "platformColumns",
              "dealVerdict"
            ]
          },
          "minSimilarityScore": {
            "title": "Fuzzy Matching Sensitivity",
            "minimum": 0.2,
            "maximum": 0.9,
            "type": "number",
            "description": "Similarity score (0.2 to 0.9) required to group products across B2B platforms. Default 0.40 balances recall and accuracy.",
            "default": 0.4
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Select proxy mode. Residential proxy groups recommended for heavy automated multi-region querying."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}