# getEntityInteractions

**Identifier:** `gdelt_getEntityInteractions`

**Provider:** [GDELT](https://kirha.com/providers/gdelt.md)

Map who an entity acts on and who acts on it in coded news events (e.g., a leader's diplomatic or hostile interactions), with counts, dominant category and recent events.

## Run it with the CLI

```bash
kirha tools run gdelt_getEntityInteractions \
  --input '{
    "entityId": "<entityId>"
  }'
```

`--input` takes a JSON object that matches the input schema. Pass `--input -` to read it from stdin.

## Call it over HTTP

```bash
curl https://api.kirha.com/tools/v1/execute \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: **********' \
  --data '{
  "tool_name": "gdelt_getEntityInteractions",
  "input": {
    "entityId": "<entityId>"
  }
}'
```

Replace the stars with an API key from https://app.kirha.com/api-keys.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "dateEnd": {
      "description": "YYYY-MM-DD, max 30 days after dateStart",
      "type": "string"
    },
    "dateStart": {
      "description": "YYYY-MM-DD, data from 2026-03-01",
      "type": "string"
    },
    "days": {
      "description": "Last N days, default 30",
      "maximum": 30,
      "minimum": 1,
      "type": "number"
    },
    "entityId": {
      "description": "From resolveEntity",
      "type": "string"
    },
    "limit": {
      "default": 10,
      "description": "Counterparts per direction",
      "maximum": 25,
      "minimum": 1,
      "type": "number"
    }
  },
  "required": [
    "entityId"
  ],
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "actedOnBy": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "country": {
            "type": "string"
          },
          "entityId": {
            "type": "string"
          },
          "eventCount": {
            "type": "number"
          },
          "lastEventDate": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "topCategory": {
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "actsOn": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "country": {
            "type": "string"
          },
          "entityId": {
            "type": "string"
          },
          "eventCount": {
            "type": "number"
          },
          "lastEventDate": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "topCategory": {
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "asSource": {
      "type": "number"
    },
    "asTarget": {
      "type": "number"
    },
    "context": {
      "type": "string"
    },
    "entityIds": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "recentEvents": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "category": {
            "type": "string"
          },
          "eventDate": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "title": {
            "type": "string"
          }
        },
        "required": [
          "id"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "totalEvents": {
      "type": "number"
    }
  },
  "required": [
    "context",
    "actsOn",
    "actedOnBy",
    "recentEvents",
    "entityIds"
  ],
  "type": "object"
}
```

## Related tools

Other GDELT tools that this tool refers to, or that refer to it.

- [`resolveEntity`](https://kirha.com/providers/gdelt/resolveEntity.md)

-----

[All GDELT tools](https://kirha.com/providers/gdelt.md) · [< Back to tools list](https://kirha.com/tools.md)