Sorry, no results found for "".

Content Delivery API > Filtering uploads

Filtering uploads

You can supply different parameters to the filter argument to filter the query response accordingly:

query {
allUploads(filter: { type: { eq: image } }) {
url
copyright
exifInfo
}
}

If you specify multiple conditions, they will be combined as if it was a logical AND expression:

query {
allUploads(filter: { type: { eq: image }, resolution: { eq: large }}) {
blurUpThumb
url(imgixParams: { w: 100, h: 100, fit: crop })
}
}

You can also combine AND and OR logical expressions. For example, the following query will return all large images together with any video tagged with "fun":

1
query {
2
allUploads(
3
filter: {
4
OR: [
5
{ type: { eq: image }, resolution: { eq: large }},
6
{ type: { eq: video }, tags: { contains: "fun" }}
7
]
8
}
9
) {
10
blurUpThumb
11
url(imgixParams: {w: 100, h: 100, fit: crop})
12
}
13
}

Available filters

Filter by _createdAt

Search for uploads with an exact match

1
query {
2
allProducts(
3
filter: {
4
_createdAt: {
5
eq: "2018-02-13T14:30:00+00:00"
6
}
7
}
8
) {
9
title
10
}
11
}

Exclude uploads with an exact match

1
query {
2
allProducts(
3
filter: {
4
_createdAt: {
5
neq: "2018-02-13T14:30:00+00:00"
6
}
7
}
8
) {
9
title
10
}
11
}

Filter uploads with a value that's less than the one specified

1
query {
2
allProducts(
3
filter: {
4
_createdAt: {
5
lt: "2018-02-13T14:30:00+00:00"
6
}
7
}
8
) {
9
title
10
}
11
}

Filter uploads with a value that's less or equal than the one specified

1
query {
2
allProducts(
3
filter: {
4
_createdAt: {
5
lte: "2018-02-13T14:30:00+00:00"
6
}
7
}
8
) {
9
title
10
}
11
}

Filter uploads with a value that's strictly greater than the one specified

1
query {
2
allProducts(
3
filter: {
4
_createdAt: {
5
gt: "2018-02-13T14:30:00+00:00"
6
}
7
}
8
) {
9
title
10
}
11
}

Filter uploads with a value that's greater than or equal to the one specified

1
query {
2
allProducts(
3
filter: {
4
_createdAt: {
5
gte: "2018-02-13T14:30:00+00:00"
6
}
7
}
8
) {
9
title
10
}
11
}

Filter by _updatedAt

Search for uploads with an exact match

1
query {
2
allProducts(
3
filter: {
4
_updatedAt: {
5
eq: "2018-02-13T14:30:00+00:00"
6
}
7
}
8
) {
9
title
10
}
11
}

Exclude uploads with an exact match

1
query {
2
allProducts(
3
filter: {
4
_updatedAt: {
5
neq: "2018-02-13T14:30:00+00:00"
6
}
7
}
8
) {
9
title
10
}
11
}

Filter uploads with a value that's less than the one specified

1
query {
2
allProducts(
3
filter: {
4
_updatedAt: {
5
lt: "2018-02-13T14:30:00+00:00"
6
}
7
}
8
) {
9
title
10
}
11
}

Filter uploads with a value that's less or equal than the one specified

1
query {
2
allProducts(
3
filter: {
4
_updatedAt: {
5
lte: "2018-02-13T14:30:00+00:00"
6
}
7
}
8
) {
9
title
10
}
11
}

Filter uploads with a value that's strictly greater than the one specified

1
query {
2
allProducts(
3
filter: {
4
_updatedAt: {
5
gt: "2018-02-13T14:30:00+00:00"
6
}
7
}
8
) {
9
title
10
}
11
}

Filter uploads with a value that's greater than or equal to the one specified

1
query {
2
allProducts(
3
filter: {
4
_updatedAt: {
5
gte: "2018-02-13T14:30:00+00:00"
6
}
7
}
8
) {
9
title
10
}
11
}

