API quickstart
Get your API key, make your first call, and understand how PredictHQ fits into a production integration.
What you need
Before you start, you need:
A PredictHQ account - log in or sign up for free.
An API Key - create one in the next section.
Create an API key
To create a key:
Log in to the WebApp.
Go to API Tools → API Tokens.
Click Create Token.
Enter a name.
Click Create.
Click Copy Token.
Store the token somewhere safe. The WebApp doesn't show it again.
In the Authorization header of every API request, use your API key:
Authorization: Bearer $API_TOKENMake your first call
The Events API returns structured, deduplicated real-world events. To verify your API key is working and to explore what events look like in the response, run this request:
How PredictHQ APIs work together
A single API call is not a production integration. PredictHQ designed its APIs to work as a pipeline:
Saved Locations - define your business locations once using
origin_geojson. PredictHQ calculates Predicted Impact Area automatically and stores it against each location.Beam - run a Beam Analysis per location using your historical demand data. Beam identifies which event categories actually drive demand at each location and returns an
analysis_id.Features API - call the Features API with your
analysis_idto retrieve model-ready ML features, automatically scoped and filtered to your location.Events API - use the Events API with your
analysis_idto retrieve the specific events driving demand - for explainability and operational context.
The Standard integration pattern shows the full recommended architecture, including refresh cadence and data storage patterns.
What to do next
I want to build a demand forecasting model → Start with Saved Locations, then run Beam, then call the Features API with your analysis_id
I want event-driven forecasts without building a model → Go straight to the Forecasts API
I want to connect an AI assistant to PredictHQ → Set up the PredictHQ MCP server
I want to understand the full integration architecture → Read the Standard integration pattern
Last updated
Was this helpful?