Skip to content

Command line ​

text
yandex [OPTIONS] [INPUT]

INPUT is a text query or a Yandex Images search, viewer, or similar-results URL. It is optional with --similar-to and --render-existing, and not used with --similar-to-file or --serve. Run yandex --help for the full text.

Archive options ​

OptionDescription
-o, --output <DIR>Archive folder (default yandex-archive).
-l, --limit <N>Maximum new distinct original URLs attempted (default 100).
--max-pages <N>Maximum result pages loaded (default 2).
--domain <DOMAIN>Site for text queries and generated similar searches.
--offline / --no-offlineBuild the offline gallery, or override offline = true from TOML.
--config <FILE>Read a TOML configuration file.
--similar-to <IMAGE_ID>Archive images similar to an archived image.
--similar-to-file <FILE>Add a picture from your computer and archive images similar to it.
--from-html <FILE>Import one browser-saved results page; INPUT is its URL.
--on-challenge <auto|prompt|stop>How to handle verification (default auto).
--orientation, --kind, --color, --size, --formatSearch hints sent to Yandex.
--nonconforming <review|discard>Where images that fail file rules go.
--no-evaluationDisable remote evaluation enabled in TOML.

Output options ​

OptionDescription
--progressShow progress on stderr.
--jsonPrint the final report as JSON, even in a terminal.
OptionDescription
--render-existingRebuild index.html from index.json, without network access.
--serveServe the galleries in --output in the browser: create, browse, and curate.
--bind <IP>Address for --serve to listen on (default 127.0.0.1; 0.0.0.0 in a container).
--port <N>Port for --serve (default 8787; 0 picks a free port).

Report ​

In a terminal, a run ends with a readable summary. When stdout is redirected, or with --json, it prints a JSON report:

FieldMeaning
stopWhy the run ended: limit, page_limit, saved_page, exhausted, repeated_page, or interrupted.
pagesResult pages read.
attemptedNew originals tried.
saved, review, discardedOutcomes of new originals.
duplicatesResults already archived, or identical to an archived file.
unavailableFailed, invalid, unsupported, or oversized originals.
evaluation_failuresEvaluation requests that failed.
warningsUp to ten examples of problems.
next_pageFor a saved page: the next results URL to open and save.

Exit status ​

StatusMeaning
0The run finished.
1An error, including a verification challenge or HTTP 429. Completed work is kept.
130Interrupted with Ctrl+C. Completed work is kept.

Released under the MIT License. Not affiliated with or endorsed by Yandex LLC.