JAXA Earth API for Python: a simple way to work with satellite data
Contents
I found that JAXA has published a Python API for working with Earth observation satellite data, so I looked into it. Satellite data tends to sound like something that requires a lot of specialist knowledge, but with this API you can fetch and process data without having to care much about sensor specs or resolution details.
What Is the JAXA Earth API?
It is a service for using JAXA’s Earth observation data. It is distributed as a Python package and includes the core pieces you need, from fetching satellite imagery to masking, difference calculation, statistical processing, and visualization.
Official documentation: https://data.earth.jaxa.jp/api/python/v0.1.5/en/
Installation
You install it directly from JAXA’s package repository.
pip install --extra-index-url https://data.earth.jaxa.jp/api/python/repository/ jaxa-earth
If you want to pin the version:
pip install --extra-index-url https://data.earth.jaxa.jp/api/python/repository/ jaxa-earth==0.1.5
The dependencies matplotlib and requests are installed automatically.
Main Classes
The API is built around four main classes.
| Class | Purpose |
|---|---|
ImageCollectionList | Fetch and search the list of available satellite image collections |
ImageCollection | Filter images by date, resolution, area, and band |
FeatureCollection | Read and extract geographic data in GeoJSON format |
ImageProcess | Perform masking, difference calculation, statistical analysis, and visualization |
The basic workflow is a two-step approach: fetch the data with ImageCollection, then process it with ImageProcess.
Basic Usage
Fetching and displaying images
from jaxa.earth import je
# Get an image collection and filter it
ic = je.ImageCollection("GCOM-C.SGLI.L2.LAND.RSRF")
ic.filter_date("2021-12-01", "2021-12-31")
ic.filter_resolution(1000)
ic.filter_bounds([130, 30, 145, 45]) # around Japan
images = ic.get_images()
# Display the images
ip = je.ImageProcess(images)
ip.show_images()
The methods are chainable, so you can set parameters progressively with filter_date(), filter_resolution(), and filter_bounds().
Ways to specify a geographic area
Bounding box approach
Define a rectangular area with four longitude and latitude values.
ic.filter_bounds([110, 20, 160, 50])
GeoJSON approach
If you need to handle more complex shapes, you can load a GeoJSON file and use that instead.
fc = je.FeatureCollection()
fc.read("path/to/area.geojson")
ic.filter_bounds(fc)
Masking operations
There are three main patterns:
- Range extraction: use elevation data to mask rainfall data
- Exact-value extraction: extract only urban areas from land-cover classification data
- Bit extraction: use a mask band to determine valid pixels
Difference images and time-series analysis
You can also compare NDVI, vegetation index, across different dates, merge data from multiple days, and display spatial statistics over time.
ip.diff_images() # difference calculation
ip.calc_spatial_stats() # spatial statistics
ip.calc_temporal_stats() # time-series statistics
Claude Desktop Integration (MCP Server)
JAXA also provides MCP server support so that Claude Desktop can operate directly on JAXA satellite data.
Setup steps
- Create a virtual environment and install the package
- Place
mcp_server.py - Add it to the Claude Desktop configuration
{
"mcpServers": {
"jaxa_api_tools": {
"command": "C:\\path\\to\\venv\\Scripts\\python",
"args": ["C:\\path\\to\\mcp_server.py"]
}
}
}
Available functions
search_collections_id- get collection informationshow_images- display satellite imagescalc_spatial_stats- calculate spatial statisticsshow_spatial_stats- display statistical result images
Available Datasets
- Land Cover Class (2019)
- GCOM-C SGLI RGB imagery (December 2021)
- Forest Non Forest (2017-2020)
- JASMES Japan area (2020 to September 2022)
You can browse the full dataset list at https://data.earth.jaxa.jp/en/datasets/ .
About the Data Formats
- COG (Cloud Optimized GeoTIFF): A format that lets you fetch only the needed portion with HTTP range requests
- STAC (Spatio Temporal Asset Catalog): A hierarchical JSON catalog for accessing COG data
These formats make it possible to work efficiently with large satellite datasets.
Possible Ways to Use It
- Use it directly from Python
- Integrate with QGIS
- Run it in Google Colab
- Use it from Claude Desktop through the MCP server
Personally, the Claude Desktop integration is the part I found most interesting. It opens the door to natural-language instructions like “show me vegetation data for Japan.”