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

# Single Topic

> Fetch one topic for one location. Costs 1 credit.

Returns a single topic for a set of coordinates.

Your API key must carry a scope matching the requested topic. See [Authentication](/authentication).

<ParamField path="topic" type="string" required>
  Topic slug. One of the 37 supported values — see the [Topics Reference](/reference/topics).

  Example: `wildfire`, `brownfield`, `airQuality`
</ParamField>

<ParamField query="lat" type="number" required>
  Latitude in decimal degrees. US locations only.
</ParamField>

<ParamField query="lng" type="number" required>
  Longitude in decimal degrees. US locations only.
</ParamField>

### Response

<ResponseField name="data.topic" type="string">
  The topic slug you requested, echoed back.
</ResponseField>

<ResponseField name="data.location" type="object">
  The coordinates that were resolved.
</ResponseField>

<ResponseField name="data.result.value" type="object | number">
  The primary answer. **Shape depends on the topic category** — an NRI rating
  object, a count, or a measurement object. See [Topics
  Reference](/reference/topics).
</ResponseField>

<ResponseField name="data.result.details" type="object | array | null">
  Supporting records. `null` for many topics.
</ResponseField>

<ResponseField name="meta.credit_cost" type="number">
  Credits charged. Always `1` for this endpoint on success, `0` on failure.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.areahub.com/v1/wildfire/risk?lat=40.71&lng=-74.00" \
    -H "X-API-Key: YOUR_API_KEY"
  ```

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

  r = requests.get(
      "https://api.areahub.com/v1/wildfire/risk",
      params={"lat": 40.71, "lng": -74.00},
      headers={"X-API-Key": YOUR_API_KEY},
  )
  r.raise_for_status()
  data = r.json()
  ```

  ```javascript Node.js theme={null}
  const res = await fetch(
    "https://api.areahub.com/v1/wildfire/risk?lat=40.71&lng=-74.00",
    { headers: { "X-API-Key": process.env.YOUR_API_KEY } },
  );
  const data = await res.json();
  ```
</RequestExample>

<ResponseExample>
  ```json Natural topic theme={null}
  {
    "data": {
      "topic": "wildfire",
      "location": { "lat": 40.71, "lng": -74.0 },
      "result": {
        "value": {
          "title": "Wildfires",
          "rating": "No Rating",
          "score": 0,
          "frequency": 0
        },
        "details": {}
      }
    },
    "meta": {
      "request_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
      "timestamp": "2026-07-14T16:31:55.009Z",
      "credit_cost": 1
    }
  }
  ```

  ```json Proximity topic theme={null}
  {
    "data": {
      "topic": "brownfield",
      "location": { "lat": 40.71, "lng": -74.0 },
      "result": {
        "value": 60,
        "details": {
          "type": "FeatureCollection",
          "features": []
        }
      }
    },
    "meta": {
      "request_id": "a12bc34d-56ef-7890-ab12-cd34ef567890",
      "timestamp": "2026-07-14T16:31:55.009Z",
      "credit_cost": 1
    }
  }
  ```
</ResponseExample>