Filter by alt

Filter uploads based on a regular expression

1
query {
2
allProducts(
3
filter: {
4
altField: {
5
matches: { pattern: "bi(cycl|k)e", caseSensitive: false }
6
}
7
}
8
) {
9
title
10
}
11
}

Exclude uploads based on a regular expression

1
query {
2
allProducts(
3
filter: {
4
altField: {
5
notMatches: { pattern: "bi(cycl|k)e", caseSensitive: false }
6
}
7
}
8
) {
9
title
10
}
11
}

Search the uploads with the specified alt

1
query {
2
allProducts(filter: { altField: { eq: "bike" } }) {
3
title
4
}
5
}

Exclude the uploads with the specified alt

1
query {
2
allProducts(filter: { altField: { neq: "bike" } }) {
3
title
4
}
5
}

Search uploads with the specified values as default alt

1
query {
2
allProducts(filter: { altField: { in: ["bike"] } }) {
3
title
4
}
5
}

Search uploads that do not have the specified values as default alt

1
query {
2
allProducts(filter: { altField: { notIn: ["bike"] } }) {
3
title
4
}
5
}

Filter uploads with the specified field defined (i.e. with any value) or not

1
query {
2
allProducts(filter: { altField: { exists: true } }) {
3
title
4
}
5
}

Filter by author

Filter uploads based on a regular expression

1
query {
2
allProducts(
3
filter: {
4
authorField: {
5
matches: { pattern: "bi(cycl|k)e", caseSensitive: false }
6
}
7
}
8
) {
9
title
10
}
11
}

Exclude uploads based on a regular expression

1
query {
2
allProducts(
3
filter: {
4
authorField: {
5
notMatches: { pattern: "bi(cycl|k)e", caseSensitive: false }
6
}
7
}
8
) {
9
title
10
}
11
}

Filter uploads with the specified field defined (i.e. with any value) or not

1
query {
2
allProducts(filter: { authorField: { exists: true } }) {
3
title
4
}
5
}

Filter by basename

Filter uploads based on a regular expression

1
query {
2
allProducts(
3
filter: {
4
basenameField: {
5
matches: { pattern: "bi(cycl|k)e", caseSensitive: false }
6
}
7
}
8
) {
9
title
10
}
11
}

Exclude uploads based on a regular expression

1
query {
2
allProducts(
3
filter: {
4
basenameField: {
5
notMatches: { pattern: "bi(cycl|k)e", caseSensitive: false }
6
}
7
}
8
) {
9
title
10
}
11
}

Filter by colors

Filter uploads that have the specified colors

1
query {
2
allProducts(filter: { colorsField: { contains: red } }) {
3
title
4
}
5
}

Filter uploads that have all of the specified colors

1
query {
2
allProducts(filter: { colorsField: { allIn: [red] } }) {
3
title
4
}
5
}

Filter uploads that have at least one of the specified colors

1
query {
2
allProducts(filter: { colorsField: { anyIn: [red] } }) {
3
title
4
}
5
}

Filter uploads that do not have any of the specified colors

1
query {
2
allProducts(filter: { colorsField: { notIn: [red] } }) {
3
title
4
}
5
}

Search for uploads with an exact match

1
query {
2
allProducts(filter: { colorsField: { eq: [red] } }) {
3
title
4
}
5
}

Filter by copyright

Filter uploads based on a regular expression

1
query {
2
allProducts(
3
filter: {
4
copyrightField: {
5
matches: { pattern: "bi(cycl|k)e", caseSensitive: false }
6
}
7
}
8
) {
9
title
10
}
11
}

Exclude uploads based on a regular expression

1
query {
2
allProducts(
3
filter: {
4
copyrightField: {
5
notMatches: { pattern: "bi(cycl|k)e", caseSensitive: false }
6
}
7
}
8
) {
9
title
10
}
11
}

Filter records with the specified field defined (i.e. with any value) or not

