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":

query {
allUploads(
filter: {
OR: [
{ type: { eq: image }, resolution: { eq: large }},
{ type: { eq: video }, tags: { contains: "fun" }}
]
}
) {
blurUpThumb
url(imgixParams: {w: 100, h: 100, fit: crop})
}
}

Available filters

Filter by _createdAt

Search for uploads with an exact match

query {
allProducts(
filter: {
_createdAt: {
eq: "2018-02-13T14:30:00+00:00"
}
}
) {
title
}
}

Exclude uploads with an exact match

query {
allProducts(
filter: {
_createdAt: {
neq: "2018-02-13T14:30:00+00:00"
}
}
) {
title
}
}

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

query {
allProducts(
filter: {
_createdAt: {
lt: "2018-02-13T14:30:00+00:00"
}
}
) {
title
}
}

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

query {
allProducts(
filter: {
_createdAt: {
lte: "2018-02-13T14:30:00+00:00"
}
}
) {
title
}
}

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

query {
allProducts(
filter: {
_createdAt: {
gt: "2018-02-13T14:30:00+00:00"
}
}
) {
title
}
}

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

query {
allProducts(
filter: {
_createdAt: {
gte: "2018-02-13T14:30:00+00:00"
}
}
) {
title
}
}

Filter by _updatedAt

Search for uploads with an exact match

query {
allProducts(
filter: {
_updatedAt: {
eq: "2018-02-13T14:30:00+00:00"
}
}
) {
title
}
}

Exclude uploads with an exact match

query {
allProducts(
filter: {
_updatedAt: {
neq: "2018-02-13T14:30:00+00:00"
}
}
) {
title
}
}

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

query {
allProducts(
filter: {
_updatedAt: {
lt: "2018-02-13T14:30:00+00:00"
}
}
) {
title
}
}

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

query {
allProducts(
filter: {
_updatedAt: {
lte: "2018-02-13T14:30:00+00:00"
}
}
) {
title
}
}

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

query {
allProducts(
filter: {
_updatedAt: {
gt: "2018-02-13T14:30:00+00:00"
}
}
) {
title
}
}

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

query {
allProducts(
filter: {
_updatedAt: {
gte: "2018-02-13T14:30:00+00:00"
}
}
) {
title
}
}

Filter by alt

Filter uploads based on a regular expression

query {
allProducts(
filter: {
altField: {
matches: { pattern: "bi(cycl|k)e", caseSensitive: false }
}
}
) {
title
}
}

Exclude uploads based on a regular expression

query {
allProducts(
filter: {
altField: {
notMatches: { pattern: "bi(cycl|k)e", caseSensitive: false }
}
}
) {
title
}
}

Search the uploads with the specified alt

query {
allProducts(filter: { altField: { eq: "bike" } }) {
title
}
}

Exclude the uploads with the specified alt

query {
allProducts(filter: { altField: { neq: "bike" } }) {
title
}
}

Search uploads with the specified values as default alt

query {
allProducts(filter: { altField: { in: ["bike"] } }) {
title
}
}

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

query {
allProducts(filter: { altField: { notIn: ["bike"] } }) {
title
}
}

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

query {
allProducts(filter: { altField: { exists: true } }) {
title
}
}

Filter by author

Filter uploads based on a regular expression

query {
allProducts(
filter: {
authorField: {
matches: { pattern: "bi(cycl|k)e", caseSensitive: false }
}
}
) {
title
}
}

Exclude uploads based on a regular expression

query {
allProducts(
filter: {
authorField: {
notMatches: { pattern: "bi(cycl|k)e", caseSensitive: false }
}
}
) {
title
}
}

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

query {
allProducts(filter: { authorField: { exists: true } }) {
title
}
}

Filter by basename

Filter uploads based on a regular expression

query {
allProducts(
filter: {
basenameField: {
matches: { pattern: "bi(cycl|k)e", caseSensitive: false }
}
}
) {
title
}
}

Exclude uploads based on a regular expression

query {
allProducts(
filter: {
basenameField: {
notMatches: { pattern: "bi(cycl|k)e", caseSensitive: false }
}
}
) {
title
}
}

Filter by colors

Filter uploads that have the specified colors

query {
allProducts(filter: { colorsField: { contains: red } }) {
title
}
}

Filter uploads that have all of the specified colors

query {
allProducts(filter: { colorsField: { allIn: [red] } }) {
title
}
}

Filter uploads that have at least one of the specified colors

query {
allProducts(filter: { colorsField: { anyIn: [red] } }) {
title
}
}

Filter uploads that do not have any of the specified colors

query {
allProducts(filter: { colorsField: { notIn: [red] } }) {
title
}
}

Search for uploads with an exact match

query {
allProducts(filter: { colorsField: { eq: [red] } }) {
title
}
}

Filter by copyright

Filter uploads based on a regular expression

