Quick Start Guide

This guide covers common operations users can perform using the API-V2 REST (Representational State Transfer) API.

For more information:

Searching for a File or Set of Files

There are many parameters that can help define what you are searching for. Refer to the "content" OpenAPI spec for detailed lists with examples.

Examples

  • Search for files to then download (response is a simple HTML list, easily handled by tools like wget)

  • Search for information (metadata) about files (default response is JSON)

Downloading Files

Examples

Download a specific filename

  • From browser:

    Refer to /api/v2/content/archives/

  • Using curl:
    curl --data-binary --header "X-Requested-With: XMLHttpRequest" --header "Authorization: Bearer YOUR_TOKEN_HERE" -o YOUR_OUTPUT_FILE_PATH_HERE --create-dirs -C - "https://ladsweb.modaps.eosdis.nasa.gov/api/v2/content/archives/FILENAME_TO_DOWNLOAD"
  • Using wget:
    wget -e robots=off -m -np -R .html,.tmp -nH --header "X-Requested-With: XMLHttpRequest"  --header "Authorization: Bearer YOUR_TOKEN_HERE" --cut-dirs=3 "https://ladsweb.modaps.eosdis.nasa.gov/api/v2/content/archives/FILENAME_TO_DOWNLOAD" -P .

Download a file with a specific path

  • From browser:

    Refer to /api/v2/content/archives/

  • Using curl:
    curl --data-binary --header "X-Requested-With: XMLHttpRequest" --header "Authorization: Bearer YOUR_TOKEN_HERE" -o YOUR_OUTPUT_FILE_PATH_HERE --create-dirs -C - "https://ladsweb.modaps.eosdis.nasa.gov/api/v2/content/archives/PATH_TO_FILE"
  • Using wget:
    wget -e robots=off -m -np -R .html,.tmp -nH --header "X-Requested-With: XMLHttpRequest"  --header "Authorization: Bearer YOUR_TOKEN_HERE" --cut-dirs=3 "https://ladsweb.modaps.eosdis.nasa.gov/api/v2/content/archives/PATH_TO_FILE" -P .

Search For and Download Files in One Step

Examples

Download a set of files that match query parameters

  • Using wget:
    wget -e robots=off -m -np -R .html,.tmp -nH --header "X-Requested-With: XMLHttpRequest"  --header "Authorization: Bearer YOUR_TOKEN_HERE" --cut-dirs=3 "https://ladsweb.modaps.eosdis.nasa.gov/api/v2/content/archives?YOUR_SEARCH_PARAMS_HERE" -P .

Finding Other Information

Examples