1
query {
2
allProducts(filter: { copyrightField: { exists: true } }) {
3
title
4
}
5
}

Filter by filename

Filter uploads based on a regular expression

1
query {
2
allProducts(
3
filter: {
4
filenameField: {
5
matches: { pattern: "bi(cycl|k)e", caseSensitive: false }
6
}
7
}
8
) {
9
title
10
}
11
}

Exclude uploads based on a regular expression

1
query {
2
allProducts(
3
filter: {
4
filenameField: {
5
notMatches: { pattern: "bi(cycl|k)e", caseSensitive: false }
6
}
7
}
8
) {
9
title
10
}
11
}

Filter by format

Search the asset with the specified format

1
query {
2
allProducts(filter: { formatField: { eq: "bike" } }) {
3
title
4
}
5
}

Exclude the asset with the specified format

1
query {
2
allProducts(filter: { formatField: { neq: "bike" } }) {
3
title
4
}
5
}

Search assets with the specified formats

1
query {
2
allProducts(filter: { formatField: { in: ["bike"] } }) {
3
title
4
}
5
}

Search assets that do not have the specified formats

1
query {
2
allProducts(filter: { formatField: { notIn: ["bike"] } }) {
3
title
4
}
5
}

Filter by height

Search all assets larger than the specified height

1
query {
2
allProducts(filter: { heightField: { gt: 3 } }) {
3
title
4
}
5
}

Search all assets smaller than the specified height

1
query {
2
allProducts(filter: { heightField: { lt: 3 } }) {
3
title
4
}
5
}

Search all assets larger or equal to the specified height

1
query {
2
allProducts(filter: { heightField: { gte: 3 } }) {
3
title
4
}
5
}

Search all assets larger or equal to the specified height

1
query {
2
allProducts(filter: { heightField: { lte: 3 } }) {
3
title
4
}
5
}

Search assets with the specified height

1
query {
2
allProducts(filter: { heightField: { eq: 3 } }) {
3
title
4
}
5
}

Search assets that do not have the specified height

1
query {
2
allProducts(filter: { heightField: { neq: 3 } }) {
3
title
4
}
5
}

Filter by id

Search the asset with the specified ID

1
query {
2
allProducts(filter: { id: { eq: "123" } }) {
3
title
4
}
5
}

Exclude the asset with the specified ID

1
query {
2
allProducts(filter: { id: { neq: "123" } }) {
3
title
4
}
5
}

Search assets with the specified IDs

1
query {
2
allProducts(filter: { id: { in: ["123"] } }) {
3
title
4
}
5
}

Search assets that do not have the specified IDs

1
query {
2
allProducts(filter: { id: { notIn: ["123"] } }) {
3
title
4
}
5
}

Filter by inUse

Search uploads that are currently used by some record or not

1
query {
2
allProducts(filter: { inUseField: { eq: true } }) {
3
title
4
}
5
}

Filter by md5

Search the asset with the specified MD5

1
query {
2
allProducts(filter: { md5Field: { eq: "bike" } }) {
3
title
4
}
5
}

Exclude the asset with the specified MD5

1
query {
2
allProducts(filter: { md5Field: { neq: "bike" } }) {
3
title
4
}
5
}

Search assets with the specified MD5s

1
query {
2
allProducts(filter: { md5Field: { in: ["bike"] } }) {
3
title
4
}
5
}

Search assets that do not have the specified MD5s

1
query {
2
allProducts(filter: { md5Field: { notIn: ["bike"] } }) {
3
title
4
}
5
}

Filter by mimeType

Filter uploads based on a regular expression

1
query {
2
allProducts(
3
filter: {
4
mimeTypeField: {
5
matches: { pattern: "bi(cycl|k)e", caseSensitive: false }
6
}
7
}
8
) {
9
title
10
}
11
}

Exclude uploads based on a regular expression