query {
allProducts(
filter: {
copyrightField: {
matches: { pattern: "bi(cycl|k)e", caseSensitive: false }
}
}
) {
title
}
}

Exclude uploads based on a regular expression

query {
allProducts(
filter: {
copyrightField: {
notMatches: { pattern: "bi(cycl|k)e", caseSensitive: false }
}
}
) {
title
}
}

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

query {
allProducts(filter: { copyrightField: { exists: true } }) {
title
}
}

Filter by filename

Filter uploads based on a regular expression

query {
allProducts(
filter: {
filenameField: {
matches: { pattern: "bi(cycl|k)e", caseSensitive: false }
}
}
) {
title
}
}

Exclude uploads based on a regular expression

query {
allProducts(
filter: {
filenameField: {
notMatches: { pattern: "bi(cycl|k)e", caseSensitive: false }
}
}
) {
title
}
}

Filter by format

Search the asset with the specified format

query {
allProducts(filter: { formatField: { eq: "bike" } }) {
title
}
}

Exclude the asset with the specified format

query {
allProducts(filter: { formatField: { neq: "bike" } }) {
title
}
}

Search assets with the specified formats

query {
allProducts(filter: { formatField: { in: ["bike"] } }) {
title
}
}

Search assets that do not have the specified formats

query {
allProducts(filter: { formatField: { notIn: ["bike"] } }) {
title
}
}

Filter by height

Search all assets larger than the specified height

query {
allProducts(filter: { heightField: { gt: 3 } }) {
title
}
}

Search all assets smaller than the specified height

query {
allProducts(filter: { heightField: { lt: 3 } }) {
title
}
}

Search all assets larger or equal to the specified height

query {
allProducts(filter: { heightField: { gte: 3 } }) {
title
}
}

Search all assets larger or equal to the specified height

query {
allProducts(filter: { heightField: { lte: 3 } }) {
title
}
}

Search assets with the specified height

query {
allProducts(filter: { heightField: { eq: 3 } }) {
title
}
}

Search assets that do not have the specified height

query {
allProducts(filter: { heightField: { neq: 3 } }) {
title
}
}

Filter by id

Search the asset with the specified ID

query {
allProducts(filter: { id: { eq: "123" } }) {
title
}
}

Exclude the asset with the specified ID

query {
allProducts(filter: { id: { neq: "123" } }) {
title
}
}

Search assets with the specified IDs

query {
allProducts(filter: { id: { in: ["123"] } }) {
title
}
}

Search assets that do not have the specified IDs

query {
allProducts(filter: { id: { notIn: ["123"] } }) {
title
}
}

Filter by inUse

Search uploads that are currently used by some record or not

query {
allProducts(filter: { inUseField: { eq: true } }) {
title
}
}

Filter by md5

Search the asset with the specified MD5

query {
allProducts(filter: { md5Field: { eq: "bike" } }) {
title
}
}

Exclude the asset with the specified MD5

query {
allProducts(filter: { md5Field: { neq: "bike" } }) {
title
}
}

Search assets with the specified MD5s

query {
allProducts(filter: { md5Field: { in: ["bike"] } }) {
title
}
}

Search assets that do not have the specified MD5s

query {
allProducts(filter: { md5Field: { notIn: ["bike"] } }) {
title
}
}

Filter by mimeType

Filter uploads based on a regular expression

query {
allProducts(
filter: {
mimeTypeField: {
matches: { pattern: "bi(cycl|k)e", caseSensitive: false }
}
}
) {
title
}
}

Exclude uploads based on a regular expression

query {
allProducts(
filter: {
mimeTypeField: {
notMatches: { pattern: "bi(cycl|k)e", caseSensitive: false }
}
}
) {
title
}
}

Search the asset with the specified mime type

query {
allProducts(filter: { mimeTypeField: { eq: "bike" } }) {
title
}
}

Exclude the asset with the specified mime type

query {
allProducts(filter: { mimeTypeField: { neq: "bike" } }) {
title
}
}

Search assets with the specified mime types

query {
allProducts(filter: { mimeTypeField: { in: ["bike"] } }) {
title
}
}

Search assets that do not have the specified mime types

query {
allProducts(filter: { mimeTypeField: { notIn: ["bike"] } }) {
title
}
}

Filter by notes

Filter uploads based on a regular expression

query {
allProducts(
filter: {
notesField: {
matches: { pattern: "bi(cycl|k)e", caseSensitive: false }
}
}
) {
title
}
}

Exclude uploads based on a regular expression

query {
allProducts(
filter: {
notesField: {
notMatches: { pattern: "bi(cycl|k)e", caseSensitive: false }
}
}
) {
title
}
}

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

query {
allProducts(filter: { notesField: { exists: true } }) {
title
}
}

Filter by orientation

Search uploads with the specified orientation

query {
allProducts(filter: { orientationField: { eq: landscape } }) {
title
}
}

