---
title: List indicators of compromise
description: Get a list of indicators of compromise (IoCs) matching the specified filters.
breadcrumbs: Docs > API > List indicators of compromise
---

> For the complete documentation index, see [llms.txt](https://dnd37xeb23o8n.cloudfront.net/jen.gilbert/astro-base/llms.txt).

# List indicators of compromise

## v2 (latest)

{% alert level="warning" %}
**Note**: This endpoint is in beta and may be subject to changes.
Please check the documentation regularly for updates.
{% /alert %}

| Datadog site      | API endpoint                                                        |
| ----------------- | ------------------------------------------------------------------- |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v2/security/siem/ioc-explorer     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v2/security/siem/ioc-explorer |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v2/security/siem/ioc-explorer |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v2/security/siem/ioc-explorer      |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v2/security/siem/ioc-explorer |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v2/security/siem/ioc-explorer |
| uk1.datadoghq.com | GET https://api.uk1.datadoghq.com/api/v2/security/siem/ioc-explorer |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v2/security/siem/ioc-explorer      |
| us2.ddog-gov.com  | GET https://api.us2.ddog-gov.com/api/v2/security/siem/ioc-explorer  |

### Overview

Get a list of indicators of compromise (IoCs) matching the specified filters.

OAuth apps require the `security_monitoring_signals_read` authorization [scope](https://dnd37xeb23o8n.cloudfront.net/jen.gilbert/astro-base/api/latest/scopes.md#security-monitoring) to access this endpoint.

### Arguments

#### Query Strings

| Field        | Type    | Description                                                                                                                                           |
| ------------ | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| limit        | integer | Number of results per page. Default: `50`.                                                                                                            |
| offset       | integer | Pagination offset. Default: `0`.                                                                                                                      |
| query        | string  | Search/filter query (supports field:value syntax).                                                                                                    |
| sort[column] | string  | Sort column: score, first_seen_ts_epoch, last_seen_ts_epoch, indicator, indicator_type, signal_count, log_count, category, as_type. Default: `score`. |
| sort[order]  | string  | Sort order: asc or desc. Default: `desc`.                                                                                                             |
| ocsf         | boolean | When true, return only OCSF field-based matches. When false, return regex/message-based matches. Default: `true`.                                     |
| worked_by    | string  | Filter indicators whose triage state was updated by a specific user identified by their handle.                                                       |
| triage_state | enum    | Filter by triage state. Allowed enum values: `not_reviewed`, `reviewed`.                                                                              |

### Response

{% tabs %}
{% tab label="200" %}
OK

{% tabs %}
{% tab label="Model" %}
Response for the list indicators of compromise endpoint.

| Parent field       | Field              | Type      | Description                                                                                                                 |
| ------------------ | ------------------ | --------- | --------------------------------------------------------------------------------------------------------------------------- |
|                    | data               | object    | IoC Explorer list response data object.                                                                                     |
| data               | attributes         | object    | Attributes of the IoC Explorer list response.                                                                               |
| attributes         | data               | [object]  | List of indicators of compromise.                                                                                           |
| data               | as_geo             | object    | Geographic location information for an IP indicator.                                                                        |
| as_geo             | city               | string    | City name.                                                                                                                  |
| as_geo             | country_code       | string    | ISO country code.                                                                                                           |
| as_geo             | country_name       | string    | Full country name.                                                                                                          |
| data               | as_type            | string    | Autonomous system type.                                                                                                     |
| data               | benign_sources     | [object]  | Threat intelligence sources that flagged this indicator as benign.                                                          |
| benign_sources     | name               | string    | Name of the threat intelligence source.                                                                                     |
| data               | categories         | [string]  | Threat categories associated with the indicator.                                                                            |
| data               | first_seen         | date-time | Timestamp when the indicator was first seen.                                                                                |
| data               | id                 | string    | Unique identifier for the indicator.                                                                                        |
| data               | indicator          | string    | The indicator value (for example, an IP address or domain).                                                                 |
| data               | indicator_type     | string    | Type of indicator (for example, IP address or domain).                                                                      |
| data               | last_seen          | date-time | Timestamp when the indicator was last seen.                                                                                 |
| data               | log_matches        | int64     | Number of logs that matched this indicator.                                                                                 |
| data               | m_as_type          | enum      | Effect of a scoring factor on the indicator's threat score. Allowed enum values: `RAISE_SCORE`, `LOWER_SCORE`, `NO_EFFECT`. |
| data               | m_persistence      | enum      | Effect of a scoring factor on the indicator's threat score. Allowed enum values: `RAISE_SCORE`, `LOWER_SCORE`, `NO_EFFECT`. |
| data               | m_signal           | enum      | Effect of a scoring factor on the indicator's threat score. Allowed enum values: `RAISE_SCORE`, `LOWER_SCORE`, `NO_EFFECT`. |
| data               | m_sources          | enum      | Effect of a scoring factor on the indicator's threat score. Allowed enum values: `RAISE_SCORE`, `LOWER_SCORE`, `NO_EFFECT`. |
| data               | malicious_sources  | [object]  | Threat intelligence sources that flagged this indicator as malicious.                                                       |
| malicious_sources  | name               | string    | Name of the threat intelligence source.                                                                                     |
| data               | max_trust_score    | enum      | Effect of a scoring factor on the indicator's threat score. Allowed enum values: `RAISE_SCORE`, `LOWER_SCORE`, `NO_EFFECT`. |
| data               | score              | double    | Threat score for the indicator (0-100).                                                                                     |
| data               | signal_matches     | int64     | Number of security signals that matched this indicator.                                                                     |
| data               | signal_tier        | int64     | Signal tier level.                                                                                                          |
| data               | suspicious_sources | [object]  | Threat intelligence sources that flagged this indicator as suspicious.                                                      |
| suspicious_sources | name               | string    | Name of the threat intelligence source.                                                                                     |
| data               | tags               | [string]  | Tags associated with the indicator.                                                                                         |
| data               | triage_state       | enum      | Current triage state of the indicator. Allowed enum values: `not_reviewed`, `reviewed`.                                     |
| data               | triaged_at         | date-time | Timestamp when the indicator was last triaged.                                                                              |
| data               | triaged_by         | string    | UUID of the user who last triaged the indicator.                                                                            |
| attributes         | metadata           | object    | Response metadata.                                                                                                          |
| metadata           | count              | int64     | Total number of indicators matching the query.                                                                              |
| attributes         | paging             | object    | Pagination information.                                                                                                     |
| paging             | offset             | int64     | Current pagination offset.                                                                                                  |
| data               | id                 | string    | Unique identifier for the response.                                                                                         |
| data               | type               | string    | Response type identifier.                                                                                                   |
{% /tab %}

{% tab label="Example" %}
```json
{
  "data": {
    "attributes": {
      "data": [
        {
          "as_geo": {
            "city": "string",
            "country_code": "string",
            "country_name": "string"
          },
          "as_type": "string",
          "benign_sources": [
            {
              "name": "string"
            }
          ],
          "categories": [],
          "first_seen": "2019-09-19T10:00:00.000Z",
          "id": "string",
          "indicator": "string",
          "indicator_type": "string",
          "last_seen": "2019-09-19T10:00:00.000Z",
          "log_matches": "integer",
          "m_as_type": "string",
          "m_persistence": "string",
          "m_signal": "string",
          "m_sources": "string",
          "malicious_sources": [
            {
              "name": "string"
            }
          ],
          "max_trust_score": "string",
          "score": "number",
          "signal_matches": "integer",
          "signal_tier": "integer",
          "suspicious_sources": [
            {
              "name": "string"
            }
          ],
          "tags": [],
          "triage_state": "not_reviewed",
          "triaged_at": "2019-09-19T10:00:00.000Z",
          "triaged_by": "string"
        }
      ],
      "metadata": {
        "count": "integer"
      },
      "paging": {
        "offset": "integer"
      }
    },
    "id": "string",
    "type": "string"
  }
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="400" %}
Bad Request

{% tabs %}
{% tab label="Model" %}
API error response.

| Field               | Type     | Description       |
| ------------------- | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    "Bad Request"
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="403" %}
Not Authorized

{% tabs %}
{% tab label="Model" %}
API error response.

| Field               | Type     | Description       |
| ------------------- | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    "Bad Request"
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="429" %}
Too many requests

{% tabs %}
{% tab label="Model" %}
API error response.

| Field               | Type     | Description       |
| ------------------- | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    "Bad Request"
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}
{% /tabs %}

### Code Example

{% tabs %}
{% tab label="Curl" %}
```bash
# Set your Datadog site and credentials
export DD_SITE="datadoghq.com" # Or us3.datadoghq.com, us5.datadoghq.com, datadoghq.eu, ap1.datadoghq.com, ap2.datadoghq.com, uk1.datadoghq.com, ddog-gov.com, us2.ddog-gov.com
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X GET "https://api.${DD_SITE}/api/v2/security/siem/ioc-explorer" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
```
{% /tab %}

{% tab label="Go" %}
```go
// List indicators of compromise returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)

func main() {
	ctx := datadog.NewDefaultContext(context.Background())
	ctx = context.WithValue(ctx, datadog.ContextAccessToken, os.Getenv("DD_BEARER_TOKEN"))
	configuration := datadog.NewConfiguration()
	configuration.SetUnstableOperationEnabled("v2.ListIndicatorsOfCompromise", true)
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewSecurityMonitoringApi(apiClient)
	resp, r, err := api.ListIndicatorsOfCompromise(ctx, *datadogV2.NewListIndicatorsOfCompromiseOptionalParameters().WithLimit(1))

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SecurityMonitoringApi.ListIndicatorsOfCompromise`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SecurityMonitoringApi.ListIndicatorsOfCompromise`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://dnd37xeb23o8n.cloudfront.net/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:

```bash
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"
```
{% /tab %}

{% tab label="Java" %}
```java
// List indicators of compromise returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.SecurityMonitoringApi;
import com.datadog.api.client.v2.api.SecurityMonitoringApi.ListIndicatorsOfCompromiseOptionalParameters;
import com.datadog.api.client.v2.model.IoCExplorerListResponse;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN"));
    defaultClient.setUnstableOperationEnabled("v2.listIndicatorsOfCompromise", true);
    SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient);

    try {
      IoCExplorerListResponse result =
          apiInstance.listIndicatorsOfCompromise(
              new ListIndicatorsOfCompromiseOptionalParameters().limit(1));
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SecurityMonitoringApi#listIndicatorsOfCompromise");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://dnd37xeb23o8n.cloudfront.net/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:

```bash
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"
```
{% /tab %}

{% tab label="Python" %}
```python
"""
List indicators of compromise returns "OK" response
"""

from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.security_monitoring_api import SecurityMonitoringApi

configuration = Configuration()
configuration.access_token = environ["DD_BEARER_TOKEN"]
configuration.unstable_operations["list_indicators_of_compromise"] = True
with ApiClient(configuration) as api_client:
    api_instance = SecurityMonitoringApi(api_client)
    response = api_instance.list_indicators_of_compromise(
        limit=1,
    )

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://dnd37xeb23o8n.cloudfront.net/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:

```bash
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"
```
{% /tab %}

{% tab label="Ruby" %}
```ruby
# List indicators of compromise returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
  config.access_token = ENV["DD_BEARER_TOKEN"]
  config.unstable_operations["v2.list_indicators_of_compromise".to_sym] = true
end
api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new
opts = {
  limit: 1,
}
p api_instance.list_indicators_of_compromise(opts)
```

#### Instructions

First [install the library and its dependencies](https://dnd37xeb23o8n.cloudfront.net/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:

```bash
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"
```
{% /tab %}

{% tab label="Rust" %}
```rust
// List indicators of compromise returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_security_monitoring::ListIndicatorsOfCompromiseOptionalParams;
use datadog_api_client::datadogV2::api_security_monitoring::SecurityMonitoringAPI;

#[tokio::main]
async fn main() {
    let mut configuration = datadog::Configuration::new();
    configuration.set_unstable_operation_enabled("v2.list_indicators_of_compromise", true);
    let api = SecurityMonitoringAPI::with_config(configuration);
    let resp = api
        .list_indicators_of_compromise(ListIndicatorsOfCompromiseOptionalParams::default().limit(1))
        .await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://dnd37xeb23o8n.cloudfront.net/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:

```bash
DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
```
{% /tab %}

{% tab label="TypeScript" %}
```typescript
/**
 * List indicators of compromise returns "OK" response
 */

import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration({
  authMethods: {
    AuthZ: {
      accessToken: process.env.DD_BEARER_TOKEN as string,
    },
  },
});
configuration.unstableOperations["v2.listIndicatorsOfCompromise"] = true;
const apiInstance = new v2.SecurityMonitoringApi(configuration);

const params: v2.SecurityMonitoringApiListIndicatorsOfCompromiseRequest = {
  limit: 1,
};

apiInstance
  .listIndicatorsOfCompromise(params)
  .then((data: v2.IoCExplorerListResponse) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://dnd37xeb23o8n.cloudfront.net/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:

```bash
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"
```
{% /tab %}
{% /tabs %}