1
query {
2
allProducts(
3
filter: {
4
mimeTypeField: {
5
notMatches: { pattern: "bi(cycl|k)e", caseSensitive: false }
6
}
7
}
8
) {
9
title
10
}
11
}

Search the asset with the specified mime type

1
query {
2
allProducts(filter: { mimeTypeField: { eq: "bike" } }) {
3
title
4
}
5
}

Exclude the asset with the specified mime type

1
query {
2
allProducts(filter: { mimeTypeField: { neq: "bike" } }) {
3
title
4
}
5
}

Search assets with the specified mime types

1
query {
2
allProducts(filter: { mimeTypeField: { in: ["bike"] } }) {
3
title
4
}
5
}

Search assets that do not have the specified mime types

1
query {
2
allProducts(filter: { mimeTypeField: { notIn: ["bike"] } }) {
3
title
4
}
5
}

Filter by notes

Filter uploads based on a regular expression

1
query {
2
allProducts(
3
filter: {
4
notesField: {
5
matches: { pattern: "bi(cycl|k)e", caseSensitive: false }
6
}
7
}
8
) {
9
title
10
}
11
}

Exclude uploads based on a regular expression

1
query {
2
allProducts(
3
filter: {
4
notesField: {
5
notMatches: { pattern: "bi(cycl|k)e", caseSensitive: false }
6
}
7
}
8
) {
9
title
10
}
11
}

Filter records with the specified field defined (i.e. with any value) or not

1
query {
2
allProducts(filter: { notesField: { exists: true } }) {
3
title
4
}
5
}

Filter by orientation

Search uploads with the specified orientation

1
query {
2
allProducts(filter: { orientationField: { eq: landscape } }) {
3
title
4
}
5
}

Exclude uploads with the specified orientation

1
query {
2
allProducts(filter: { orientationField: { neq: landscape } }) {
3
title
4
}
5
}

Filter by resolution

Search uploads with the specified resolution

1
query {
2
allProducts(filter: { resolutionField: { eq: icon } }) {
3
title
4
}
5
}

Exclude uploads with the specified resolution

1
query {
2
allProducts(filter: { resolutionField: { neq: icon } }) {
3
title
4
}
5
}

Search uploads with the specified resolutions

1
query {
2
allProducts(filter: { resolutionField: { in: [icon] } }) {
3
title
4
}
5
}

Search uploads without the specified resolutions

1
query {
2
allProducts(filter: { resolutionField: { notIn: [icon] } }) {
3
title
4
}
5
}

Filter by size

Search all assets larger than the specified size (in bytes)

1
query {
2
allProducts(filter: { sizeField: { gt: 3 } }) {
3
title
4
}
5
}

Search all assets smaller than the specified size (in bytes)

1
query {
2
allProducts(filter: { sizeField: { lt: 3 } }) {
3
title
4
}
5
}

Search all assets larger or equal to the specified size (in bytes)

1
query {
2
allProducts(filter: { sizeField: { gte: 3 } }) {
3
title
4
}
5
}

Search all assets larger or equal to the specified size (in bytes)

1
query {
2
allProducts(filter: { sizeField: { lte: 3 } }) {
3
title
4
}
5
}

Search assets with the specified size (in bytes)

1
query {
2
allProducts(filter: { sizeField: { eq: 3 } }) {
3
title
4
}
5
}

Search assets that do not have the specified size (in bytes)

1
query {
2
allProducts(filter: { sizeField: { neq: 3 } }) {
3
title
4
}
5
}

Filter by smartTags

Filter uploads linked to the specified tag

1
query {
2
allProducts(filter: { smartTagsField: { contains: "bike" } }) {
3
title
4
}
5
}

Filter uploads linked to all of the specified tags

1
query {
2
allProducts(filter: { smartTagsField: { allIn: ["bike"] } }) {
3
title
4
}
5
}

Filter uploads linked to at least one of the specified tags

1
query {
2
allProducts(filter: { smartTagsField: { anyIn: ["bike"] } }) {
3
title
4
}
5
}

