Summarize IPs
ipinfo_summarize_ipsAggregate IP addresses into grouped counts and percentages for log analysis, showing breakdowns by country, continent, ASN, or privacy status.
Instructions
Aggregate one or more IP lookups into counts and percentages.
Uses the same validation, deduplication, cache, and upstream batch lookup
path as ipinfo_lookup_ips, but returns fixed-size summary buckets instead
of per-IP records. This is the preferred tool for large log-analysis tasks
such as "where did visitors come from?" when the caller does not need the
underlying records. Percentages are based on mapped_ip_count; filtered
and failed IPs are counted separately. Errors raise ToolError with a
JSON-encoded envelope.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ips | Yes | IPv4/IPv6 addresses to aggregate. Invalid or special-use IPs are filtered. | |
| group_by | No | Summary dimensions to include. Empty returns only mapped, skipped, and failed counts. | |
| top_n | No | Maximum buckets to return per requested group. truncated_groups reports the true distinct count when capped. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mapped_ip_count | Yes | ||
| skipped_count | Yes | ||
| failed_count | Yes | ||
| by_country | No | ||
| by_continent | No | ||
| by_asn | No | ||
| by_privacy | No | ||
| truncated_groups | No |