{
  "openapi": "3.0.1",
  "info": {
    "title": "AI Sourcing Agent: Search, Audit & Verify Global B2B",
    "description": "Automate product sourcing. Find, rank, and audit suppliers across Alibaba, DHgate, Made-in-China & IndiaMART. We filter out the noise to deliver one verified \"Gold Match\" and a low-risk shortlist. Verified intelligence for serious FBA, TikTok, and B2B buyers.",
    "version": "1.0",
    "x-build-id": "xW6Jk0DHgUilv1z2O"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/inviting_professor~ai-sourcing-agent-alibaba-dhgate-indiamart-verification/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-inviting_professor-ai-sourcing-agent-alibaba-dhgate-indiamart-verification",
        "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/inviting_professor~ai-sourcing-agent-alibaba-dhgate-indiamart-verification/runs": {
      "post": {
        "operationId": "runs-sync-inviting_professor-ai-sourcing-agent-alibaba-dhgate-indiamart-verification",
        "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/inviting_professor~ai-sourcing-agent-alibaba-dhgate-indiamart-verification/run-sync": {
      "post": {
        "operationId": "run-sync-inviting_professor-ai-sourcing-agent-alibaba-dhgate-indiamart-verification",
        "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": [
          "items"
        ],
        "properties": {
          "items": {
            "title": "Product Items",
            "type": "array",
            "description": "List of products to source.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "title": "Item ID",
                  "description": "Unique identifier for this item (e.g., 'item1')"
                },
                "mode": {
                  "title": "Input Mode",
                  "type": "string",
                  "enum": [
                    "TEXT",
                    "IMAGE",
                    "VIDEO"
                  ],
                  "default": "TEXT",
                  "description": "TEXT: Use search keywords. IMAGE: Analyze a product image. VIDEO: Analyze a video clip (webm, mp4)."
                },
                "imageUrl": {
                  "title": "Product Image URL",
                  "type": "string",
                  "description": "URL of the reference product image (required if mode is IMAGE).",
                  "editor": "textfield"
                },
                "videoUrl": {
                  "title": "Product Video URL",
                  "type": "string",
                  "description": "URL of the reference product video clip - webm or mp4 (required if mode is VIDEO). Max 30 seconds recommended.",
                  "editor": "textfield"
                },
                "imageFocus": {
                  "title": "Image/Video Focus Area",
                  "type": "string",
                  "description": "Optional guidance for vision analysis (e.g., 'Focus on the fabric texture' or 'Watch for the product at 0:05').",
                  "editor": "textarea"
                },
                "searchQuery": {
                  "title": "Search Keywords",
                  "type": "string",
                  "description": "Manual search keywords (used if mode is TEXT).",
                  "editor": "textfield"
                },
                "maxPrice": {
                  "title": "Maximum Price (USD)",
                  "type": "number",
                  "description": "Filter out products above this price. Leave empty for no limit.",
                  "minimum": 0
                },
                "targetMoq": {
                  "title": "Target Order Quantity",
                  "type": "integer",
                  "description": "Your planned order quantity. Products with high MOQs are deprioritized.",
                  "default": 100,
                  "minimum": 1
                }
              },
              "required": [
                "id",
                "mode"
              ]
            }
          },
          "sources": {
            "title": "Marketplaces to Search",
            "uniqueItems": true,
            "type": "array",
            "description": "Select which marketplaces to search. Each source costs $0.25. Default: all 4 sources.",
            "items": {
              "type": "string",
              "enum": [
                "alibaba",
                "dhgate",
                "madeInChina",
                "indiamart"
              ]
            },
            "default": [
              "alibaba",
              "dhgate",
              "madeInChina",
              "indiamart"
            ]
          },
          "moqImportance": {
            "title": "MOQ Importance",
            "enum": [
              "strict",
              "prefer",
              "ignore"
            ],
            "type": "string",
            "description": "strict: Heavily penalize high-MOQ products. prefer: Slight preference for compatible MOQs. ignore: Don't consider MOQ in ranking.",
            "default": "prefer"
          },
          "enableRanking": {
            "title": "Enable AI Ranking",
            "type": "boolean",
            "description": "Use Gemini to rank results by relevance to your search intent.",
            "default": true
          },
          "topK": {
            "title": "Top Ranked Results",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Number of best matches to return per item.",
            "default": 5
          },
          "enableDeepVerification": {
            "title": "Enable Deep Verification",
            "type": "boolean",
            "description": "Visit each top product page to verify it matches your intent. Disable to skip verification and return ranked results faster.",
            "default": true
          },
          "verificationStrictness": {
            "title": "Verification Strictness",
            "enum": [
              "strict",
              "moderate",
              "relaxed"
            ],
            "type": "string",
            "description": "Control how rigorously the AI verifies product data.",
            "default": "moderate"
          },
          "minScore": {
            "title": "Minimum Validation Score",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Minimum score (0-100) required for a product to be considered valid.",
            "default": 60
          },
          "geminiApiKey": {
            "title": "Gemini API Key",
            "type": "string",
            "description": "Your Google Gemini API key for vision and ranking. If not provided, uses GEMINI_API_KEY env var."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}