Query a network
lookup_networkFind stored MaxMind network records overlapping a CIDR, with optional filters and field selection. Use to filter IP ranges and page through matching records.
Instructions
Find stored network records overlapping a CIDR, with optional filters and field selection. Returned networks may extend beyond the requested CIDR. Use lookup_range for start/end bounds or summarize_network for grouped counts. Repeat the network and database on each page. Stop when has_more is false.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fields | No | Optional field paths. Returns an object keyed by each selected path. Use dots for map keys, numeric array indexes, or $ for the whole record. Omit or use [] for full records. Repeat on each page. | |
| filters | No | Conditions on record fields. For example, [{"field":"autonomous_system_number","operator":"equals","value":13335}]. Omit for no filtering on a new query. On paginated queries, omit to retain the original filters. | |
| network | Yes | IPv4 or IPv6 CIDR to scan, for example 192.168.1.0/24 or 2001:db8::/32. Broad queries may scan many records. | |
| database | No | Exact filename from list_databases. Required when more than one database is loaded. Repeat the same name on each page. | |
| filter_mode | No | Combine filters with and (all must match) or or (any can match). Defaults to and for a new query. Omit when paging to retain the original mode. | |
| iterator_id | No | ID from the previous page. Omit on the first request. Send with the latest resume_token to continue if the iterator expires. | |
| max_results | No | Maximum matching records to return on this page. Use a smaller page to reduce response size. | |
| resume_token | No | Token from the previous page, used if iterator_id is missing or expired. Omit on the first request. If the database build changed, start a new query. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| results | Yes | ||
| has_more | Yes | ||
| iterator_id | Yes | ||
| resume_token | Yes | ||
| total_matched | Yes | ||
| total_processed | Yes |