Introducing the Forecasts API — Event-driven forecasts for precise demand planning. Fast, accurate, and easy to run.
Explore Now
LogoLogo
Visit websiteWebAppGet DemoTry for Free
  • Introduction
  • Swagger UI
  • Loop
  • System Status
  • Getting Started
    • API Quickstart
    • Data Science Notebooks
    • PredictHQ Data
      • Data Accuracy
      • Event Categories
        • Attendance-Based Events
        • Non-Attendance-Based Events
        • Unscheduled Events
        • Live TV Events
      • Labels
      • Entities
      • Ranks
        • PHQ Rank
        • Local Rank
        • Aviation Rank
      • Predicted Attendance
      • Predicted End Times
      • Predicted Event Spend
      • Predicted Events
      • Predicted Impact Patterns
    • Guides
      • Geolocation Guides
        • Overview
        • Searching by Location
          • Find Events by Latitude/Longitude and Radius
          • Find Events by Place ID
          • Find Events by IATA Code
          • Find Events by Country Code
          • Find Events by Placekey
          • Working with Location-Based Subscriptions
        • Understanding Place Hierarchies
        • Working with Polygons
        • Join Events using Placekey
      • Date and Time Guides
        • Working with Recurring Events
        • Working with Multi-day and Umbrella Events
        • Working with Dates, Times and Timezones
      • Events API Guides
        • Understanding Relevance Field in Event Results
        • Attendance-Based Events Notebooks
        • Non-Attendance-Based Events Notebooks
        • Severe Weather Events Notebooks
        • Academic Events Notebooks
        • Working with Venues Notebook
      • Features API Guides
        • Increase Accuracy with the Features API
        • Get ML Features
        • Demand Forecasting with Event Features
      • Forecasts API Guides
        • Getting Started with Forecasts API
        • Understanding Forecast Accuracy Metrics
        • Troubleshooting Guide for Forecasts API
      • Live TV Event Guides
        • Find Broadcasts by County Place ID
        • Find Broadcasts by Latitude and Longitude
        • Find all Broadcasts for an Event
        • Find Broadcasts for Specific Sport Types
        • Aggregating Live TV Events
        • Live TV Events Notebooks
      • Beam Guides
        • ML Features by Location
        • ML Features by Group
      • Demand Surge API Guides
        • Demand Surge Notebook
      • Guide to Protecting PredictHQ Data
      • Streamlit Demo Apps
      • Guide to Bulk Export Data via the WebApp
      • Industry-Specific Event Filters
      • Tutorials
        • Filtering and Finding Relevant Events
        • Improving Demand Forecasting Models with Event Features
        • Using Event Data in Power BI
        • Using Event Data in Tableau
        • Connecting to PredictHQ APIs with Microsoft Excel
        • Loading Event Data into a Data Warehouse
        • Displaying Events in a Heatmap Calendar
        • Displaying Events on a Map
    • Tutorials by Use Case
      • Demand Forecasting with ML Models
      • Dynamic Pricing
      • Inventory Management
      • Workforce Optimization
      • Visualization and Insights
  • Integrations
    • Integration Guides
      • Keep Data Updated via API
      • Integrate with Beam
      • Integrate with Loop Links
    • Third-Party Integrations
      • Receive Data via Snowflake
        • Example SQL Queries for Snowflake
        • Snowflake Data Science Guide
          • Snowpark Method Guide
          • SQL Method Guide
      • Receive Data via AWS Data Exchange
        • CSV/Parquet Data Structure for ADX
        • NDJSON Data Structure for ADX
      • Integrate with Databricks
      • Integrate with Tableau
      • Integrate with a Demand Forecast in PowerBI
      • Google Cloud BigQuery
    • PredictHQ SDKs
      • Python SDK
      • Javascript SDK
  • API Reference
    • API Overview
      • Authenticating
      • API Specs
      • Rate Limits
      • Pagination
      • API Changes
      • Attribution
      • Troubleshooting
    • Events
      • Search Events
      • Get Event Counts
    • Broadcasts
      • Search Broadcasts
      • Get Broadcasts Count
    • Features
      • Get ML Features
    • Forecasts
      • Models
        • Create Model
        • Update Model
        • Replace Model
        • Delete Model
        • Search Models
        • Get Model
        • Train Model
      • Demand Data
        • Upload Demand Data
        • Get Demand Data
      • Forecasts
        • Get Forecast
      • Algorithms
        • Get Algorithms
    • Beam
      • Create an Analysis
      • Upload Demand Data
      • Search Analyses
      • Get an Analysis
      • Update an Analysis
      • Partially Update an Analysis
      • Get Correlation Results
      • Get Feature Importance
      • Refresh an Analysis
      • Delete an Analysis
      • Analysis Groups
        • Create an Analysis Group
        • Get an Analysis Group
        • Search Analysis Groups
        • Update an Analysis Group
        • Partially Update an Analysis Group
        • Refresh an Analysis Group
        • Delete an Analysis Group
        • Get Feature Importance for an Analysis Group
    • Demand Surge
      • Get Demand Surges
    • Suggested Radius
      • Get Suggested Radius
    • Saved Locations
      • Create a Saved Location
      • Search Saved Locations
      • Get a Saved Location
      • Search Events for a Saved Location
      • Update a Saved Location
      • Delete a Saved Location
    • Loop
      • Loop Links
        • Create a Loop Link
        • Search Loop Links
        • Get a Loop Link
        • Update a Loop Link
        • Delete a Loop Link
      • Loop Settings
        • Get Loop Settings
        • Update Loop Settings
      • Loop Submissions
        • Search Submitted Events
      • Loop Feedback
        • Search Feedback
    • Places
      • Search Places
      • Get Place Hierarchies
  • WebApp Support
    • WebApp Overview
      • Using the WebApp
      • API Tools
      • Events Search
      • How to Create an API Token
    • Getting Started
      • Can I Give PredictHQ a Go on a Free Trial Basis?
      • How Do I Get in Touch if I Need Help?
      • Using AWS Data Exchange to Access PredictHQ Events Data
      • Using Snowflake to Access PredictHQ Events Data
      • What Happens at the End of My Free Trial?
      • Export Events Data from the WebApp
    • Account Management
      • Managing your Account Settings
      • How Do I Change My Name in My Account?
      • How Do I Change My Password?
      • How Do I Delete My Account?
      • How Do I Invite People Into My Organization?
      • How Do I Log In With My Google or LinkedIn Account?
      • How Do I Update My Email Address?
      • I Signed Up Using My Google/LinkedIn Account, but I Want To Log In With My Own Email
    • API Plans, Pricing & Billing
      • Do I Need To Provide Credit Card Details for the 14-Day Trial?
      • How Do I Cancel My API Subscription?
      • Learn About Our 14-Day Trial
      • What Are the Definitions for "Storing" and "Caching"?
      • What Attribution Do I Have To Give PredictHQ?
      • What Does "Commercial Use" Mean?
      • What Happens If I Go Over My API Plan's Rate Limit?
    • FAQ
      • How Does PredictHQ Support Placekey?
      • Using Power BI and Tableau With PredictHQ Data
      • Can I Download a CSV of Your Data?
      • Can I Suggest a New Event Category?
      • Does PredictHQ Have Historical Event Data?
      • Is There a PredictHQ Mobile App?
      • What Are Labels?
      • What Countries Do You Have School Holidays For?
      • What Do The Different Event Ranks Mean?
      • What Does Event Visibility Window Mean?
      • What Is the Difference Between an Observed Holiday and an Observance?
    • Tools
      • Is PHQ Attendance Available for All Categories?
      • See Event Trends in the WebApp
      • What is Event Trends?
      • Live TV Events
        • What is Live TV Events?
        • Can You Access Live TV Events via the WebApp?
        • How Do I Integrate Live TV Events into Forecasting Models?
      • Labels
        • What Does the Closed-Doors Label Mean?
    • Beam (Relevancy Engine)
      • An Overview of Beam - Relevancy Engine
      • Creating an Analysis in Beam
      • Uploading Your Demand Data to Beam
      • Viewing the List of Analysis in Beam
      • Viewing the Table of Results in Beam
      • Viewing the Category Importance Information in Beam
      • Feature Importance With Beam - Find the ML Features to Use in Your Forecasts
      • Beam Value Quantification
      • Exporting Correlation Data With Beam
      • Getting More Details on a Date on the Beam Graph
      • Grouping Analyses in Beam
      • Using the Beam Graph
      • Viewing the Time Series Impact Analysis in Beam
    • Location Insights
      • An Overview of Location Insights
      • How to Set a Default Location
      • How Do I Add a Location?
      • How Do I Edit a Location?
      • How Do I Share Location Insights With My Team?
      • How Do I View Details for One Location?
      • How Do I View My Saved Locations as a List?
      • Search and View Event Impact in Location Insights
      • What Do Each of the Columns Mean?
      • What Is the Difference Between Center Point & Radius and City, State, Country?
