About HAPI

The Heliophysics Data Application Programmer's Interface (HAPI) specification is a time series download and streaming format specification. It was orginally developed for Heliophysics data, but the specification applies to any time series served from an API. A 1-page summary is given in HAPIOnePager.pdf. A more detailed overview is given in the JGR article Weigel et al., 2021 and the presentation by Vandegriff et al. (pdf | YouTube video).

The HAPI specification was recommended by COSPAR in 2018 as the common data access API for space science and space weather data.

When data are available from a HAPI server, there is no need to download data files and write custom file reader programs. Using a HAPI client library, data can be loaded into an array using a single command using HAPI IDL, MATLAB, and Python clients. Data from HAPI servers is also accessible to users of Autoplot, PySPEDAS, and IDL SPEDAS. Sample scripts and containing instructions for accessing data using the above-listed clients may be found by selecting a server, dataset, and time range at the web interface http://hapi-server.org/servers/.

A list of HAPI-compliant data servers is available at http://hapi-server.org/servers/.

The hapi-server GitHub project contains a collection of repositories for HAPI-related software and documentation, including client and server libraries and code for verifying and testing a HAPI server.

HAPI Stack Demo
KNMI Timeline viewer showing data from four HAPI-enabled data providers.

For Scientists

  • Get Data: Use the interface at http://hapi-server.org/servers/ to download data from your browser, generate ~10-line wget/curl/IDL/MATLAB/Python scripts to download data, or create preview plots.
  • Demo: A demonstration of using 5 different clients to access data from a HAPI server is shown in a YouTube video.
  • Client Software: Data from any HAPI-compliant server can be easily accessed using IDL, Java, MATLAB, Python, and other languages. The repositories for HAPI libraries in these languages is available at GitHub.
  • List of Servers: A list of HAPI-compliant data servers is available at http://hapi-server.org/servers/.

For Developers

  • All the HAPI specification and many server and client tools are available from its GitHub project page. Software includes clients, servers, and a server verifier/validator.
  • HAPI Presentations
  • Email lists:

For Data Providers

  • The HAPI specification describes a minimum set of capabilities needed for a server to allow access to the time series data values within one or more data collections.
  • Server Software:
    • Prior to writing server-side software, we suggest trying the generic stand-alone HAPI server. If you can generate at least a HAPI ASCII stream of your datasets with a command line program, you can use this server to quickly get a HAPI-compliant server running on your site.
    • User-contributed source code for servers in various languages is available at at GitHub. This contributed code is typically not up-to-date or generalized but it may be useful for getting started.
    • See the server-ui repository for a basic server entry/overview page template for a HAPI server. Code is also available for a web interface for generating URLs to download data, plotting data from a HAPI server, and generating scripts that read and plot the selected parameter (the code used by http://hapi-server.org/servers/).
    • Server developers can test their server for HAPI-compliance using the HAPI server verification service.
  • Server Developers: If you have developed a HAPI server and it is ready for production and would like to make it automatically visible to existing software in the HAPI ecosystem, see https://github.com/hapi-server/servers
©2020- HAPI Consortium