Exclude uploads with the specified orientation

query {
allProducts(filter: { orientationField: { neq: landscape } }) {
title
}
}

Filter by resolution

Search uploads with the specified resolution

query {
allProducts(filter: { resolutionField: { eq: icon } }) {
title
}
}

Exclude uploads with the specified resolution

query {
allProducts(filter: { resolutionField: { neq: icon } }) {
title
}
}

Search uploads with the specified resolutions

query {
allProducts(filter: { resolutionField: { in: [icon] } }) {
title
}
}

Search uploads without the specified resolutions

query {
allProducts(filter: { resolutionField: { notIn: [icon] } }) {
title
}
}

Filter by size

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

query {
allProducts(filter: { sizeField: { gt: 3 } }) {
title
}
}

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

query {
allProducts(filter: { sizeField: { lt: 3 } }) {
title
}
}

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

query {
allProducts(filter: { sizeField: { gte: 3 } }) {
title
}
}

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

query {
allProducts(filter: { sizeField: { lte: 3 } }) {
title
}
}

Search assets with the specified size (in bytes)

query {
allProducts(filter: { sizeField: { eq: 3 } }) {
title
}
}

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

query {
allProducts(filter: { sizeField: { neq: 3 } }) {
title
}
}

Filter by smartTags

Filter uploads linked to the specified tag

query {
allProducts(filter: { smartTagsField: { contains: "bike" } }) {
title
}
}

Filter uploads linked to all of the specified tags

query {
allProducts(filter: { smartTagsField: { allIn: ["bike"] } }) {
title
}
}

Filter uploads linked to at least one of the specified tags

query {
allProducts(filter: { smartTagsField: { anyIn: ["bike"] } }) {
title
}
}

Filter uploads not linked to any of the specified tags

query {
allProducts(filter: { smartTagsField: { notIn: ["bike"] } }) {
title
}
}

Search for uploads with an exact match

query {
allProducts(filter: { smartTagsField: { eq: ["bike"] } }) {
title
}
}

Filter by tags

Filter uploads linked to the specified tag

query {
allProducts(filter: { tagsField: { contains: "bike" } }) {
title
}
}

Filter uploads linked to all of the specified tags

query {
allProducts(filter: { tagsField: { allIn: ["bike"] } }) {
title
}
}

Filter uploads linked to at least one of the specified tags

query {
allProducts(filter: { tagsField: { anyIn: ["bike"] } }) {
title
}
}

Filter uploads not linked to any of the specified tags

query {
allProducts(filter: { tagsField: { notIn: ["bike"] } }) {
title
}
}

Search for uploads with an exact match

query {
allProducts(filter: { tagsField: { eq: ["bike"] } }) {
title
}
}

Filter by title

Filter uploads based on a regular expression

query {
allProducts(
filter: {
titleField: {
matches: { pattern: "bi(cycl|k)e", caseSensitive: false }
}
}
) {
title
}
}

Exclude uploads based on a regular expression

query {
allProducts(
filter: {
titleField: {
notMatches: { pattern: "bi(cycl|k)e", caseSensitive: false }
}
}
) {
title
}
}

Search the asset with the specified title

query {
allProducts(filter: { titleField: { eq: "bike" } }) {
title
}
}

Exclude the asset with the specified title

query {
allProducts(filter: { titleField: { neq: "bike" } }) {
title
}
}

Search assets with the specified as default title

query {
allProducts(filter: { titleField: { in: ["bike"] } }) {
title
}
}

Search assets that do not have the specified as default title

query {
allProducts(filter: { titleField: { notIn: ["bike"] } }) {
title
}
}

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

query {
allProducts(filter: { titleField: { exists: true } }) {
title
}
}

Filter by type

Search uploads with the specified type

query {
allProducts(filter: { typeField: { eq: image } }) {
title
}
}

Exclude uploads with the specified type

query {
allProducts(filter: { typeField: { neq: image } }) {
title
}
}

Search uploads with the specified types

query {
allProducts(filter: { typeField: { in: [image] } }) {
title
}
}

Search uploads without the specified types

query {
allProducts(filter: { typeField: { notIn: [image] } }) {
title
}
}

Filter by width

Search all assets larger than the specified width

query {
allProducts(filter: { widthField: { gt: 3 } }) {
title
}
}

Search all assets smaller than the specified width

query {
allProducts(filter: { widthField: { lt: 3 } }) {
title
}
}

Search all assets larger or equal to the specified width

query {
allProducts(filter: { widthField: { gte: 3 } }) {
title
}
}

Search all assets larger or equal to the specified width

query {
allProducts(filter: { widthField: { lte: 3 } }) {
title
}
}

Search assets with the specified width

query {
allProducts(filter: { widthField: { eq: 3 } }) {
title
}
}

Search assets that do not have the specified width

query {
allProducts(filter: { widthField: { neq: 3 } }) {
title
}
}