API Quickstart

This guide shows how to authenticate, make your first API call, and retrieve structured real-world context from PredictHQ.

This guide shows how to make your first API call. For guidance on integrating event data into production forecasting or AI systems, see Core Concepts.

What you need:

  1. An API Access Token: We'll guide you through creating one below.

Create an Access Token

Read a more in-depth guide to creating a new API Token or follow the basic steps below:

  1. Log into the WebApp and visit the API Tokensarrow-up-right page under API tools.

  2. The first time you create a token - enter the name of the token and click "Create Token". For the second and subsequent times click the "Create New Token" button and enter the name, then click Create Token.

  3. Click "Copy Token" to copy your token to the clipboard. You can now paste the token into another application. Keep a copy of your new API Token, as it will not be shown again.

  4. Use the new API Access Token in the Authorization header of your API requests as shown in the example below

Access Events API

The Events API returns structured, deduplicated real-world events that can be integrated directly into forecasting, ML, and AI systems.

Now you can use the new API Access Token in the Authorization header of your API requests as in the example below:

How to set up and access PredictHQ APIs
circle-info

For guidance on identifying which events materially impact your demand, see the Beam guide.

Streamlit Demo Apps

To demonstrate how PredictHQ APIs can be integrated into interactive applications, we provide several Streamlit examples. All the code is available on GitHub and we encourage you to take the code, modify it, and use your own locations of interest to demo our APIs internally to your team or to simply better understand our technology.

Streamlit Demo Appschevron-right

Next: Understanding Event Driven Demand

Calling the Events API is the first step. Successfully using event data in production systems requires addressing scope, relevance, feature engineering, and explainability.

Read Event-Driven Demand to understand the structural challenges of working with real-world events and how PredictHQ’s APIs are designed to address them.

Last updated

Was this helpful?