---
updatedAt: 2025-11-11T22:57:41.000Z
agentTools:
  projectIndex: https://docs.ipdata.co/llms.txt
---

# Advanced Usage

Once you have installed and initialized the CLI you are now ready to make requests.

### Look up any IP address

You can pass any valid IPv4 or IPv6 address to the `ipdata` command to look it up. In case an invalid value is passed you will get the error `ERROR    'BLEH' does not appear to be an IPv4 or IPv6 address"`.

```shell
➜ ipdata 8.8.8.8
```

To pretty print the result pass the `-p` flag

```
╭────────────────────────────────╮ ╭────────────╮ ╭─────────────────╮ ╭──────────╮ ╭─────────────╮ ╭───────────────╮ ╭──────────────╮ ╭────────────────╮ ╭────────────────╮ ╭────────╮ ╭──────────────╮
│ ip                             │ │ is_eu      │ │ city            │ │ region   │ │ region_code │ │ country_name  │ │ country_code │ │ continent_name │ │ continent_code │ │ postal │ │ calling_code │
│ 24.24.24.24                    │ │ False      │ │ Syracuse        │ │ New York │ │ NY          │ │ United States │ │ US           │ │ North America  │ │ NA             │ │ 13261  │ │ 1            │
╰────────────────────────────────╯ ╰────────────╯ ╰─────────────────╯ ╰──────────╯ ╰─────────────╯ ╰───────────────╯ ╰──────────────╯ ╰────────────────╯ ╰────────────────╯ ╰────────╯ ╰──────────────╯
╭────────────────────────────────╮ ╭────────────╮ ╭─────────────────╮ ╭──────────╮                                                                                                                     
│ flag                           │ │ emoji_flag │ │ emoji_unicode   │ │ count    │                                                                                                                     
│ https://ipdata.co/flags/us.png │ │ 🇺🇸         │ │ U+1F1FA U+1F1F8 │ │ 4086     │                                                                                                                     
╰────────────────────────────────╯ ╰────────────╯ ╰─────────────────╯ ╰──────────╯                                                                                                                     
╭────────────────────────────────╮ ╭──────────────────╮ ╭─────────────────╮ ╭────────────────╮ ╭───────────────────────────────╮ ╭───────────────────────╮
│ asn                            │ │ company          │ │ languages       │ │ currency       │ │ time_zone                     │ │ threat                │
│ ├── asn                        │ │ ├── name         │ │ └──             │ │ ├── name       │ │ ├── name                      │ │ ├── is_tor            │
│ │   AS11351                    │ │ │   Rr-Route     │ │     ├── name    │ │ │   US Dollar  │ │ │   America/New_York          │ │ │   False             │
│ ├── name                       │ │ ├── domain       │ │     │   English │ │ ├── code       │ │ ├── abbr                      │ │ ├── is_icloud_relay   │
│ │   Charter Communications Inc │ │ │                │ │     ├── native  │ │ │   USD        │ │ │   EDT                       │ │ │   False             │
│ ├── domain                     │ │ ├── network      │ │     │   English │ │ ├── symbol     │ │ ├── offset                    │ │ ├── is_proxy          │
│ │   spectrum.com               │ │ │   24.24.0.0/19 │ │     └── code    │ │ │   $          │ │ │   -0400                     │ │ │   False             │
│ ├── route                      │ │ └── type         │ │         en      │ │ ├── native     │ │ ├── is_dst                    │ │ ├── is_datacenter     │
│ │   24.24.0.0/18               │ │     business     │ ╰─────────────────╯ │ │   $          │ │ │   True                      │ │ │   False             │
│ └── type                       │ ╰──────────────────╯                     │ └── plural     │ │ └── current_time              │ │ ├── is_anonymous      │
│     business                   │                                          │     US dollars │ │     2022-07-15T16:59:44-04:00 │ │ │   False             │
╰────────────────────────────────╯                                          ╰────────────────╯ ╰───────────────────────────────╯ │ ├── is_known_attacker │
                                                                                                                                 │ │   False             │
                                                                                                                                 │ ├── is_known_abuser   │
                                                                                                                                 │ │   False             │
                                                                                                                                 │ ├── is_threat         │
                                                                                                                                 │ │   False             │
                                                                                                                                 │ ├── is_bogon          │
                                                                                                                                 │ │   False             │
                                                                                                                                 │ └── blocklists        │
                                                                                                                                 │     []                │
                                                                                                                                 ╰───────────────────────╯                                                    
```

### Copying results to clipboard

Use `-c` to copy the results to the clipboard!

```
➜ ipdata 1.1.1.1 -f ip -f asn -c 
📋️ Copied result to clipboard!  
```

### Filtering results by a list of fields

Use `--fields` to filter the responses

```shell
➜ ipdata --fields city --fields country_name'
```

or use `-f`

```shell
➜ ipdata 1.1.1.1 -f ip -f asn
```

```json
{
  "ip": "1.1.1.1",
  "asn": {
    "asn": "AS13335",
    "name": "Cloudflare, Inc.",
    "domain": "cloudflare.com",
    "route": "1.1.1.0/24",
    "type": "business"
  },
  "status": 200
}
```

### Available Fields

A list of all the fields returned by the API is maintained at [Response Fields](https://docs.ipdata.co/api-reference/response-fields)