JSON-LD metadata
What is JSON-LD metadata?
JSON-LD is a way to publish structured metadata as JSON while giving its fields a shared meaning. ODP provides JSON-LD descriptions of public datasets and data collections. You can use these descriptions to index catalog records, display attribution and coverage, or follow links between a collection and its datasets.
Base URL
https://api.hubocean.earth/api/public/catalog/v2/jsonld
Getting the JSON-LD URL for a dataset
Each public dataset has a UUID in its ODP catalog page URL. Copy that UUID into the JSON-LD URL:
https://api.hubocean.earth/api/public/catalog/v2/jsonld/datasets/{dataset_id}
For example, the List of Seamount Bases in the World Oceans dataset has this JSON-LD URL:
https://api.hubocean.earth/api/public/catalog/v2/jsonld/datasets/8de642cc-03d9-4538-a6d4-8260e49df597
Request it with GET:
curl "https://api.hubocean.earth/api/public/catalog/v2/jsonld/datasets/8de642cc-03d9-4538-a6d4-8260e49df597"
The response contains the dataset's name and catalog page URL, along with available fields such as description, license, keywords, provider, citation, and spatial coverage. It may also include a distribution with a data access URL. The example dataset links to the OGC API — Features endpoint:
{
"@type": "Dataset",
"name": "List of Seamount Bases in the World Oceans - Updated (Yesson et al. 2020)",
"distribution": [
{
"@type": "DataDownload",
"contentUrl": "https://api.hubocean.earth/api/features/collections/8de642cc-03d9-4538-a6d4-8260e49df597",
"encodingFormat": "application/geo+json"
}
]
}
The excerpt shows selected fields; the live response contains more metadata. Fields depend on what is available for the dataset, so a distribution or spatial extent may be absent.
Getting the JSON-LD URL for a data collection
Use the collection UUID from its ODP catalog page URL:
https://api.hubocean.earth/api/public/catalog/v2/jsonld/data-collections/{collection_id}
For example, the List of Seamounts in the World Oceans collection can be requested with:
curl "https://api.hubocean.earth/api/public/catalog/v2/jsonld/data-collections/3e82065b-4d9e-4f0b-8db1-75dbaf71b69a"
The response describes the collection and lists its member datasets in hasPart. Each member has an @id you can request to get its full dataset metadata:
{
"@type": "Dataset",
"name": "List of Seamounts in the World Oceans - Updated (Yesson et al. 2020)",
"hasPart": [
{
"@type": "Dataset",
"@id": "https://api.hubocean.earth/api/public/catalog/v2/jsonld/datasets/8de642cc-03d9-4538-a6d4-8260e49df597",
"name": "List of Seamount Bases in the World Oceans - Updated (Yesson et al. 2020)"
}
]
}
This excerpt shows one member. The live response can contain more.
Collection type: The current JSON-LD response uses @type: "Dataset" for an ODP data collection as well as for an individual dataset. The data-collections URL path and hasPart field identify a collection record.
Following the links
The @id field is the JSON-LD URL for the record. The url field points to its human-readable ODP catalog page. A dataset's isPartOf.@id points to its parent collection; a collection's hasPart entries point to its member datasets.
Responses use Schema.org terms through @context, with a GeoSPARQL prefix for geometry. When spatial metadata is available, spatialCoverage describes the extent and geosparql:hasGeometry can provide it as WKT. Other available fields can include dateCreated and dateModified.
These are public endpoints; the examples above work without an API key.
More information
- ODP metadata reference
- STAC API for catalog search
- JSON-LD 1.1 specification
- Schema.org Dataset