Powered by GitBook

PredictHQ

  • Terms of Service
  • Privacy Policy
  • GitHub

© 2025 PredictHQ Ltd

On this page
  • Request
  • HTTP Request
  • Path Parameters
  • Response
  • Response Fields
  • Examples
  • Guides

Was this helpful?

  1. API Reference
  2. Saved Locations

Get a Saved Location

Get an existing Saved Location.

Request

HTTP Request

GET https://api.predicthq.com/v1/saved-locations/

Path Parameters

Parameter
Description

location_id

An existing Saved Location ID.

Response

Response Fields

Field
Description

location_id string

The autogenerated identifier for the saved location.

E.g. 8gZ2rn8BRcTjM_3SWdjP

location_code string

The user-supplied identifier for the location. E.g. 4t855453234t5623

name string

The user defined name of the Saved Location set in the create location call.

E.g. My Parking Building

labels array

A list of user defined labels for the location.

E.g.: ["test", "retail"]

create_dt string

E.g. 2022-04-26T11:46:24+00:00

update_dt string

E.g. 2022-04-26T11:46:24+00:00

enrich_dt string

E.g. 2022-04-26T11:46:25+00:00

insights_dt string

E.g. 2022-04-26T11:46:25+00:00

user_id string

The ID of the user who created the saved location. This is present for location created in the WebApp. For locations created via the API this field will not be populated.

