EXIF query examples
This section provides example queries for exchangeable image file format (EXIF) data.
Elasticsearch query for EXIF metadata
Description
Looks for a matched query on an EXIF field.
Authentication
Supports basic authentication and bearer token authentication, see API authentication.
Usage example
Searches for all images with an EXIF metadata field.
{
"query": {
"match": {
"metadata.Exif IFD0:Host Computer": "iPhone 12 mini"
}
}
}
Filter using GPS range
Description
A range filter query using GPS altitude.
Authentication
Supports basic authentication and bearer token authentication, see API authentication.
Usage example
Searches for all images that have a GPS altitude of 2000 meters.
{
"query": {
"bool": {
"must": {
"match_all": {}
},
"filter": {
"range": {
"gps.altitude": {
"gt": 2000
}
}
}
}
}
}
GPS search query
Description
Searches for all images based on the radius of a GPS location.
Authentication
Supports basic authentication and bearer token authentication, see API authentication.
Usage example
Searches for all images within a two mile radius of the GPS location (N 7°57.300 E 46°35.400).
{
"query": {
"bool": {
"must": {
"match_all": {}
},
"filter": {
"geo_distance": {
"distance": "2mi",
"gps.location": [
7.955,
46.59
]
}
}
}
}
}