PHPackages                             kielabokkie/laravel-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. kielabokkie/laravel-ipdata

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

kielabokkie/laravel-ipdata
==========================

Laravel wrapper for kielabokkie/ipdata-php

0.2.1(7y ago)553.9k↑58.7%2MITPHPPHP &gt;=7.1

Since May 21Pushed 7y ago2 watchersCompare

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

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

Ipdata for Laravel
==================

[](#ipdata-for-laravel)

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

Laravel wrapper for the [kielabokkie/ipdata-php](https://github.com/kielabokkie/ipdata-php) package which retrieves IP address information the using the [ipdata.co](https://ipdata.co) API.

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)

Install the package via composer:

```
composer require kielabokkie/laravel-ipdata

```

If you are on Laravel 5.4 or lower or don't use Laravel's auto discovery, you should add the following to your `config/app.php`:

```
'providers' => [
    // ...
    Kielabokkie\LaravelIpdata\IpdataServiceProvider::class,
]

'aliases' => [
    // ...
    'Ipdata' => Kielabokkie\LaravelIpdata\Facades\Ipdata::class,
)
```

Config
------

[](#config)

Add the following to your `config/services.php` file:

```
// ...
'ipdata' => [
    'api_key' => env('IPDATA_API_KEY'),
],
```

Update your `.env` file and enter the API key you got from Ipdata:

```
IPDATA_API_KEY=youkeyhere

```

Usage
-----

[](#usage)

### Lookup of the calling IP address

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

```
use Kielabokkie\LaravelIpdata\Facades\Ipdata;

$res = Ipdata::lookup();
```

### Lookup a specific IP address

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

```
use Kielabokkie\LaravelIpdata\Facades\Ipdata;

$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

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~14 days

Total

3

Last Release

2891d ago

### 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 (8 commits)")

---

Tags

geolocationgeolocation-apiipdatalaravellaravel-5-packagelaravel-wrapperphp

### Embed Badge

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

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

###  Alternatives

[functional-php/trampoline

Trampoline implementation for PHP.

3517.7k1](/packages/functional-php-trampoline)[jansenfelipe/cidades-gratis

Com esse pacote você poderá consultar, gratuitamente, Cidades diretamente no site do IBGE.

423.5k](/packages/jansenfelipe-cidades-gratis)[steirico/kirby-plugin-custom-add-fields

Custom fields for Kirby's add dialog. This plugin allows to define the fields shown on the page add dialog in a page's blueprint.

364.2k](/packages/steirico-kirby-plugin-custom-add-fields)

PHPackages © 2026

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