PHPackages                             kielabokkie/ipdata - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. kielabokkie/ipdata

ActiveLibrary

kielabokkie/ipdata
==================

Get IP address information the using ipdata.co API

0.2.5(5y ago)561.1k↑27%21MITPHPPHP &gt;=7.1CI failing

Since Mar 15Pushed 5y ago1 watchersCompare

[ Source](https://github.com/kielabokkie/ipdata-php)[ Packagist](https://packagist.org/packages/kielabokkie/ipdata)[ RSS](/packages/kielabokkie-ipdata/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (4)Versions (9)Used By (1)

Ipdata client library for PHP
=============================

[](#ipdata-client-library-for-php)

[![Author](https://camo.githubusercontent.com/9bd4336b32dfdf89be48fc04f379fcce3b7fadc848a9481232ad8e7c10ff47b8/687474703a2f2f696d672e736869656c64732e696f2f62616467652f62792d406b69656c61626f6b6b69652d6c69676874677265792e7376673f7374796c653d666c61742d737175617265)](https://twitter.com/kielabokkie)[![Packagist Version](https://camo.githubusercontent.com/ca8386b32854a213fae33652e49ecc22388e2cae49aed7b61973d0461b5cf623/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b69656c61626f6b6b69652f6970646174612e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kielabokkie/ipdata)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)

Get IP address information the using the [ipdata.co](https://ipdata.co) API. If you are using Laravel, check out [kielabokkie/laravel-ipdata](https://github.com/kielabokkie/laravel-ipdata).

Prerequisites
-------------

[](#prerequisites)

Ipdata has a free plan that allows you to make 1,500 requests per day and paid plans if you need more than that. All plans need an API key and you'll have to register on their [website](https://ipdata.co/pricing.html) to get one.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require kielabokkie/ipdata

```

Usage
-----

[](#usage)

### Lookup of the calling IP address

[](#lookup-of-the-calling-ip-address)

Please note that when you instantiate the Ipdata class you have to pass your API key as a parameter.

```
$ipdata = new \Kielabokkie\Ipdata('yourapikey');
$res = $ipdata->lookup();

```

### Lookup a specific IP address

[](#lookup-a-specific-ip-address)

```
$ipdata = new \Kielabokkie\Ipdata('yourapikey');
$res = $ipdata->lookup('1.1.1.1');

```

The Ipdata API will return the following data:

```
{
  "ip": "1.1.1.1",
  "is_eu": false,
  "city": "Research",
  "region": "Victoria",
  "region_code": "VIC",
  "country_name": "Australia",
  "country_code": "AU",
  "continent_name": "Oceania",
  "continent_code": "OC",
  "latitude": -37.7,
  "longitude": 145.1833,
  "asn": "AS13335",
  "organisation": "Cloudflare Inc",
  "postal": "3095",
  "calling_code": "61",
  "flag": "https://ipdata.co/flags/au.png",
  "emoji_flag": "🇦🇺",
  "emoji_unicode": "U+1F1E6 U+1F1FA",
  "languages": [
    {
      "name": "English",
      "native": "English"
    }
  ],
  "currency": {
    "name": "Australian Dollar",
    "code": "AUD",
    "symbol": "AU$",
    "native": "$",
    "plural": "Australian dollars"
  },
  "time_zone": {
    "name": "Australia/Melbourne",
    "abbr": "AEST",
    "offset": "+1000",
    "is_dst": false,
    "current_time": "2018-06-20T11:41:23.068040+10:00"
  },
  "threat": {
    "is_tor": false,
    "is_proxy": false,
    "is_anonymous": false,
    "is_known_attacker": false,
    "is_known_abuser": false,
    "is_threat": false,
    "is_bogon": false
  }
}
```

This library will run the response through a json\_decode giving you an easy object to work with, for example:

```
echo $res->country_name; // Australia
echo $res->flag; // https://ipdata.co/flags/au.png
```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~130 days

Recently: every ~212 days

Total

8

Last Release

2071d ago

PHP version history (2 changes)0.1.0PHP &gt;=5.5

0.2.0PHP &gt;=7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/7824402e192649e35e5fa208e52a2bd8cab2afa343388b513f15a1bced95e600?d=identicon)[kielabokkie](/maintainers/kielabokkie)

---

Top Contributors

[![kielabokkie](https://avatars.githubusercontent.com/u/1221750?v=4)](https://github.com/kielabokkie "kielabokkie (22 commits)")[![deanlj](https://avatars.githubusercontent.com/u/4245429?v=4)](https://github.com/deanlj "deanlj (1 commits)")

---

Tags

geolocationgeolocation-apiipdataphp

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/kielabokkie-ipdata/health.svg)

```
[![Health](https://phpackages.com/badges/kielabokkie-ipdata/health.svg)](https://phpackages.com/packages/kielabokkie-ipdata)
```

###  Alternatives

[neuron-core/neuron-ai

The PHP Agentic Framework.

1.8k245.3k21](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
