{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Lens Api",
    "description": "Search images with Google Lens to find similar pictures, products, exact matches, original sources, text, translations, and image answers in batches.",
    "version": "0.5",
    "x-build-id": "6uOGDA07jk91xguvx"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/devcake~google-lens-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-devcake-google-lens-scraper",
        "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~google-lens-scraper/runs": {
      "post": {
        "operationId": "runs-sync-devcake-google-lens-scraper",
        "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~google-lens-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-devcake-google-lens-scraper",
        "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": [
          "searchTypes"
        ],
        "properties": {
          "imageUrls": {
            "title": "Image URLs",
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "description": "Public HTTP(S) JPG, PNG, WebP, GIF, BMP, or TIFF URLs up to 20 MB and 40 megapixels. Duplicate URLs are processed once.",
            "items": {
              "type": "string",
              "pattern": "^https?://"
            }
          },
          "imageFile": {
            "title": "Upload an image",
            "type": "string",
            "description": "Upload one image from your device. You can use it together with image URLs."
          },
          "searchTypes": {
            "title": "Search modes",
            "minItems": 1,
            "type": "array",
            "description": "Google Lens modes to run for every image. Visual matches and OCR are selected by default; choose All modes only when you need every experimental mode.",
            "items": {
              "type": "string",
              "enum": [
                "all",
                "visual-match",
                "products",
                "exact-match",
                "ocr",
                "translate-ocr",
                "ai-mode",
                "homework"
              ],
              "enumTitles": [
                "All modes",
                "Visual matches",
                "Products",
                "Exact matches",
                "OCR",
                "Translate OCR",
                "AI Mode",
                "Homework"
              ]
            },
            "default": [
              "visual-match",
              "ocr"
            ]
          },
          "maxResults": {
            "title": "Results per search mode",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum matches kept for each mode. Google still controls availability. Extended Visual Search can run additional bounded region queries but does not guarantee this number.",
            "default": 20
          },
          "visualSearchDepth": {
            "title": "Visual search depth",
            "enum": [
              "standard",
              "extended"
            ],
            "type": "string",
            "description": "Standard follows native continuation pages and checks the Visual Matches tab for the full image. Extended does that first, then searches salient image regions until the result target or query limit is reached.",
            "default": "standard"
          },
          "maxVisualQueries": {
            "title": "Maximum native visual queries",
            "minimum": 1,
            "maximum": 6,
            "type": "integer",
            "description": "Maximum full-image plus crop uploads in Extended mode. Continuation pages and the Visual Matches tab do not count as additional uploads.",
            "default": 4
          },
          "fallbackText": {
            "title": "Visual search hint",
            "maxLength": 500,
            "type": "string",
            "description": "Optional words that describe the image. Used only when the visual search needs help."
          },
          "ocrOutputDetail": {
            "title": "OCR detail",
            "enum": [
              "full",
              "paragraphs",
              "lines",
              "words",
              "text_only"
            ],
            "type": "string",
            "description": "Choose whether OCR returns all structures, paragraphs, lines, words, or text only.",
            "default": "full"
          },
          "translateTo": {
            "title": "Translate OCR to",
            "pattern": "^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})?$",
            "type": "string",
            "description": "Target language used by Translate OCR, for example en, es, de, or ja.",
            "default": "en"
          },
          "aiModeQuestions": {
            "title": "AI Mode questions",
            "maxItems": 10,
            "type": "array",
            "description": "Questions asked when AI Mode is selected. If empty, the Actor asks what is shown in the image.",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "resolveOriginalImages": {
            "title": "Resolve original image URLs",
            "type": "boolean",
            "description": "Visit exact-match source pages and identify the best original image candidate. This is slower and uses additional requests.",
            "default": false
          },
          "exactMatchScope": {
            "title": "Exact-match scope",
            "enum": [
              "full_image",
              "auto_crop"
            ],
            "type": "string",
            "description": "Full image searches the complete frame; Auto crop lets Google focus on a detected region.",
            "default": "full_image"
          },
          "language": {
            "title": "Result language",
            "enum": [
              "en",
              "es",
              "de",
              "fr",
              "it",
              "pt",
              "nl",
              "pl",
              "cs",
              "tr",
              "ru",
              "uk",
              "ar",
              "he",
              "hi",
              "id",
              "ja",
              "ko",
              "zh-cn",
              "zh-tw"
            ],
            "type": "string",
            "description": "Language for search results and OCR recognition.",
            "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 used for Google result localization.",
            "default": "US"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}