> For the complete documentation index, see [llms.txt](https://api-docs.disasteraware.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api-docs.disasteraware.com/hazards/requesting-active-hazards/requesting-active-hazards-of-a-specific-category-coming-soon.md).

# Requesting Active Hazards of a Specific Category

## Get active hazards of a specific category

<mark style="color:blue;">`GET`</mark> `https://api.disasteraware.com/​hazards​/active​/category​/{category-id}`

#### Path Parameters

| Name        | Type   | Description                    |
| ----------- | ------ | ------------------------------ |
| category-id | string | The id of the hazard category. |

#### Headers

| Name          | Type   | Description                  |
| ------------- | ------ | ---------------------------- |
| Authorization | string | Authorize to access the API. |

{% tabs %}
{% tab title="200 Cake successfully retrieved." %}

```
[
    {
        "app_ID": 0,
        "app_IDs": "",
        "autoexpire": "Y",
        "category_ID": "EVENT",
        "charter_Uri": "",
        "comment_Text": "D2P2 auto-generated Earthquake Hazard",
        "create_Date": "1622187653844",
        "creator": "DisasterAWARE (Automated)",
        "end_Date": "1622317250574",
        "glide_Uri": "",
        "hazard_ID": 135989,
        "hazard_Name": "Earthquake - 5.0 - 25 km E of Farkhār, Afghanistan",
        "last_Update": "1622230876889",
        "latitude": 36.5382,
        "longitude": 70.1421,
        "master_Incident_ID": "3.1622230828589.22",
        "message_ID": "3.1622230828589",
        "org_ID": -1,
        "severity_ID": "ADVISORY",
        "snc_url": "https://hazardbrief.pdc.org/PRODUCTION/ui/index.html?uuid=ab1bb484-6243-4f26-9eef-4100988a12d3",
        "start_Date": "1622186655613",
        "status": "A",
        "type_ID": "EARTHQUAKE",
        "update_Date": "1622230857048",
        "update_User": null,
        "product_total": "76",
        "uuid": "ab1bb484-6243-4f26-9eef-4100988a12d3",
        "in_Dashboard": "",
        "areabrief_url": null,
        "description": "An earthquake with a magnitude of 5.0 at a depth of 203.36 km (126.36 miles) has occurred at 25 km E of Farkhār, Afghanistan, as reported by the National Earthquake Information Center (NEIC) of the USGS on May 28, 2021, 07:37:51 GMT.\n\nPreliminary analysis indicates that this is a moderate earthquake, and it is fairly deep (shallower quakes generally tend to be more damaging than deeper quakes.) Based on the preliminary data, earthquakes of this depth and magnitude are expected to result in moderate to severe shaking within 25.0 km (15.53 miles) from the epicenter. It is estimated that 32,211 people, 4,026 households, and $55 Million (USD) of infrastructure* are concentrated within this radius.  Additional information will be provided as it becomes available by official sources.\n\nEpicenter: Latitude: 36.5382, Longitude: 70.1421\n*The cost represents the total replacement value of the infrastructure.\n",
        "roles": []
    },
    {
        "app_ID": 0,
        "app_IDs": "",
        "autoexpire": "Y",
        "category_ID": "EVENT",
        "charter_Uri": "",
        "comment_Text": "afb2f252-ec0b-4aa6-80e0-55a663b1c83e",
        "create_Date": "1622230440000",
        "creator": "DisasterAWARE (Automated)",
        "end_Date": "1622403240000",
        "glide_Uri": "",
        "hazard_ID": 136016,
        "hazard_Name": "Terrorism (Assault) - Imam Sahib, Afghanistan",
        "last_Update": "1622230843129",
        "latitude": 37.189,
        "longitude": 68.936,
        "master_Incident_ID": "125.1622230706954.1",
        "message_ID": "125.1622230706954",
        "org_ID": -1,
        "severity_ID": "ADVISORY",
        "snc_url": "https://hazardbrief.pdc.org/PRODUCTION/ui/index.html?uuid=89acc6b2-8a8f-4465-be29-4a0a91a286e5",
        "start_Date": "1622230440000",
        "status": "A",
        "type_ID": "TERRORISM",
        "update_Date": "1622230721404",
        "update_User": null,
        "product_total": "1",
        "uuid": "89acc6b2-8a8f-4465-be29-4a0a91a286e5",
        "in_Dashboard": "",
        "areabrief_url": null,
        "description": "A Terrorism incident (an assault) was reported in Imam Sahib, Afghanistan on May 28, 2021. \n Preliminary reports indicate 17 reported casualties, with  10 fatalities and  7 wounded.  \n\nEvent Summary*: The Taliban attacked a checkpoint in Imam Sahib on Friday which led to a gun battle.  Seven Taliban and three pro-government militiamen were killed in the clash.  Five Taliban and two militiamen were also wounded.  \n(* \"Event Summary\" provided by GeoPioneer/Xinhua.) \n",
        "roles": []
    },
    {
        "app_ID": 0,
        "app_IDs": "",
        "autoexpire": "Y",
        "category_ID": "EVENT",
        "charter_Uri": "",
        "comment_Text": "30453ffc-b3c2-4951-880f-d157355de95d",
        "create_Date": "1622228580000",
        "creator": "DisasterAWARE (Automated)",
        "end_Date": "1622401380000",
        "glide_Uri": "",
        "hazard_ID": 136015,
        "hazard_Name": "Terrorism (Explosive Device) - Baidoa, Somalia",
        "last_Update": "1622229329617",
        "latitude": 3.114,
        "longitude": 43.65,
        "master_Incident_ID": "125.1622228783909.1",
        "message_ID": "125.1622228783909",
        "org_ID": -1,
        "severity_ID": "INFORMATION",
        "snc_url": "https://hazardbrief.pdc.org/PRODUCTION/ui/index.html?uuid=4e20881e-ef62-4f71-8e8d-f9dfd6949df7",
        "start_Date": "1622228580000",
        "status": "A",
        "type_ID": "TERRORISM",
        "update_Date": "1622228796037",
        "update_User": null,
        "product_total": "2",
        "uuid": "4e20881e-ef62-4f71-8e8d-f9dfd6949df7",
        "in_Dashboard": "",
        "areabrief_url": null,
        "description": "A Terrorism incident (an explosive device) was reported in Baidoa, Somalia on May 28, 2021. \n Preliminary reports indicate 16 reported casualties, with  3 fatalities and  13 wounded.  \n\nEvent Summary*: A deadly improvised explosive device (IED) attack killed at least three civilians and wounded 13 more in Baidoa on Friday.  No group has claimed responsibility for the attack.  \n(* \"Event Summary\" provided by GeoPioneer/Garowe Online.) \n",
        "roles": []
    }
]
```

{% endtab %}

{% tab title="403 Could not find a cake matching this query." %}

```
Invalid Token
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
See [Authorizing Requests](/authentication/authorizing-requests.md#get-accesstoken-and-refreshtoken) page to get your accessToken.

See [Requesting Hazard Categories](/hazards/requesting-hazard-categories.md) page to see a list of category-id.

Below is an example request with path parameters *category-id=EVENT*
{% endhint %}

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

```
curl --location --request GET \
  'https://api.disasteraware.com/hazards/active/category/EVENT' \
  --header 'Authorization: Bearer your_accessToken'
```

{% endtab %}

{% tab title="Java" %}

```
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Scanner;

class Main {

	public static void main(String[] args) throws IOException {
		URL url = new URL("https://api.disasteraware.com/hazards/active/category/EVENT");
		HttpURLConnection httpConn = (HttpURLConnection) url.openConnection();
		httpConn.setRequestMethod("GET");

		httpConn.setRequestProperty("Authorization", "Bearer your_accessToken");

		InputStream responseStream = httpConn.getResponseCode() / 100 == 2
				? httpConn.getInputStream()
				: httpConn.getErrorStream();
		Scanner s = new Scanner(responseStream).useDelimiter("\\A");
		String response = s.hasNext() ? s.next() : "";
		System.out.println(response);
	}
}

```

{% endtab %}

{% tab title="Node.js" %}

```
var fetch = require('node-fetch');

fetch('https://api.disasteraware.com/hazards/active/category/EVENT', {
    headers: {
        'Authorization': 'Bearer your_accessToken'
    }
});

```

{% endtab %}

{% tab title="PHP" %}

```
<?php
include('vendor/rmccue/requests/library/Requests.php');
Requests::register_autoloader();
$headers = array(
    'Authorization' => 'Bearer your_accessToken'
);
$response = Requests::get('https://api.disasteraware.com/hazards/active/category/EVENT', $headers);

```

{% endtab %}

{% tab title="Python" %}

```
import requests

headers = {
    'Authorization': 'Bearer your_accessToken',
}

response = requests.get('https://api.disasteraware.com/hazards/active/category/EVENT', headers=headers)

```

{% endtab %}
{% endtabs %}


---

# 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://api-docs.disasteraware.com/hazards/requesting-active-hazards/requesting-active-hazards-of-a-specific-category-coming-soon.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.
