python-cmr
Python wrapper to the NASA Common Metadata Repository (CMR) API.
What it is and what it does
Python CMR is a wrapper library for NASA's EOSDIS Common Metadata Repository API that simplifies querying earth science metadata. It provides query builder classes (CollectionQuery, GranuleQuery, ToolQuery, ServiceQuery, VariableQuery) that let you filter by geographic bounds, temporal ranges, platform, instrument, archive center, and other criteria without manually constructing URLs or handling encoding. The library validates input before sending requests and returns results as JSON-accessible Python dictionaries by default, though it supports multiple output formats including XML, CSV, KML, and others.
The package is designed for researchers and developers who need to discover and access earth observation data from NASA's archive. You chain filter methods together to build queries, then call get() to retrieve results. It handles the details of URL construction and parameter validation, reducing the chance of malformed requests. The library supports both the operational CMR and UAT environments, and can work with authentication tokens for restricted access.
Use it for:
- Discover satellite imagery collections by archive center and keyword to identify available datasets for your research area
- Query granules (individual data files) by geographic point or bounding box to find observations covering a specific location
- Filter granules by temporal range and platform to retrieve data from a specific satellite during a particular time period
- Retrieve cloud cover and instrument metadata to programmatically select the highest-quality observations for analysis
- Batch download granule metadata in multiple formats (JSON, XML, CSV, KML) for integration into data processing pipelines
- Search for tools and services available in the CMR to discover processing capabilities alongside the raw data
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides a Python wrapper around NASA's Common Metadata Repository (CMR) API to query earth science collections, granules, services, tools, and variables with input validation and URL encoding.
Yes. The package is actively maintained, has no known vulnerabilities, low install friction, and directly solves the problem of querying NASA's earth science metadata repository. It's well-suited for researchers and developers working with satellite data who want to avoid manual API construction. The permissive MIT license poses no restrictions.
Install
python-cmr on PyPI
pip
pip install python-cmruv
uv add python-cmrpoetry
poetry add python-cmrInstalling python-cmr
Before you install
Low friction: pure Python wheel with three common runtime dependencies (python-dateutil, requests, typing-extensions). Actively maintained since its adoption from the original author, with recent commits and no known vulnerabilities.
License in practice
MIT license is permissive; you can use, modify, and distribute this package freely in commercial or private projects with minimal restrictions.
Quickstart
pip install python-cmr
from cmr import CollectionQuery, GranuleQuery
api = CollectionQuery()
collections = api.archive_center("LP DAAC").keyword("AST_L1*").get(5)
api = GranuleQuery()
granules = api.short_name("AST_L1T").point(-112.73, 42.5).get(3)
Verify before relying
- Whether all CMR API parameters are covered by the current version or if some require direct API calls
- Performance characteristics when retrieving large result sets (e.g., the 25,000 granule example mentioned)
- Whether authentication tokens are required for all queries or only certain datasets
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (<4.0.0,>=3.8.1) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — python-dateutil, requests, typing-extensions |
| Maintenance | actively maintained — 700 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 160,058/month — #10,675 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: python_cmr-0.13.0-py3-none-any.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
earthaccessearthaccess searches, downloads, and streams…
permissive · top 15,000 on PyPI
earthengine-apiPython client library for Google Earth Engine,…
permissive · top 15,000 on PyPI
datacubeDatacube provides an integrated gridded data…
permissive · top 15,000 on PyPI
sentinelhubsentinelhub provides a Python interface to…
permissive · top 15,000 on PyPI
skyfieldSkyfield computes high-precision positions for…
permissive · top 15,000 on PyPI
fastkmlReads, writes, and manipulates KML files—an…
copyleft · top 15,000 on PyPI
sgp4Computes satellite positions in Earth orbit…
permissive · top 5,000 on PyPI
xeeXee is an Xarray backend that lets you open…
permissive · top 15,000 on PyPI
pystac-clientPySTAC Client is a Python library for querying…
permissive · top 15,000 on PyPI
pymap3dConverts between geographic and 3-D coordinate…
permissive · top 15,000 on PyPI