# Get Predicted Impact Area

Most teams start with a fixed radius when scoping events around a location. The problem is that the distance over which events influence demand varies - by industry, by location type, and by how people actually move in that area. A radius that works in one market will miss impact or introduce noise in another.

Predicted Impact Area returns a location and industry-specific boundary that reflects where event-driven demand impact actually occurs. Boundaries are calibrated against real demand and event data across industries and geographies.

Use it as the spatial input for Events API queries, Features API calls, and Beam. Getting scope right at this step improves the quality of everything downstream.

{% hint style="info" %}
Predicted Impact Area is the successor to the Suggested Radius API. It provides a more accurate representation of event impact than a radius-based approach.
{% endhint %}

### Using Predicted Impact Area

The recommended approach is to use Saved Locations. When you create a location using `origin_geojson` without specifying a `geojson` area, Predicted Impact Area is calculated automatically and stored against that location. You can then use the `location_id` across all PredictHQ APIs - Events, Features, and Beam - without needing to manage the boundary yourself.

Polygon-based filtering across PredictHQ APIs requires a saved location. To use a Predicted Impact Area boundary in API queries, create a saved location first and reference it by `location_id`.

## Get Impact Area

> Returns an impact area GeoJSON (Polygon or Point with radius) for the given location and industry.

````json
{"openapi":"3.1.0","info":{"title":"PredictHQ Impact Area API","version":"1.0.0"},"tags":[{"name":"Impact Area API"}],"servers":[{"url":"https://api.predicthq.com"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"$API_KEY","description":"Enter your PredictHQ API key. The Bearer prefix is added automatically.\n\nWhen calling the API directly, send: `Authorization: Bearer <YOUR_API_KEY>` as documented at [https://docs.predicthq.com/api/overview/authenticating](https://docs.predicthq.com/api/overview/authenticating)\n"}},"schemas":{"Industry":{"type":"string","enum":["parking","restaurants","retail","accommodation","cpg","tourism","marketing","transportation","other"],"title":"Industry"},"AreaType":{"type":"string","enum":["polygon","radius"],"title":"AreaType"},"RadiusUnit":{"description":"The unit of the radius returned.\n\nThis will be the unit specified in the radius_unit parameter in the call made.","type":"string","enum":["m","km","ft","mi"],"title":"RadiusUnit"},"PredictedAreaResponse":{"type":"object","properties":{"location":{"description":"Origin location","$ref":"#/components/schemas/LocationResponse"},"warnings":{"description":"Warnings about the response","type":"array","items":{"type":"string"},"title":"Warnings"},"geojson":{"description":"GeoJSON Feature with predicted area geometry","$ref":"#/components/schemas/GeoJsonFeature"}},"required":["location","geojson"],"title":"PredictedAreaResponse"},"LocationResponse":{"description":"A json object representing the geo location of the event.\n\nE.g.:\n```json\n{\n  \"lat\": \"37.747767\",\n  \"lon\": \"-122.455320\"\n}\n```","type":"object","properties":{"lat":{"type":"string","title":"Lat"},"lon":{"type":"string","title":"Lon"}},"required":["lat","lon"],"title":"Location"},"GeoJsonFeature":{"type":"object","properties":{"type":{"type":"string","default":"Feature","const":"Feature","title":"Type"},"properties":{"anyOf":[{"$ref":"#/components/schemas/RadiusProperties"},{"type":"null"}]},"geometry":{"discriminator":{"propertyName":"type","mapping":{"MultiPolygon":"#/components/schemas/MultiPolygon","Point":"#/components/schemas/Point","Polygon":"#/components/schemas/Polygon"}},"oneOf":[{"$ref":"#/components/schemas/Point"},{"$ref":"#/components/schemas/Polygon"},{"$ref":"#/components/schemas/MultiPolygon"}],"title":"Geometry"}},"required":["geometry"],"title":"GeoJsonFeature"},"RadiusProperties":{"type":"object","properties":{"radius":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Radius"},"radius_unit":{"anyOf":[{"$ref":"#/components/schemas/RadiusUnit"},{"type":"null"}]}},"title":"RadiusProperties"},"Point":{"type":"object","properties":{"type":{"type":"string","default":"Point","const":"Point","title":"Type"},"coordinates":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"}],"type":"array","maxItems":2,"minItems":2},{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":3,"minItems":3}],"title":"Coordinates"}},"required":["coordinates"],"title":"Point"},"Polygon":{"type":"object","properties":{"type":{"type":"string","default":"Polygon","const":"Polygon","title":"Type"},"coordinates":{"type":"array","items":{"items":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"}],"type":"array","maxItems":2,"minItems":2},{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":3,"minItems":3}]},"type":"array"},"title":"Coordinates"}},"required":["coordinates"],"title":"Polygon"},"MultiPolygon":{"type":"object","properties":{"type":{"type":"string","default":"MultiPolygon","const":"MultiPolygon","title":"Type"},"coordinates":{"type":"array","items":{"items":{"items":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"}],"type":"array","maxItems":2,"minItems":2},{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":3,"minItems":3}]},"type":"array"},"type":"array"},"title":"Coordinates"}},"required":["coordinates"],"title":"MultiPolygon"},"HTTPValidationError":{"type":"object","properties":{"error":{"type":"string","title":"Error"},"details":{"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorDetail"},"title":"Details"}},"required":["error","details"],"title":"HTTPValidationError"},"ValidationErrorDetail":{"type":"object","properties":{"field":{"type":"string","title":"Field"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"required":["field","msg","type"],"title":"ValidationErrorDetail"}}},"paths":{"/v1/impact-area/":{"get":{"operationId":"get_impact_area","summary":"Get Impact Area","description":"Returns an impact area GeoJSON (Polygon or Point with radius) for the given location and industry.","parameters":[{"name":"industry","in":"query","description":"The industry of interest for which the area will be calculated. For different industries, the area will be different based on the various types of events that would impact the location. For example, if you were getting the impact area around a hotel you'd specify accommodation as the industry.\n\nE.g. `?industry=accommodation`","required":false,"schema":{"default":"other","$ref":"#/components/schemas/Industry"}},{"name":"location.origin","in":"query","description":"A comma-separated string consisting of the latitude and longitude of the location to find the optimal area for. For example your store or hotel location.\n\nThe format is `<latitude>,<longitude>`\n\nE.g. `?location.origin=37.747767,-122.455320`","required":true,"schema":{"type":"string","pattern":"^-?\\d{1,3}(?:\\.\\d+)?,\\-?\\d{1,3}(?:\\.\\d+)?$"}},{"name":"area_type","in":"query","description":"The shape used to represent the returned impact area. Defaults to `polygon`, which returns a GeoJSON Polygon that precisely follows the boundaries of the impact area. Use `radius` for a simpler representation - a GeoJSON Point with a radius property defining a circular impact area.","required":false,"schema":{"default":"polygon","$ref":"#/components/schemas/AreaType"}},{"name":"radius_unit","in":"query","description":"The unit of measurement to be used for the radius if `area_type` is set to `radius`. This can be one of `m` (meters), `km` (kilometers), `ft` (feet), or `mi` (miles).","required":false,"schema":{"default":"m","$ref":"#/components/schemas/RadiusUnit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PredictedAreaResponse"}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"429":{"description":"Rate limited by upstream provider","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"500":{"description":"Impact area service error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"503":{"description":"Upstream provider temporarily unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"504":{"description":"Upstream provider timed out","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}},"tags":["Impact Area API"]}}}}
````

## Examples

{% tabs %}
{% tab title="curl" %}

```bash
curl -X GET "https://api.predicthq.com/v1/impact-area/?location.origin=37.747767,-122.455320&industry=parking" \
     -H "Accept: application/json" \
     -H "Authorization: Bearer $ACCESS_TOKEN"
```

{% endtab %}

{% tab title="python" %}

```python
import requests

response = requests.get(
    url="https://api.predicthq.com/v1/impact-area/",
    headers={
      "Authorization": "Bearer $ACCESS_TOKEN",
      "Accept": "application/json"
    },
    params={
        "location.origin": "37.747767,-122.455320",
        "industry": "parking"
    }
)

print(response.json())
```

{% endtab %}
{% endtabs %}

## OpenAPI Spec

The OpenAPI spec for Impact Area API can be [found here](https://api.predicthq.com/docs/?urls.primaryName=Predicted+Impact+Area+API).
