# Delete a Saved Location

## DELETE /v1/saved-locations/{location\_id}

> Delete a Saved Location

```json
{"openapi":"3.1.0","info":{"title":"PredictHQ Saved Locations API","version":"1.0.0"},"tags":[{"name":"Saved Locations 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":{"HTTPValidationError":{"type":"object","properties":{"error":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}},"title":"HTTPValidationError"},"ValidationError":{"type":"object","properties":{"field":{"type":"string"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"title":"ValidationError"}}},"paths":{"/v1/saved-locations/{location_id}":{"delete":{"operationId":"delete_saved_location","summary":"Delete a Saved Location","parameters":[{"name":"location_id","in":"path","description":"An existing Saved Location ID.","required":true,"schema":{"type":"string","title":"Location Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"tags":["Saved Locations API"]}}}}
```

## Examples

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

```bash
curl -X DELETE "https://api.predicthq.com/v1/saved-locations/$LOCATION_ID" \
     -H "Authorization: Bearer $ACCESS_TOKEN"
```

{% endtab %}

{% tab title="python" %}

```python
import requests

response = requests.delete(
    url="https://api.predicthq.com/v1/saved-locations/$LOCATION_ID",
    headers={
      "Authorization": "Bearer $ACCESS_TOKEN"
    }
)

print(response.status_code)
```

{% endtab %}
{% endtabs %}

## OpenAPI Spec

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

## Guides

Below are some guides relevant to this API:

* [Working with Location-Based Subscriptions](/getting-started/guides/geolocation-guides/searching-by-location/working-with-location-based-subscriptions.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.predicthq.com/api/saved-locations/delete-a-saved-location.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
