AUR-QUERY(1)

NAME
aur-query - send requests to the aurweb RPC interface

SYNOPSIS
aur query [-t type] [-b by] pkgname [pkgname...]

DESCRIPTION
aur-query retrieves package information from an AUR endpoint by sending HTTP GET or POST requests to the RPC interface (https://aur.archlinux.org/rpc.php) with curl(1).

Arguments are taken from the command-line. If the first argument is - or /dev/stdin, arguments are taken from standard input. JSON responses are delimited by newlines (JSON Lines).

For search type requests, the intersection of results is taken by default.

OPTIONS
The request type and arguments must be compatible to the chosen RPC version (see the AUR_QUERY_RPC_VERSION environment variable). The options below assume RPC v5.

-b, --by=<KIND>
    Arguments for package search (--type=search). Can be one of name, name-desc, maintainer, depends, makedepends, optdepends, or checkdepends.

-t, --type=<NAME>
    Type of request. Can be one of search or info.

-a, --any
    Return the set union of results instead of the intersection. Applies to search requests. The result is a single JSON structure, delimited by a newline.

-e, --exit-if-empty
    If no results are found, exit with status 1 instead of 0.

-r, --raw
    Do not process results. Implied by --type=info.

EXIT STATUS
aur-query returns 0 if no errors occured, 1 if no results were found and the --exit-if-empty option is specified, and 2 if a request resulted in an error (type=error).

ENVIRONMENT

AUR_LOCATION
    The URI of the AUR endpoint. Defaults to https://aur.archlinux.org.

AUR_QUERY_PARALLEL
    If set to a positive value, transfers are done with curl --parallel. This requires curl(1) version >=7.77.0.

AUR_QUERY_PARALLEL_MAX
    The amount of maximal parallel transfers (defaults to 15). Translates to curl --parallel-max.

AUR_QUERY_RPC
    The URI of the RPC interface. Defaults to $AUR_LOCATION/rpc/?v=5.

AUR_QUERY_RPC_POST
    If set to a positive value, use HTTP POST for requests. Defaults to 1.

    For info-type requests, more packages can be queried in a single request with HTTP POST than with HTTP GET, and this approach is preferable especially when querying large numbers of packages.

AUR_QUERY_RPC_SPLITNO
    The amount of packages listed per URI when using HTTP GET for info-type requests. This is used to avoid HTTP 414 errors with larger sets (>200) of packages (FS#49089). Defaults to 150.

AUR_QUERY_RPC_SPLITNO_POST
    The amount of packages in the message body when using HTTP POST for info-type requests. Defaults to 2000. This value should not be set higher than 5000 (the maximum amount of package results in an info request).

AUR_QUERY_RPC_VERSION
    The version for the RPC endpoint. Defaults to 5.

NOTES
The default set of options for curl(1) are -A aurutils -fgLsSq.

SEE ALSO
aur-depends(1), aur-search(1), aur-vercmp(1), curl(1), jq(1)

AUTHORS
Alad Wenter (https://github.com/AladW)