Filter uploads not linked to any of the specified tags

1
query {
2
allProducts(filter: { smartTagsField: { notIn: ["bike"] } }) {
3
title
4
}
5
}

Search for uploads with an exact match

1
query {
2
allProducts(filter: { smartTagsField: { eq: ["bike"] } }) {
3
title
4
}
5
}

Filter by tags

Filter uploads linked to the specified tag

1
query {
2
allProducts(filter: { tagsField: { contains: "bike" } }) {
3
title
4
}
5
}

Filter uploads linked to all of the specified tags

1
query {
2
allProducts(filter: { tagsField: { allIn: ["bike"] } }) {
3
title
4
}
5
}

Filter uploads linked to at least one of the specified tags

1
query {
2
allProducts(filter: { tagsField: { anyIn: ["bike"] } }) {
3
title
4
}
5
}

Filter uploads not linked to any of the specified tags

1
query {
2
allProducts(filter: { tagsField: { notIn: ["bike"] } }) {
3
title
4
}
5
}

Search for uploads with an exact match

1
query {
2
allProducts(filter: { tagsField: { eq: ["bike"] } }) {
3
title
4
}
5
}

Filter by title

Filter uploads based on a regular expression

1
query {
2
allProducts(
3
filter: {
4
titleField: {
5
matches: { pattern: "bi(cycl|k)e", caseSensitive: false }
6
}
7
}
8
) {
9
title
10
}
11
}

Exclude uploads based on a regular expression

1
query {
2
allProducts(
3
filter: {
4
titleField: {
5
notMatches: { pattern: "bi(cycl|k)e", caseSensitive: false }
6
}
7
}
8
) {
9
title
10
}
11
}

Search the asset with the specified title

1
query {
2
allProducts(filter: { titleField: { eq: "bike" } }) {
3
title
4
}
5
}

Exclude the asset with the specified title

1
query {
2
allProducts(filter: { titleField: { neq: "bike" } }) {
3
title
4
}
5
}

Search assets with the specified as default title

1
query {
2
allProducts(filter: { titleField: { in: ["bike"] } }) {
3
title
4
}
5
}

Search assets that do not have the specified as default title

1
query {
2
allProducts(filter: { titleField: { notIn: ["bike"] } }) {
3
title
4
}
5
}

Filter assets with the specified field defined (i.e. with any value) or not

1
query {
2
allProducts(filter: { titleField: { exists: true } }) {
3
title
4
}
5
}

Filter by type

Search uploads with the specified type

1
query {
2
allProducts(filter: { typeField: { eq: image } }) {
3
title
4
}
5
}

Exclude uploads with the specified type

1
query {
2
allProducts(filter: { typeField: { neq: image } }) {
3
title
4
}
5
}

Search uploads with the specified types

1
query {
2
allProducts(filter: { typeField: { in: [image] } }) {
3
title
4
}
5
}

Search uploads without the specified types

1
query {
2
allProducts(filter: { typeField: { notIn: [image] } }) {
3
title
4
}
5
}

Filter by width

Search all assets larger than the specified width

1
query {
2
allProducts(filter: { widthField: { gt: 3 } }) {
3
title
4
}
5
}

Search all assets smaller than the specified width

1
query {
2
allProducts(filter: { widthField: { lt: 3 } }) {
3
title
4
}
5
}

Search all assets larger or equal to the specified width

1
query {
2
allProducts(filter: { widthField: { gte: 3 } }) {
3
title
4
}
5
}

Search all assets larger or equal to the specified width

1
query {
2
allProducts(filter: { widthField: { lte: 3 } }) {
3
title
4
}
5
}

Search assets with the specified width

1
query {
2
allProducts(filter: { widthField: { eq: 3 } }) {
3
title
4
}
5
}

Search assets that do not have the specified width

1
query {
2
allProducts(filter: { widthField: { neq: 3 } }) {
3
title
4
}
5
}