AQL Syntax

JFrog Artifactory Documentation

JFrog Artifactory
Content Type
User Guide

The following table describes the elements.




The query corresponding to the primary domain. Must be one of items, builds or entries.


The search criteria in valid JSON format


(Optional) There is a default set of fields for query output. This parameter lets you specify a different set of fields that should be included in the output


(Optional) The fields on which the output should be sorted, and the sort order. A default set of fields and sort order is defined for each domain.


(Optional) The maximum number of records that should be extracted. If omitted, all records answering the query criteria will be extracted.


(Optional) The offset from the first record from which to display results (i.e. how many results should be skipped for display)


(Optional) Disable or enable unique query results. Enabled by default.

From Artifactory 7.37.x, the AQL query supports disabling of unique results. This can be used to speed up the query or to get the results "as is". This replaces the previous search results for text-based AQL queries, which are unique by default (native SQL selects contain 'distinct' terms).

For example:

// Find all unique jars's names in artifactory 
items.find({"name" : {"$match":"*.jar"}}).include("name")

// Find all jars's names in artifactory includes repeated values across different repositories.
items.find({"name" : {"$match":"*.jar"}}).include("name").distinct(false)
// Find all jar items in a repository called "my_local".
// Property "path" already unique inside single repository and unique results can be disabled for performance reason.
        {"repo" : "my_local"},
        {"name" : {"$match":"*.jar"}}


Sort, limit , and offset elements only work in the following cases.

  • Your query does not have an include element

  • If you do have an include element, you only specify fields from the primary domain in it.

For example, in the following query, sort, limit and offset will not work because the primary domain is item, but the include element specifies that fields from the artifact, module and build domains should be displayed: