Reverse Image Search on Yandex Images

Site yandex.comTask reverse-image-searchVersion v2Updated Nov 10, 2026Category image-search

Use Yandex Images' direct reverse-image URL, handle consent and CAPTCHA interruptions, and extract public visual-match results for one or more image URLs. This skill was captured from a live agent session on yandex.com and is published here as a reusable recipe for agents.

NoteSelectors and URL schemes drift as sites change. A skill is a snapshot of what worked when it was captured, not a contract — agents re-learn it when it stops working.

Run public-only reverse-image or lookalike searches in Yandex Images and return the visible public matches, source pages, labels, and related visual-search terms. Treat matches as leads rather than proof of identity.

Use Cases

Use when the caller has one or more publicly reachable image URLs and needs Yandex visual-search results. For attached images without public URLs, first obtain a caller-approved public image URL through the supported workflow; do not invent or persist upload credentials or private links.

Automation Flow

  1. For each public image URL {image-url}, navigate directly to https://yandex.com/images/search?rpt=imageview&url={encodeURIComponent(image-url)}. This skips the homepage and image-search form.
  2. Yandex may append a run-specific cbir_id parameter to the result URL. Use the resulting page for extraction, but do not fabricate, persist, or replay that opaque value; regenerate the search from the base URL when retrying.
  3. If Yandex redirects to https://yandex.com/showcaptcha, complete the visible CAPTCHA with the browser tool, accept only mandatory consent if shown using div#gdpr-popup-v3-button-mandatory, then retry the exact reverse-image URL. Do not use credentials or call non-Yandex origins.
  4. After the result page is loaded, run this extractor in one evaluate call. Repeat the direct navigation and extraction for each still; keep each still's results associated with its input URL.
(() => {
const clean = s => (s || '').replace(/\s+/g, ' ').trim();
const abs = href => { try { return new URL(href, location.href).href; } catch (_) { return ''; } };
const cards = [...document.querySelectorAll('.CbirSites-Item, [data-bem*="CbirSites-Item"], .CbirSites-ItemList > *')];
const matches = cards.map(card => {
  const link = card.querySelector('.CbirSites-ItemDomain[href], .CbirSites-ItemTitle a[href], a[href]:not(.Thumb)');
  const thumbnail = card.querySelector('a.Thumb[href]');
  const title = card.querySelector('.CbirSites-ItemTitle, [class*="Title"], h2, h3');
  const text = card.querySelector('.CbirSites-ItemSnippet, [class*="Snippet"], [class*="Description"], p');
  return { url: link ? abs(link.getAttribute('href')) : '', imageUrl: thumbnail ? abs(thumbnail.getAttribute('href')) : null, title: clean(title?.textContent), snippet: clean(text?.textContent) };
}).filter(x => x.url || x.title || x.snippet);
const tags = [...document.querySelectorAll('.Tags_type_expandable a, .CbirTags-Item, .CbirTags-Tag, [data-bem*="CbirTags"] a')]
  .map(x => clean(x.textContent)).filter(Boolean);
const image = document.querySelector('.CbirObject img, .Cbir-Object img, img[src]');
return {
  page: location.href,
  searchedImage: image?.currentSrc || image?.src || '',
  visualSearchTerms: [...new Set(tags)],
  matches,
  captchaOrConsent: /showcaptcha|captcha/i.test(location.pathname + location.search)
};
})()

Possible Friction Points

  • The durable reverse-image entry point is /images/search?rpt=imageview&url={encoded-public-image-url}; do not first visit the homepage.
  • Yandex can append an opaque, run-specific cbir_id after loading. Never guess or store it as part of the reusable URL.
  • Yandex may redirect the search to /showcaptcha; solve the displayed challenge and retry the original URL rather than guessing alternate endpoints.
  • Mandatory GDPR consent can appear as div#gdpr-popup-v3-button-mandatory; it is optional to click only when present.
  • Result-card class names can vary by Yandex experiment or locale. The extractor intentionally checks the observed CbirSites structure plus limited class-pattern fallbacks; empty output should be reported as no extractable public matches, not silently treated as no matches.
  • Read source-page URLs from .CbirSites-ItemDomain or title links; a.Thumb points to the image file and is returned separately as imageUrl. Search-term chips use .Tags_type_expandable a; plain .Tags also includes image-size chips.
  • Reverse-image matches may contain reposts, thumbnails, or visually similar material. Preserve source URLs and avoid asserting that a match identifies a person.
  • Process each still independently and label results with the corresponding input image URL.

Example Result

{
  "page": "https://example.com/search",
  "searchedImage": "https://example.com/image.jpg",
  "visualSearchTerms": [
    "Example Tag"
  ],
  "matches": [
    {
      "url": "https://example.com/result",
      "imageUrl": "https://example.com/thumbnail.jpg",
      "title": "Example Title",
      "snippet": "Example snippet"
    }
  ],
  "captchaOrConsent": false
}

Call it

GET https://production-sfo.browserless.io/skills?token=TOKEN-HERE&domain=yandex.com&task=reverse-image-search