CLI reference

zyte-api

Send Zyte API requests.

usage: zyte-api [-h] [--intype {txt,jl}] [--limit LIMIT] [--output OUTPUT]
                [--n-conn N_CONN] [--api-key API_KEY] [--api-url API_URL]
                [--loglevel {DEBUG,INFO,WARNING,ERROR}] [--shuffle]
                [--dont-retry-errors] [--store-errors]
                INPUT

Positional Arguments

INPUT

Path to an input file (see ‘Command-line client > Input file’ in the docs for details).

Named Arguments

--intype

Possible choices: txt, jl

Type of the input file, either ‘txt’ (plain text) or ‘jl’ (JSON Lines).

If not specified, the input type is guessed based on the input file extension (‘.jl’, ‘.jsonl’, or ‘.txt’), or in its content, with ‘txt’ as fallback.

--limit

Maximum number of requests to send.

--output, -o

Path for the output file. Results are written into the output file in JSON Lines format.

If not specified, results are printed to the standard output.

--n-conn

Number of concurrent connections to use (default: 20).

--api-key

Zyte API key.

--api-url

Zyte API endpoint (default: “https://api.zyte.com/v1/”).

--loglevel, -L

Possible choices: DEBUG, INFO, WARNING, ERROR

Log level (default: “INFO”).

--shuffle

Shuffle request order.

--dont-retry-errors

Do not retry unsuccessful responses and network errors, only rate-limiting responses.

--store-errors

Store error responses in the output file.

If omitted, only successful responses are stored.