E.g. hjqkKozgS8mm

geojson object

This will be present for locations that use a centerpoint and radius. For locations that cover an area (for example city, state or country) they will not have the geojson value defined instead they use place_ids.

Point type locations are defined by latitude and longitude. The radius field defines which events are included in the location. Events that are within the radius or that overlap the radius are included Geometry - Possible types:

  • Point

  • Polygon - this is reserved for future use

place_ids array

E.g. [2750405]

formatted_address string

The address of the location. This can be supplied when created a location. If it's not supplied it will be populated by a reverse geocode.

E.g.

places string

summary_insights array

The date range field includes the start and end datetime for the period that the stats have been calculated for.

subscription_valid_types array

The value is a list of different (subscription) types that this location is valid for. The possible values are events, broadcasts, notifications, features_api.

It is possible to create locations outside of what your subscription has access to. In this case this field will be empty and you will not be able to view events for the location

E.g. ["events"]

status string

Reflects if a location has been updated by the enrichment process. When a location is initially created its status will be pending.

After the enrichment process has updated the location populating summary_insights and other fields the status will be active.

Typically locations only have the pending status for a short time.

E.g. active

Example response

Below is an example response:

{
  "location_id": "h8LbiiiTOXsxSAI0p3wEIg",
  "create_dt": "2023-03-27T22:07:00+00:00",
  "update_dt": "2023-07-03T04:31:38+00:00",
  "enrich_dt": "2023-07-03T04:31:39+00:00",
  "insights_dt": "2023-07-03T04:31:40+00:00",
  "name": "My Parking Building",
  "labels": [
    "parking"
  ],
  "geojson": {
    "type": "Feature",
    "properties": {
      "radius": 0.9,
      "radius_unit": "mi"
    },
    "geometry": {
      "type": "Point",
      "coordinates": [
        -122.40152,
        37.7869
      ]
    }
  },
  "formatted_address": "666 Mission St, San Francisco, CA 94105, USA",
  "places": [
    {
      "place_id": 5391959,
      "type": "locality",
      "name": "San Francisco",
      "county": "City and County of San Francisco",
      "region": "California",
      "country": "US",
      "geojson": {
        "type": "Feature",
        "geometry": {
          "type": "Point",
          "coordinates": [
            -122.41942,
            37.77493
          ]
        }
      }
    }
  ],
  "summary_insights": [
    {
      "date_range": {
        "type": "next_90d",
        "start_dt": "2023-07-03T04:31:40+00:00",
        "end_dt": "2023-10-01T04:31:40+00:00"
      },
      "phq_attendance_sum": 2646606,
      "attended_event_count": 519,
      "non_attended_event_count": 85,
      "unscheduled_event_count": 0,
      "pes_total_sum": 746427,
      "pes_accommodation_sum": 104256,
      "pes_hospitality_sum": 482976, 
      "pes_transportation_sum": 159193
    }
  ],
  "subscription_valid_types": [
    "events"
  ],
  "status": "active"
}

