Skip to content

Search examples

The unified endpoint queries Knowledge Packages and Knowledge Resources together in a single request. This page walks through the parameters and the most common query shapes.

GET /api/search

No authentication is required to search public content.

ParameterTypeDescription
qstringQuery in Elasticsearch query string syntax.
bboxstringBounding box lon,lat,lon,lat — top-left longitude/latitude, bottom-right longitude/latitude.
sortstringSort field and direction (e.g. newest, oldest, bestmatch).
sizeintegerResults per page. Default: 10.
pageintegerPage number (1-indexed).
allversionsbooleanInclude all versions in the results, not just the latest.

The response shape mirrors InvenioRDM’s standard search payload:

{
"aggregations": { ... },
"hits": {
"total": 42,
"hits": [ /* records */ ]
},
"links": { ... },
"sortBy": "bestmatch"
}

Find Packages and Resources matching a free-text query, paginated:

GET /api/search?q=flood+mapping&size=10&page=1 HTTP/1.1
Host: gkhub.earthobservations.org
Accept: application/json

Restrict results to records whose geometry intersects a bounding box. The two coordinate pairs are top-left and bottom-right, in lon, lat, lon, lat order:

GET /api/search?bbox=-1.538086,6.54201,0.791016,4.879216 HTTP/1.1
Host: gkhub.earthobservations.org
Accept: application/json

Use field-scoped queries to filter against GEO-specific vocabularies. The example below returns records tagged with SDG 13 (Climate Action):

GET /api/search?q=metadata.engagement_priorities.id:sdg-goal-13 HTTP/1.1
Host: gkhub.earthobservations.org
Accept: application/json

Field queries can be combined with free-text queries and boolean operators. The example below finds Packages and Resources that mention “Sentinel-2” and are tagged with the GEO Land theme:

GET /api/search?q=Sentinel-2+AND+metadata.engagement_priorities.id:land HTTP/1.1
Host: gkhub.earthobservations.org
Accept: application/json

The query string syntax used in the examples below is the standard Elasticsearch dialect.

To learn more about it and how to use it in the GEO Knowledge Hub, please refer to the Search guide page. On this page, you will find a catalogue of patterns, like phrases, fuzziness, boosting, wildcards, ranges, etc., that all work with the GEO Knowledge Hub Search API.