{
  "openapi": "3.0.1",
  "info": {
    "title": "Scraper by Image - 1688 / Alibaba / AliExpress",
    "description": "Search products by image across 1688, Alibaba, and AliExpress with a powerful scraper built for visual sourcing, product discovery, and automated marketplace research.",
    "version": "0.0",
    "x-build-id": "bMEOVy8QDcTqL1I0W"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/devcake~scraper-by-image/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-devcake-scraper-by-image",
        "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/devcake~scraper-by-image/runs": {
      "post": {
        "operationId": "runs-sync-devcake-scraper-by-image",
        "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/devcake~scraper-by-image/run-sync": {
      "post": {
        "operationId": "run-sync-devcake-scraper-by-image",
        "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": [
          "provider"
        ],
        "properties": {
          "provider": {
            "title": "Provider",
            "enum": [
              "aliexpress",
              "1688",
              "alibaba"
            ],
            "type": "string",
            "description": "Which marketplace to reverse-search. AliExpress runs against the US domain by default.",
            "default": "aliexpress"
          },
          "imageUrls": {
            "title": "Image URLs",
            "type": "array",
            "description": "Paste one or more public image URLs. AliExpress additionally accepts local file paths (e.g. /tmp/photo.jpg). Ignored if you upload an image below.",
            "items": {
              "type": "string"
            }
          },
          "imageFile": {
            "title": "Or upload an image",
            "type": "string",
            "description": "Single image upload. Overrides the URLs above when provided."
          },
          "maxProducts": {
            "title": "Max products per image",
            "minimum": 30,
            "maximum": 200,
            "type": "integer",
            "description": "Cap on matched products returned per input image.",
            "default": 40
          },
          "maxConcurrency": {
            "title": "Concurrent images",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many input images to process at the same time.",
            "default": 2
          },
          "maxRetries": {
            "title": "Retries per image",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Retries for transient or anti-bot failures. Input and parser errors are not retried.",
            "default": 1
          },
          "minDelay": {
            "title": "Min delay (sec)",
            "minimum": 0,
            "maximum": 60,
            "type": "number",
            "description": "Lower bound for provider delay settings and the default shared request-rate calculation.",
            "default": 2
          },
          "maxDelay": {
            "title": "Max delay (sec)",
            "minimum": 0,
            "maximum": 120,
            "type": "number",
            "description": "Upper bound for provider delay settings. Higher values are safer but slower.",
            "default": 5
          },
          "requestRatePerSecond": {
            "title": "Shared request rate (req/sec)",
            "minimum": 0.05,
            "maximum": 10,
            "type": "number",
            "description": "Shared token-bucket rate for provider-owned HTTP calls.",
            "default": 0.5
          },
          "proxy": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify proxy picker. Defaults to RESIDENTIAL when omitted. AliExpress ignores this setting and always pins to RESIDENTIAL + country=US (Akamai blocks other US proxy types and non-US IPs mis-localise results)."
          },
          "maxImageBytes": {
            "title": "Max input image bytes",
            "minimum": 1024,
            "maximum": 52428800,
            "type": "integer",
            "description": "Reject input images larger than this before preprocessing.",
            "default": 10485760
          },
          "maxImagePixels": {
            "title": "Max input image pixels",
            "minimum": 1,
            "maximum": 100000000,
            "type": "integer",
            "description": "Reject decoded input images larger than this pixel count.",
            "default": 25000000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}