Reverse Image Search
curl --request GET \
--url https://scrapebadger.com/v1/yandex/images/reverse \
--header 'X-API-Key: <x-api-key>'import requests
url = "https://scrapebadger.com/v1/yandex/images/reverse"
headers = {"X-API-Key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<x-api-key>'}};
fetch('https://scrapebadger.com/v1/yandex/images/reverse', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://scrapebadger.com/v1/yandex/images/reverse",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://scrapebadger.com/v1/yandex/images/reverse"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://scrapebadger.com/v1/yandex/images/reverse")
.header("X-API-Key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://scrapebadger.com/v1/yandex/images/reverse")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"query_image_url": "<string>",
"domain": "<string>",
"search_url": "<string>",
"cbir_id": "<string>",
"is_empty": true,
"preview": {},
"result_count": 123,
"sites": [
{
"title": "<string>",
"description": "<string>",
"url": "<string>",
"domain": "<string>",
"thumbnail": {},
"original_image": {}
}
],
"similar_images": [
{}
],
"tags": [
{}
],
"other_sizes": [
{}
]
}Search
Reverse Image Search
Reverse image search by URL — find the pages that host an image, visually similar images, detected tags and other sizes, via Yandex’s CBIR flow.
GET
/
v1
/
yandex
/
images
/
reverse
Reverse Image Search
curl --request GET \
--url https://scrapebadger.com/v1/yandex/images/reverse \
--header 'X-API-Key: <x-api-key>'import requests
url = "https://scrapebadger.com/v1/yandex/images/reverse"
headers = {"X-API-Key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<x-api-key>'}};
fetch('https://scrapebadger.com/v1/yandex/images/reverse', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://scrapebadger.com/v1/yandex/images/reverse",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://scrapebadger.com/v1/yandex/images/reverse"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://scrapebadger.com/v1/yandex/images/reverse")
.header("X-API-Key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://scrapebadger.com/v1/yandex/images/reverse")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"query_image_url": "<string>",
"domain": "<string>",
"search_url": "<string>",
"cbir_id": "<string>",
"is_empty": true,
"preview": {},
"result_count": 123,
"sites": [
{
"title": "<string>",
"description": "<string>",
"url": "<string>",
"domain": "<string>",
"thumbnail": {},
"original_image": {}
}
],
"similar_images": [
{}
],
"tags": [
{}
],
"other_sizes": [
{}
]
}Reverse image search by URL. Pass a public image URL and Yandex returns the web
pages that host (a copy of) it, visually similar images, detected object tags
and the same image at other resolutions.
Credits: 7
Authorization
string
required
Your ScrapeBadger API key.
Query Parameters
string
required
Public URL of the image to reverse-search.
string
default:"tr"
Yandex domain:
tr (default), com, ru, by, kz, uz. com/ru have
a lower success rate. See /markets.Response
string
Echo of the image URL you searched.
string
The domain the search ran on.
string
The Yandex CBIR URL that was scraped.
string
Yandex’s internal id for the uploaded image query.
boolean
true when Yandex found no matches for the image.Image
Yandex’s preview of the query image:
url, width, height.integer
Number of hosting pages returned.
CbirSite[]
SimilarImage[]
Visually similar images (
title, thumbnail, url, width, height).ImageTag[]
Objects/refinements Yandex detected in the image (
text, url).OtherSize[]
The same image at different resolutions (
label, url, width, height).Example
curl "https://scrapebadger.com/v1/yandex/images/reverse?image_url=https://example.com/photo.jpg&domain=tr" \
-H "X-API-Key: YOUR_API_KEY"
const res = await fetch(
"https://scrapebadger.com/v1/yandex/images/reverse?" +
new URLSearchParams({ image_url: "https://example.com/photo.jpg", domain: "tr" }),
{ headers: { "X-API-Key": process.env.SCRAPEBADGER_API_KEY } },
);
const data = await res.json();
import requests
res = requests.get(
"https://scrapebadger.com/v1/yandex/images/reverse",
headers={"X-API-Key": "YOUR_API_KEY"},
params={"image_url": "https://example.com/photo.jpg", "domain": "tr"},
)
data = res.json()
Response
{
"query_image_url": "https://example.com/photo.jpg",
"domain": "tr",
"search_url": "https://yandex.com.tr/images/search?cbir_id=...&rpt=imageview",
"cbir_id": "1234567/abcdef",
"is_empty": false,
"preview": { "url": "https://avatars.mds.yandex.net/i?id=preview", "width": 450, "height": 300 },
"result_count": 12,
"sites": [
{
"title": "Product page",
"description": "Espresso machine — 2L, stainless steel",
"url": "https://shop.example.com/espresso",
"domain": "shop.example.com",
"thumbnail": { "url": "https://avatars.mds.yandex.net/i?id=thumb", "width": 200, "height": 133 },
"original_image": { "url": "https://shop.example.com/img/espresso.jpg", "width": 2000, "height": 1333 }
}
],
"similar_images": [
{ "title": "Similar machine", "thumbnail": "https://avatars.mds.yandex.net/i?id=sim", "url": "https://other.example.com/machine", "width": 1200, "height": 800 }
],
"tags": [{ "text": "espresso machine", "url": "https://yandex.com.tr/images/search?text=espresso+machine" }],
"other_sizes": [{ "label": "Original 2000×1333", "url": "https://shop.example.com/img/espresso.jpg", "width": 2000, "height": 1333 }]
}
Notes
Reverse search runs Yandex’s two-step CBIR flow: the API derives a
cbir_id
for your image, then reads the hosting pages, similar images, tags and other
sizes. When Yandex finds nothing, is_empty is true and the result arrays
are empty.