Examples

curl --location 'https://api.predicthq.com/v1/saved-locations/_4Dl3p4Q2zl4ifMjG4Z3ew' \
--header 'Authorization: Bearer TOKEN'
import requests

url = "https://api.predicthq.com/v1/saved-locations/_4Dl3p4Q2zl4ifMjG4Z3ew"
headers = {
  'Authorization': 'Bearer TOKEN'
}

response = requests.request("GET", url, headers=headers)

print(response.text)

Guides

Below are some guides relevant to this API:

PreviousSearch Saved LocationsNextSearch Events for a Saved Location

Last updated 1 month ago

Was this helpful?

The creation date time for the location in format.

The last update date time for the location in format.

The date time the location was last enriched in format.

The date/time insights were last calculated for the location in format.

An object containing the geographic information about a location. Represents the geometry associated with the event in the .

An array of place ids (see the ) for locations that are defined as covering an area (see ) rather than a point and radius.

This is a list of (geonames) Places. It is based on the lowest level place_id in the . It will usually only contain 1 item in the list but will always be a list.

This object contains the . This includes values for each of the 4 stats as well as the date_range field. The stats reflect the number of events and attend happening for the location.

{
  "geojson": {
    "type": "Feature",
    "properties": {
      "radius": 0.9,
      "radius_unit": "mi"
    },
    "geometry": {
      "type": "Point",
      "coordinates": [
        -122.40152,
        37.7869
      ]
    }
  }
}
{
  "formatted_address": "666 Mission St, San Francisco, CA 94105, USA",
}
{
  "places": [
    {
      "place_id": 5391959,
      "type": "locality",
      "name": "San Francisco",
      "county": "City and County of San Francisco",
      "region": "California",
      "country": "US",
      "geojson": {
        "type": "Feature",
        "geometry": {
          "type": "Point",
          "coordinates": [
            -122.41942,
            37.77493
          ]
        }
      }
    }
  ]
}
{
  "summary_insights": [
    {
      "date_range": {
        "type": "next_90d",
        "start_dt": "2023-07-03T04:39:16+00:00",
        "end_dt": "2023-10-01T04:39:16+00:00"
      },
      "phq_attendance_sum": 2646606,
      "attended_event_count": 519,
      "non_attended_event_count": 85,
      "unscheduled_event_count": 0,
      "pes_total_sum": 746427,
      "pes_accommodation_sum": 104256,
      "pes_hospitality_sum": 482976, 
      "pes_transportation_sum": 159193
    }
  ]
}
Working with Location-Based Subscriptions
ISO 8601 format
ISO 8601 format
ISO 8601 format
ISO 8601 format
GeoJSON format
Places API
City, State, Country locations
place_hierarchies
saved locations stats