PHPackages                             barstec/ip-api - 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. [API Development](/categories/api)
4. /
5. barstec/ip-api

ActiveLibrary[API Development](/categories/api)

barstec/ip-api
==============

Package for handling the ipapi.is API in Laravel

v1.1.1(1y ago)08MITPHP

Since Sep 30Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Bartlomiej-Stec/ip-api)[ Packagist](https://packagist.org/packages/barstec/ip-api)[ RSS](/packages/barstec-ip-api/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (2)Versions (4)Used By (0)

Laravel ipapi.is integration
============================

[](#laravel-ipapiis-integration)

A package for handling the ipapi.is API in Laravel. You will need an API key from [ipapi.is](https://ipapi.is/).

Support
-------

[](#support)

If this package is helpful to you, you can support my work on Ko-fi.

[![ko-fi](https://camo.githubusercontent.com/201ef269611db7eb6b5d08e9f756ab8980df3014b64492770bdf13a6ed924641/68747470733a2f2f6b6f2d66692e636f6d2f696d672f676974687562627574746f6e5f736d2e737667)](https://ko-fi.com/S6S6PH8KM)

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

[](#installation)

1. Install composer package using command:

```
  composer require barstec/ip-api
```

2. Publish configuration files to your project

```
  php artisan vendor:publish --provider="Barstec\IpApi\IpApiServiceProvider"
```

Setup
-----

[](#setup)

First, add an environment variable with your API key to the `.env` file:

```
IP_API_KEY=your_api_key
```

Usage
-----

[](#usage)

Create an **IpApi** object and call the **get** method. You can pass an IP address as a parameter. If left empty, the IP from the current request will be used. The result will be an **stdClass**.

Example of geting city location:

```
$ipApi = new IpApi;
$result = $ipApi->get("8.8.8.8");
$result->location->city;
```

Author
------

[](#author)

[Bartłomiej Stec ](https://github.com/Bartlomiej-Stec)

License
-------

[](#license)

This package is distributed under the [MIT](https://choosealicense.com/licenses/mit/)license

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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 ~0 days

Total

3

Last Release

595d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7c3338fe5a81c87173dd850ffcb25e46d67b4aa006f18df290737352deb5d426?d=identicon)[BartlomiejStec](/maintainers/BartlomiejStec)

---

Top Contributors

[![Bartlomiej-Stec](https://avatars.githubusercontent.com/u/126720454?v=4)](https://github.com/Bartlomiej-Stec "Bartlomiej-Stec (3 commits)")

---

Tags

apilaravelpackageIPvpnfraud detectorvpn detector

### Embed Badge

![Health badge](/badges/barstec-ip-api/health.svg)

```
[![Health](https://phpackages.com/badges/barstec-ip-api/health.svg)](https://phpackages.com/packages/barstec-ip-api)
```

###  Alternatives

[smodav/mpesa

M-Pesa API implementation

16363.7k1](/packages/smodav-mpesa)[joisarjignesh/bigbluebutton

BigBlueButton Server API Library for Laravel

162145.5k1](/packages/joisarjignesh-bigbluebutton)[bmatovu/laravel-mtn-momo

Laravel MTN MOMO integration.

14310.9k](/packages/bmatovu-laravel-mtn-momo)[ardakilic/mutlucell

Mutlucell SMS API wrapper for sending sms text messages for Laravel

457.3k](/packages/ardakilic-mutlucell)[gregoriohc/laravel-trello

A Laravel wrapper and facade package for the Trello API

3366.8k2](/packages/gregoriohc-laravel-trello)[dariusiii/tmdb-laravel

Laravel Package for TMDB ( The Movie Database ) API. Provides easy access to the wtfzdotnet/php-tmdb-api library.

1821.1k](/packages/dariusiii-tmdb-laravel)

PHPackages © 2026

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