> For the complete documentation index, see [llms.txt](https://docs.alphageo.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.alphageo.ai/for-developers/alphageo-data-api/global-adaptation-layers-resilience-api.md).

# Global Adaptation Layers Resilience API

The Resilience data API allows you to retrieve detailed resilience data under the Global Adaptation Layers data product for any location globally.

## Endpoint

```rest
GET https://app.alphageo.ai/api/public/v1/resilience_data
```

## Parameters

<table><thead><tr><th>Parameters</th><th data-type="checkbox">Required</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>asset_id</td><td>false</td><td>string (UUID)</td><td>The unique identifier of an asset uploaded to your institution's account.</td></tr><tr><td>address</td><td>false</td><td>string</td><td>Full address of the location</td></tr><tr><td>period</td><td>true</td><td>string</td><td><p>Time period.</p><p><em>Available values</em> : 2025, 2035, 2050, 2100</p></td></tr><tr><td>scenario</td><td>true</td><td>string</td><td><p>Identifier for CMIP6 Emission Scenarios.</p><p><em>Available values</em> : SSP245, SSP370, SSP585</p></td></tr><tr><td>longitude</td><td>false</td><td>number</td><td>Longitude of the location that being queried.</td></tr><tr><td>latitude</td><td>false</td><td>number</td><td>Latitude of the location that being queried.</td></tr></tbody></table>

### Query Validation Priority

When calling these endpoints, you must provide **at least one** way to identify the location. If multiple parameters are supplied, the API resolves the query using the following precedence:

1. **`asset_id`**: If provided, the API looks up the asset under your institution's profile.
2. **`latitude` & `longitude`**: If `asset_id` is not provided, the API looks up data by coordinates.
3. **`address`**: If neither of the above are provided, the API performs geocoding to resolve coordinates.

If none of these parameters are supplied, the API returns a `400 Bad Request` with an error message.

## Example request

#### cURL

<pre class="language-bash"><code class="lang-bash"><strong>$ curl --location 'https://app.alphageo.ai/api/public/v1/resilience_data?longitude=-97.2805288&#x26;latitude=32.7376509&#x26;period=2035&#x26;scenario=SSP245' \
</strong>--header 'Authorization: dse3X8de878c37b2fd6835c52390303fk15fc3'
</code></pre>

#### Python

```
import requests

url = "https://app.alphageo.ai/api/public/v1/resilience_data?longitude=-97.2805288&latitude=32.7376509&period=2035&scenario=SSP245"

payload = {}
headers = {
  'Authorization': 'dse3X8de878c37b2fd6835c52390303fk15fc3'
}

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

print(response.text)

```

## Example response

A successful response containing resilience-adjusted climate risk data of the given location.

```json
{
  "identifiers": {
    "SCENARIO": "SSP245",
    "PERIOD": "2035"
  },
  "heat_stress_adaptation": {
    "BUILDING_DENSITY": 38.62,
    "URBAN_GREENERY": 61.4
  },
  "inland_flooding_adaptation": {
    "POROSITY": 61.4,
    "IF_DIRECT_BARRIER": 16.33,
    "IF_DRAINAGE": 8.16,
    "IF_NATURE_BASED_SOLUTION": 95.92,
    "IF_STORAGE_AND_CONTROL": 100
  },
  "coastal_flooding_adaptation": {
    "CF_COASTAL_DEFENSE": 0,
    "CF_NATURAL_BUFFER": 0,
    "CF_DRAINAGE": 0,
    "CF_STORAGE_AND_CONTROL": 0
  },
  "hurricane_wind_adaptation": {
    "BUILDING_STRENGTH": 38.6,
    "IF_STORAGE_AND_CONTROL": 100,
    "IF_DIRECT_BARRIER": 16.33
  },
  "drought_adaptation": {
    "WATER_WORKS": 100,
    "WATER_STORAGE": 100,
    "WATER_AMENITY": 20.41,
    "WATER_WELL": 0
  },
  "wildfire_adaptation": {
    "FIRE_RESPONSE": 100,
    "FIRE_PREVENTION": 0,
    "FIRE_DETECTION": 0
  },
  "societal_resilience": {
    "LOC_GNI": 85639301.43,
    "VUL_POP": 0.33,
    "HDI": 0.91,
    "GFCP": 21.53
  },
  "data_version": "Aug 2024"
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.alphageo.ai/for-developers/alphageo-data-api/global-adaptation-layers-resilience-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
