> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getriskdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Submit a location, wait for the analysis, and read the result.

You need an API key. An organization admin opens [**Account Management → Organizations**](https://app.getriskdata.com/v1/#/pages/account-management/organizations), selects the organization, and adds a service account on its **Service Accounts** tab. The key is shown once, so store it in your secret manager.

```bash theme={null}
export GETRISKDATA_API_KEY="your-key"
```

## 1. Submit a location

Send an address, coordinates, or both. Each new analysis uses one credit from each credit limit set on the key, its organization or a parent organization.

```bash curl theme={null}
curl -X POST https://api.getriskdata.com/v1/analyses \
  -H "Authorization: Bearer $GETRISKDATA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"address": "328 Swanston Street, Melbourne VIC 3000, Australia", "external_location_id": "LOC-AU-001"}'
```

```python Python theme={null}
import os
import requests

response = requests.post(
    "https://api.getriskdata.com/v1/analyses",
    headers={"Authorization": f"Bearer {os.environ['GETRISKDATA_API_KEY']}"},
    json={
        "address": "328 Swanston Street, Melbourne VIC 3000, Australia",
        "external_location_id": "LOC-AU-001",
    },
    timeout=30,
)
response.raise_for_status()
analysis = response.json()
print(analysis["analysis_id"], analysis["status"])
```

```typescript TypeScript theme={null}
const response = await fetch("https://api.getriskdata.com/v1/analyses", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.GETRISKDATA_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    address: "328 Swanston Street, Melbourne VIC 3000, Australia",
    external_location_id: "LOC-AU-001",
  }),
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const analysis = await response.json();
console.log(analysis.analysis_id, analysis.status);
```

The answer is `202 Accepted`. The `Location` header and `metadata.links.self` both point to the new analysis.

```json theme={null}
{
  "analysis_id": "00000000-0000-4000-8000-000000000001",
  "status": "queued",
  "metadata": {
    "requested_at": "2026-11-28T15:58:46Z",
    "units": "metric",
    "verification": {
      "status": "unverified"
    },
    "imagery": {
      "oblique": [],
      "street_level": []
    },
    "links": {
      "self": "https://api.getriskdata.com/v1/analyses/00000000-0000-4000-8000-000000000001",
      "app_url": "https://app.getriskdata.com/v2/properties/00000000-0000-4000-8000-000000000001"
    }
  },
  "location": {
    "input": {
      "external_location_id": "LOC-AU-001",
      "submitted_address": "328 Swanston Street, Melbourne VIC 3000, Australia"
    },
    "geocoding": {
      "status": "pending"
    },
    "parcel": {
      "status": "not_assessed"
    },
    "hazards": {
      "perils": {}
    }
  },
  "buildings": []
}
```

## 2. Wait for the result

Poll the analysis. Before each request, wait the number of seconds in the last answer's `Retry-After`, starting with the `POST` answer. Stop when the status is `completed`, `partial` or `failed`. Keep polling on any other status, including one added later. On a `500`, `502`, `503` or `504`, wait and poll again; any other error stops the loop.

```bash curl theme={null}
curl https://api.getriskdata.com/v1/analyses/00000000-0000-4000-8000-000000000001 \
  -H "Authorization: Bearer $GETRISKDATA_API_KEY"
```

```python Python theme={null}
import time

FINISHED = {"completed", "partial", "failed"}
TRANSIENT = {500, 502, 503, 504}
url = analysis["metadata"]["links"]["self"]
headers = {"Authorization": f"Bearer {os.environ['GETRISKDATA_API_KEY']}"}
wait, failures = int(response.headers.get("Retry-After", "15")), 0

while analysis["status"] not in FINISHED:
    time.sleep(wait)
    response = requests.get(url, headers=headers, timeout=60)
    if response.status_code in TRANSIENT:
        failures += 1
        wait = int(response.headers.get("Retry-After") or min(2 ** failures, 60))
        continue
    response.raise_for_status()
    analysis, failures = response.json(), 0
    wait = int(response.headers.get("Retry-After", "15"))

print(analysis["status"])
```

```typescript TypeScript theme={null}
const FINISHED = new Set(["completed", "partial", "failed"]);
const TRANSIENT = new Set([500, 502, 503, 504]);
let result = analysis;
let wait = Number(response.headers.get("Retry-After") ?? "15");
let failures = 0;
while (!FINISHED.has(result.status)) {
  await new Promise((resolve) => setTimeout(resolve, wait * 1000));
  const last = await fetch(result.metadata.links.self, {
    headers: { Authorization: `Bearer ${process.env.GETRISKDATA_API_KEY}` },
  });
  if (TRANSIENT.has(last.status)) {
    failures += 1;
    wait = Number(last.headers.get("Retry-After") ?? Math.min(2 ** failures, 60));
    continue;
  }
  if (!last.ok) throw new Error(`HTTP ${last.status}`);
  result = await last.json();
  failures = 0;
  wait = Number(last.headers.get("Retry-After") ?? "15");
}
console.log(result.status);
```

## 3. Read the result

A `completed` or `partial` analysis holds the location and its buildings. A few fields to start with:

| Field | Meaning |
| - | - |
| `location.geocoding.point` | Where we placed the address. |
| `location.summary.footprint_area` | The total footprint of the selected buildings. |
| `location.hazards.perils` | One entry per peril, with a grade where we have one. |
| `buildings[].dimensions.nr_of_stories` | The number of stories of each building. |
| `buildings[].construction.construction_type` | The main structural material. |

A `failed` analysis has an empty `buildings` list and a `failure` object that says why. See [Analysis lifecycle](https://docs.getriskdata.com/analysis-lifecycle.md).

> [!TIP]
>
> Pass `external_location_id` with your own ID. It comes back in `location.input`, so you can match results to your records.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.