event_counts_by_country

Pack: acled · Endpoint: https://gateway.pipeworx.io/acled/mcp

Aggregate event and fatality counts by country over a date range. Useful for cross-country comparison and time-bounded risk snapshots.

Parameters

NameTypeRequiredDescription
event_date_fromstringnoYYYY-MM-DD inclusive
event_date_tostringnoYYYY-MM-DD inclusive
regionstringnoOptional region restriction
event_typestringnoOptional event-type restriction
limitnumbernoUnderlying-event cap (1-5000, default 5000)

Example call

Arguments

{
  "event_date_from": "2024-01-01",
  "event_date_to": "2024-06-30",
  "region": "Middle East"
}

curl

curl -X POST https://gateway.pipeworx.io/acled/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"event_counts_by_country","arguments":{"event_date_from":"2024-01-01","event_date_to":"2024-06-30","region":"Middle East"}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('event_counts_by_country', {
  "event_date_from": "2024-01-01",
  "event_date_to": "2024-06-30",
  "region": "Middle East"
});

More examples

{
  "event_date_from": "2023-01-01",
  "event_date_to": "2023-12-31",
  "event_type": "Violence against civilians"
}

Response shape

Always returns: total_events, countries, truncated, breakdown

FieldTypeDescription
total_eventsnumberTotal events processed
countriesnumberNumber of countries with events
truncatedbooleanWhether results were capped at 5000 events
breakdownarrayAggregated counts per country, sorted by event count descending
Full JSON Schema
{
  "type": "object",
  "properties": {
    "total_events": {
      "type": "number",
      "description": "Total events processed"
    },
    "countries": {
      "type": "number",
      "description": "Number of countries with events"
    },
    "truncated": {
      "type": "boolean",
      "description": "Whether results were capped at 5000 events"
    },
    "breakdown": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "country": {
            "type": "string",
            "description": "Country name"
          },
          "events": {
            "type": "number",
            "description": "Total events in country"
          },
          "fatalities": {
            "type": "number",
            "description": "Total fatalities in country"
          },
          "by_type": {
            "type": "object",
            "additionalProperties": {
              "type": "number"
            },
            "description": "Event count by type"
          }
        },
        "required": [
          "country",
          "events",
          "fatalities",
          "by_type"
        ]
      },
      "description": "Aggregated counts per country, sorted by event count descending"
    }
  },
  "required": [
    "total_events",
    "countries",
    "truncated",
    "breakdown"
  ]
}

Connect

Add this to your MCP client config, or use one-click install buttons:

{
  "mcpServers": {
    "acled": {
      "url": "https://gateway.pipeworx.io/acled/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build June 12, 2026