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

# Install the ipdata CLI

Easily make single and bulk IP lookups from your terminal with ipdata's Command Line Interface.

![](https://files.readme.io/e9c658c-Screenshot_from_2022-08-12_19-36-39.png)

# Installation

Install the latest version of the cli with pip.

```shell
python3 -m pip install ipdata
```

### Initialize the cli with your API Key

You need a valid API key from ipdata to use the cli. You can get a free key by [Signing up here](https://ipdata.co/sign-up.html).

```shell
➜ ipdata init <<apiKey>>
 _           _       _
(_)_ __   __| | __ _| |_ __ _
| | '_ \ / _` |/ _` | __/ _` |
| | |_) | (_| | (_| | || (_| |
|_| .__/ \__,_|\__,_|\__\__,_|
  |_|

✨ Successfully initialized.     
```

You can also pass the `--api-key <API Key>` parameter to any command to specify a different API Key.

### Available commands

```shell
➜ ipdata --help
Usage: ipdata [OPTIONS] COMMAND [ARGS]...

  Welcome to the ipdata CLI

Options:
  --api-key TEXT  Your ipdata API Key. Get one for free from
                  https://ipdata.co/sign-up.html
  --help          Show this message and exit.

Commands:
  lookup*   Lookup resources by using the IPData class methods.
  batch     Batch command for doing fast bulk processing.
  init      Initialize the CLI by setting an API key.
  usage     Get today's usage.
  validate  Validates a geofeed file. 
```

### Look up your own IP address

Running the `ipdata` command without any parameters will look up the IP address of the computer you are running the command on. Alternatively you can explicitly look up your own IP address by running.

```shell
ipdata
```

Use `-f` to select the fields you want

```
ipdata -f ip
```

```json json
{
  "ip": "8.8.8.8",
  "status": 200
}
```

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

```
╭─────────╮
│ ip      │
│ 8.8.8.8 │
╰─────────╯
```