Hello,
API on https://ladsweb.modaps.eosdis.nasa.gov does not respect anymore the requested format when it is 'json' as exposed in https://ladsweb.modaps.eosdis.nasa.gov/tools-and-services/api-v2/specs/content#archives.
Response format is 'text/html'.
See for example this request: https://ladsweb.modaps.eosdis.nasa.gov/api/v2/content/archives?products=VNP02MOD®ions=[BBOX]W-70+N30+E-30+S0&temporalRanges=2024-10-08+00%3A00%3A00..2024-10-08+23%3A59%3A59&formats=json&illuminations=D
Thanks in advance for your help.
API issue
-
- Posts: 377
- Joined: Mon Sep 30, 2019 8:33 am America/New_York
- Has thanked: 3 times
Re: API issue
For JSON output it is preferable to use the details endpoint:
https://ladsweb.modaps.eosdis.nasa.gov/tools-and-services/api-v2/specs/content/details
Use:
https://ladsweb.modaps.eosdis.nasa.gov/api/v2/content/details?products=VNP02MOD®ions=[BBOX]W-70+N30+E-30+S0&temporalRanges=2024-10-08+00%3A00%3A00..2024-10-08+23%3A59%3A59&formats=json&illuminations=D
If you do not need/want all the fields in the JSON output, you can specify which fields you want using the &fields parameter.
https://ladsweb.modaps.eosdis.nasa.gov/tools-and-services/api-v2/specs/content/details
Use:
https://ladsweb.modaps.eosdis.nasa.gov/api/v2/content/details?products=VNP02MOD®ions=[BBOX]W-70+N30+E-30+S0&temporalRanges=2024-10-08+00%3A00%3A00..2024-10-08+23%3A59%3A59&formats=json&illuminations=D
If you do not need/want all the fields in the JSON output, you can specify which fields you want using the &fields parameter.
Regards,
LAADS User Services
To receive news from LAADS DAAC direct to your inbox, email laadsdaac-join@lists.nasa.gov with “subscribe” in the subject line.
LAADS User Services
To receive news from LAADS DAAC direct to your inbox, email laadsdaac-join@lists.nasa.gov with “subscribe” in the subject line.