Hi Marco:
An example HTTP request would look something like
https://ladsweb.modaps.eosdis.nasa.gov/api/v2/content/archives?ArchiveSets=61&products=MOD021KM&temporalRanges=2012-015®ions=[BBOX]N21.5 S20.5 E12 W-15
for HTML output, or
https://ladsweb.modaps.eosdis.nasa.gov/api/v2/content/details?ArchiveSets=61&products=MOD021KM&temporalRanges=2012-015®ions=[BBOX]N21.5 S20.5 E12 W-15
for JSON output.
If you are interested in Day only, or Night Only, you can specify that by adding the “illuminations” parameter to the query. See the API description (link below) for the full syntax. HTTP query parameters can be submitted in any order.
Be careful with the “[“ and “]” characters around “BBOX” if you are running “system” commands from your script – “[“ and “]” characters might need HTTP encoding so that the shell and some tools, like curl, don’t get confused.
The full API is described at
https://ladsweb.modaps.eosdis.nasa.gov/tools-and-services/api-v2/specs/content#archives
Basically, your script would read your list of areas of interest and dates from your file, substitute your geolocation and date/time values into the HTTP request, run the request using a User Agent (curl, wget, or your favorite HTTP library/tool/script language UA), parse the outputs looking for file links (most scripting languages can decode JSON now), and download the files.
An example HTTP request would look something like
https://ladsweb.modaps.eosdis.nasa.gov/api/v2/content/archives?ArchiveSets=61&products=MOD021KM&temporalRanges=2012-015®ions=[BBOX]N21.5 S20.5 E12 W-15
for HTML output, or
https://ladsweb.modaps.eosdis.nasa.gov/api/v2/content/details?ArchiveSets=61&products=MOD021KM&temporalRanges=2012-015®ions=[BBOX]N21.5 S20.5 E12 W-15
for JSON output.
If you are interested in Day only, or Night Only, you can specify that by adding the “illuminations” parameter to the query. See the API description (link below) for the full syntax. HTTP query parameters can be submitted in any order.
Be careful with the “[“ and “]” characters around “BBOX” if you are running “system” commands from your script – “[“ and “]” characters might need HTTP encoding so that the shell and some tools, like curl, don’t get confused.
The full API is described at
https://ladsweb.modaps.eosdis.nasa.gov/tools-and-services/api-v2/specs/content#archives
Basically, your script would read your list of areas of interest and dates from your file, substitute your geolocation and date/time values into the HTTP request, run the request using a User Agent (curl, wget, or your favorite HTTP library/tool/script language UA), parse the outputs looking for file links (most scripting languages can decode JSON now), and download the files.
Statistics: Posted by LAADS_UserServices_M — Mon Apr 15, 2024 3:26 pm America/New_York