PHPackages                             geolax/freeipapi - 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. geolax/freeipapi

ActiveLibrary[API Development](/categories/api)

geolax/freeipapi
================

FreeIPAPI driver addon for geolax/geolocate

v1.1.0(3mo ago)036[2 PRs](https://github.com/geolax/freeipapi/pulls)MITPHPPHP ^8.2CI passing

Since Apr 2Pushed 3mo agoCompare

[ Source](https://github.com/geolax/freeipapi)[ Packagist](https://packagist.org/packages/geolax/freeipapi)[ RSS](/packages/geolax-freeipapi/feed)WikiDiscussions main Synced 4w ago

READMEChangelog (2)Dependencies (6)Versions (5)Used By (0)

Geolax FreeIPAPI
================

[](#geolax-freeipapi)

[![Latest Version on Packagist](https://camo.githubusercontent.com/28399efe939d018e38b7bac43894148d209ef1b1541e4a6dcf018ebe07d5aeea/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f67656f6c61782f6672656569706170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/geolax/freeipapi)[![Total Downloads](https://camo.githubusercontent.com/d179ebb9ae4f2994a64008e039b19480d9b9c46d4fbef0b34e734c7606dfea7a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f67656f6c61782f6672656569706170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/geolax/freeipapi)

[FreeIPAPI](https://freeipapi.com) driver addon for [geolax/geolocate](https://github.com/geolax/geolocate).

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

[](#installation)

```
composer require geolax/freeipapi
```

That's it. The package is auto-discovered by Laravel and registers itself as the `freeipapi` driver.

Configuration
-------------

[](#configuration)

Add or update the driver config in `config/geolocate.php`:

```
'drivers' => [
    'freeipapi' => [
        'driver'   => 'freeipapi',
        'base_url' => env('GEOLOCATE_FREEIPAPI_URL', 'https://freeipapi.com'),
        'api_key'  => env('GEOLOCATE_FREEIPAPI_KEY'),
        'server'   => env('GEOLOCATE_FREEIPAPI_SERVER', 'free'),
        'timeout'  => 5,
    ],
],
```

### Environment Variables

[](#environment-variables)

VariableDefaultDescription`GEOLOCATE_DRIVER``freeipapi`Set this in the base package to use FreeIPAPI as default`GEOLOCATE_FREEIPAPI_URL``https://freeipapi.com`Base URL override`GEOLOCATE_FREEIPAPI_KEY``null`API key for paid plans (Bearer token)`GEOLOCATE_FREEIPAPI_SERVER``free`Server region: `free`, `us`, `de`, `sgp`, `au`### Servers

[](#servers)

KeyHostPlan`free``freeipapi.com`Free (rate limited)`us``us.freeipapi.com`Paid`de``de.freeipapi.com`Paid`sgp``sgp.freeipapi.com`Paid`au``au.freeipapi.com`PaidUsage
-----

[](#usage)

```
use Geolax\Geolocate\Facades\Geolocate;

$result = Geolocate::lookup('1.1.1.1');

$result->ipAddress;    // "1.1.1.1"
$result->countryName;  // "Australia"
$result->countryCode;  // "AU"
$result->cityName;     // "Sydney"
$result->latitude;     // -33.8688
$result->longitude;    // 151.209
$result->timezone;     // "Australia/Sydney"
$result->currency;     // "AUD"
```

### FreeIPAPI-Specific Data

[](#freeipapi-specific-data)

FreeIPAPI returns additional fields beyond the standard DTO. Access them via `raw`:

```
$result = Geolocate::lookup('1.1.1.1');

$result->raw['capital'];         // "Canberra"
$result->raw['phoneCodes'];      // [61]
$result->raw['timeZones'];       // ["Australia/Sydney", "Australia/Melbourne", ...]
$result->raw['currencies'];      // ["AUD"]
$result->raw['languages'];       // ["en"]
$result->raw['asn'];             // "13335"
$result->raw['asnOrganization']; // "Cloudflare, Inc."
$result->raw['isProxy'];         // false
```

### Authentication (Paid Plans)

[](#authentication-paid-plans)

For paid/unlimited plans, set your API key:

```
GEOLOCATE_FREEIPAPI_KEY=your-api-key-here
GEOLOCATE_FREEIPAPI_SERVER=us
```

The driver automatically sends the API key as a Bearer token in the `Authorization` header.

Testing
-------

[](#testing)

```
composer test
```

Credits
-------

[](#credits)

- [Bishwajit Adhikary](https://github.com/bishwajitcadhikary)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance82

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity49

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

2

Last Release

90d ago

PHP version history (2 changes)v1.0.0PHP ^8.4

v1.1.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/05f9a72ab9f1685e2d1e829714d6c3470ea38acc3bdf3b6608ac5edb4997b835?d=identicon)[bishwajitcadhikary](/maintainers/bishwajitcadhikary)

---

Top Contributors

[![bishwajitcadhikary](https://avatars.githubusercontent.com/u/55208330?v=4)](https://github.com/bishwajitcadhikary "bishwajitcadhikary (6 commits)")

---

Tags

laravelgeolocationaddonfreeipapigeolocatefreeipapi.com

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/geolax-freeipapi/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M345](/packages/psalm-plugin-laravel)[nuwave/lighthouse

A framework for serving GraphQL from Laravel

3.5k11.8M116](/packages/nuwave-lighthouse)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

77022.3M143](/packages/laravel-mcp)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

815320.5k3](/packages/defstudio-telegraph)[essa/api-tool-kit

set of tools to build an api with laravel

53386.5k](/packages/essa-api-tool-kit)[simplestats-io/laravel-client

Analytics for Laravel. Track visitors, registrations, and payments. Discover which channels actually drive revenue, not just traffic. Server-side, GDPR compliant, ad-blocker proof.

5019.3k](/packages/simplestats-io-laravel-client)

PHPackages © 2026

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