Javascript SDK

The official PredictHQ JavaScript Client provides a consistent JavaScript interface to our API.



npm install predicthq

Setup the SDK

import Client from 'predicthq'

// Initialises PredictHQ client library using your access token
// Note: You can find/create your access token at
const client = new Client({access_token: 'ACCESS_TOKEN'})

Search Events

Perform a basic search of events using the title parameter.{title: 'Aviation Festival'})
        (results) => {
            for (const event of results) {
        err => console.error(err)

Further Examples

Please browse through our use case examples on our GitHub repository.

Found an Issue?

Please log an issue on our GitHub repository.

Last updated

© 2024 PredictHQ Ltd