Skip to content

Commit ac45eaa

Browse files
authored
Update README.md
1 parent 6ff16b2 commit ac45eaa

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

README.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11

22

3-
# [ipapi](https://ipapi.co/) Python Library
3+
# ipapi Python Library ~ [ipapi.co](https://ipapi.co/) by Kloudend, Inc.
44
## IP Address Location | IP Lookup | IP Geolocation API
5-
### by Kloudend, Inc.
65

76
The ipapi Python library provides convenient access to the IP address location service from applications written in the Python language. It makes it easy to harness the potential of the IP geolocation API.
87

9-
The service is powered by https://ipapi.co/ and owned by Kloudend, Inc.
8+
Details on [free IP lookup](https://ipapi.co/free/) and [ipapi pricing plans](https://ipapi.co/pricing/)
109

1110
## Documentation
12-
See the [ipapi API docs]([https://ipapi.co/api/?python#location-of-clients-ip](https://ipapi.co/api/?python#location-of-clients-ip))
11+
See the [ipapi API docs](https://ipapi.co/api/?python#location-of-clients-ip)
1312

1413
## Installation
1514

@@ -46,21 +45,22 @@ import ipapi
4645

4746
ipapi.location(ip, key, output)
4847
```
48+
### [Options](#options)
4949
|Argument|Description |
5050
|--|--|
51-
|`ip`| IP Address that you wish to locate.<br>If omitted, it defaults to the your machine's IP |
51+
|`ip`| IP Address (IPv4 or IPv6) that you wish to locate.<br>If omitted, it defaults to the your machine's IP |
5252
|`key`| API key (for paid plans).<br>Omit it or set key=`None` for usage under [free IP Location]([https://ipapi.co/free/](https://ipapi.co/free/)) tier. |
5353
|`output`| The desired output from the API. <br>For complete IP location object, valid values are `json`, `csv`, `xml`, `yaml`.<br>To retrieve a specific field (e.g. city, country etc. as text), valid values are [1].<br>If omitted or `None`, gets the entire location data as `json` |
5454

5555
[1] Fields supported by the API : `ip`, `city`, `region`, `region_code`, `country`, `country_code`, `country_code_iso3`, `country_capital`, `country_tld`, `country_name`, `continent_code`, `in_eu`, `postal`, `latitude`, `longitude`, `timezone`, `utc_offset`, `country_calling_code`, `currency`, `currency_name`, `languages`, `country_area`, `country_population`, `latlong`, `asn`, `org`
5656

5757
#### Examples
5858

59-
1. Find the **location of your IP address** (suppose your IP is '50.1.2.3')
59+
1. Find the **location of your IP address**
6060
```python
6161
>>> ipapi.location()
6262
```
63-
The output would be a `JSON` object like this :
63+
The output would be a `JSON` object like this (assuming your IP is '50.1.2.3') :
6464
```json
6565
{
6666
"ip": "50.1.2.3",
@@ -150,7 +150,7 @@ You can also use an IPv6 address e.g.
150150
```
151151
'CA'
152152
```
153-
8. Find if **IP address is located in European Union**
153+
8. Find if an **IP address is located in the European Union**
154154
```python
155155
>>> ipapi.location(ip='8.8.8.8', output='in_eu')
156156
```
@@ -206,8 +206,9 @@ You can also use an IPv6 address e.g.
206206

207207
```bash
208208
$ python ipapi -i <IP Address> -k <API KEY> -o <Output Format>
209+
$ python ipapi --ip <IP Address> --key <API KEY> --output <Output Format>
209210
```
210-
where the options are defined above.
211+
where the [options](#options) ip, key, output are defined above.
211212

212213
#### Examples
213214

0 commit comments

Comments
 (0)