{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Lens Search API - Reverse Image Search & OCR",
    "description": "Reverse image search via Google Lens. Returns visual matches, AI descriptions, related links, related searches, and OCR text with bounding boxes. Four modes from fast OCR-only to full all-tabs extraction.",
    "version": "0.1",
    "x-build-id": "SHptOQwL0ASaQvMgX"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/zen-studio~google-lens-visual-search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-zen-studio-google-lens-visual-search",
        "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/zen-studio~google-lens-visual-search/runs": {
      "post": {
        "operationId": "runs-sync-zen-studio-google-lens-visual-search",
        "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/zen-studio~google-lens-visual-search/run-sync": {
      "post": {
        "operationId": "run-sync-zen-studio-google-lens-visual-search",
        "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": [
          "imageUrl"
        ],
        "properties": {
          "imageUrl": {
            "title": "Image URL",
            "type": "string",
            "description": "Public image URL to search. Google's servers will fetch it directly, so it must be publicly accessible.<br><br>Supported formats: JPEG, PNG, WebP"
          },
          "searchType": {
            "title": "Search mode",
            "enum": [
              "all",
              "visual_matches",
              "exact_matches",
              "ocr_only"
            ],
            "type": "string",
            "description": "Controls which type of results to return.<br><br><b>All results</b> — AI description, visual matches, related links, related searches<br><b>Visual matches</b> — pages containing visually similar images<br><b>Exact matches</b> — pages containing this exact image<br><b>OCR only</b> — text extraction only (no browser, fastest)",
            "default": "all"
          },
          "includeAllTabs": {
            "title": "Include all tabs",
            "type": "boolean",
            "description": "When enabled in \"All results\" mode, also navigates the Visual matches and Exact matches tabs for more comprehensive results. Adds ~10-15s per image.",
            "default": false
          },
          "includeOcr": {
            "title": "Include OCR text",
            "type": "boolean",
            "description": "Extract text from the image using Google Lens OCR (protobuf API). Runs in parallel with visual search, no extra browser time. Adds word-level bounding boxes.",
            "default": false
          },
          "language": {
            "title": "Language (e.g. en, de, ja)",
            "type": "string",
            "description": "ISO 639-1 language code for search results and OCR hints.<br><br>Common codes: <code>en</code> English, <code>de</code> German, <code>fr</code> French, <code>es</code> Spanish, <code>ja</code> Japanese, <code>zh</code> Chinese, <code>ar</code> Arabic, <code>ko</code> Korean",
            "default": "en"
          },
          "countryCode": {
            "title": "Country",
            "enum": [
              "US",
              "GB",
              "DE",
              "FR",
              "CA",
              "AU",
              "ES",
              "IT",
              "BR",
              "NL",
              "AR",
              "AT",
              "BE",
              "BG",
              "CH",
              "CL",
              "CO",
              "CZ",
              "DK",
              "EG",
              "FI",
              "GR",
              "HK",
              "HR",
              "HU",
              "ID",
              "IE",
              "IL",
              "IN",
              "JP",
              "KR",
              "MX",
              "MY",
              "NG",
              "NO",
              "NZ",
              "PE",
              "PH",
              "PK",
              "PL",
              "PT",
              "RO",
              "SA",
              "SE",
              "SG",
              "SK",
              "TH",
              "TR",
              "TW",
              "UA",
              "VN",
              "ZA"
            ],
            "type": "string",
            "description": "Country for proxy geolocation and result localization. Can affect which visual matches and related links are returned.",
            "default": "US"
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum number of visual matches and related links to return.",
            "default": 50
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}