{
  "openapi": "3.0.1",
  "info": {
    "title": "Yandex Reverse Image Search API",
    "description": "Search Yandex by image. Give an image URL and get every page where it appears online, visually similar images, other sizes, matching shop products, and image tags as clean JSON. Crop-box targeting, 6 regional domains, pay per result.",
    "version": "0.0",
    "x-build-id": "F2Lh9MuUa6dbnXMzu"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/johnvc~yandex-reverse-image-search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-johnvc-yandex-reverse-image-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/johnvc~yandex-reverse-image-search/runs": {
      "post": {
        "operationId": "runs-sync-johnvc-yandex-reverse-image-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/johnvc~yandex-reverse-image-search/run-sync": {
      "post": {
        "operationId": "run-sync-johnvc-yandex-reverse-image-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": [
          "image_url"
        ],
        "properties": {
          "image_url": {
            "title": "Image URL",
            "type": "string",
            "description": "Provide the public http(s) URL of the image to search by. Yandex fetches this URL, so it must be reachable from the internet (no localhost or private links). Example: `https://substack-post-media.s3.amazonaws.com/public/images/edbfb2cd-ebcb-4527-bec7-5315c182278f_445x445.png`."
          },
          "crop": {
            "title": "Crop box",
            "pattern": "^$|^\\s*(0(\\.\\d+)?|1(\\.0+)?)(\\s*;\\s*(0(\\.\\d+)?|1(\\.0+)?)){3}\\s*$",
            "type": "string",
            "description": "Optionally crop the image before searching, as four ';'-separated fractions between 0 and 1 in the order left;top;right;bottom. Example: `0.1;0.2;0.9;0.8` searches only the middle of the image. Leave blank to search the whole image - do NOT put the image URL here."
          },
          "include_matching_pages": {
            "title": "Matching pages",
            "type": "boolean",
            "description": "Return pages where this image (or a close match) appears online, with page title, link, and snippet. Rows with result_type 'matching_page'. On by default.",
            "default": true
          },
          "include_similar_images": {
            "title": "Similar images",
            "type": "boolean",
            "description": "Return visually similar images from across the web. Each row carries a thumbnail, the full-size image URL, and the site hosting it. Yandex returns no page title or snippet for this result type, so those columns stay empty. Rows with result_type 'similar_image'. On by default.",
            "default": true
          },
          "include_image_sizes": {
            "title": "Other sizes",
            "type": "boolean",
            "description": "Return other resolutions of the same image, categorized large / medium / small. Rows with result_type 'image_size'. Off by default.",
            "default": false
          },
          "include_image_tags": {
            "title": "Image tags",
            "type": "boolean",
            "description": "Return suggested search terms describing what is in the image. Rows with result_type 'image_tag'. Off by default.",
            "default": false
          },
          "include_shopping_results": {
            "title": "Shopping matches",
            "type": "boolean",
            "description": "Return e-commerce products that match the image content, with prices where available. Yandex only fills this section for a minority of images, so many searches return no product rows at all. Rows with result_type 'shopping_result'. Off by default.",
            "default": false
          },
          "include_knowledge_graph": {
            "title": "Knowledge graph",
            "type": "boolean",
            "description": "Return the entity card when the image contains a recognizable subject (a person, landmark, product, or brand). One row with result_type 'knowledge_graph'. Off by default.",
            "default": false
          },
          "yandex_domain": {
            "title": "Yandex Domain",
            "enum": [
              "yandex.com",
              "yandex.ru",
              "yandex.by",
              "yandex.kz",
              "yandex.uz",
              "yandex.com.tr"
            ],
            "type": "string",
            "description": "The regional Yandex domain to search from. Defaults to 'yandex.com'. Results can differ by region.",
            "default": "yandex.com"
          },
          "max_results": {
            "title": "Maximum results",
            "minimum": 10,
            "type": "integer",
            "description": "Cap the total number of result rows returned by this run. Results are sold in blocks of 10: the minimum is 10, and any other value rounds up to the next multiple of 10 (15 becomes 20). Every search bills at least one block, and each further block of up to 10 rows bills in full even when Yandex fills only part of it, so ask for what you need. There is no unlimited setting; use a large value such as 500 to collect everything the search finds. Rows fill in section order (matching pages, similar images, other sizes, image tags, shopping matches, knowledge graph), so a low cap combined with several result types can use up the whole allowance on the first type. Turn off the types you do not need rather than relying on the cap.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}