PHPackages                             navarr/m2-module-regionlookup - 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. navarr/m2-module-regionlookup

ActiveMagento2-module[API Development](/categories/api)

navarr/m2-module-regionlookup
=============================

Magento 2 Region Lookup API

1.0.0(9y ago)04.2k[3 issues](https://github.com/navarr/m2-module-regionlookup/issues)MITPHPPHP ^5.6|^7.0

Since Jun 6Pushed 9y ago1 watchersCompare

[ Source](https://github.com/navarr/m2-module-regionlookup)[ Packagist](https://packagist.org/packages/navarr/m2-module-regionlookup)[ RSS](/packages/navarr-m2-module-regionlookup/feed)WikiDiscussions master Synced yesterday

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

RegionInformationAcquirer Service Contract
==========================================

[](#regioninformationacquirer-service-contract)

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

[](#installation)

This module is really only for developers. You can duplicate it in `app/code` if for some reason you can't use composer (how would that happen??) or you can just

```
composer require navarr/m2-module-regionlookup

```

So far this works with all Magento versions, and the composer version constraints are setup so that it won't install if the modules it uses have a breaking change.

Usage
-----

[](#usage)

There are three methods for use, however only two are currently implemented:

- `getRegionInfoByCode(string $countryId, string $regionCode) : \Magento\Directory\Api\Data\RegionInformationInterface, throws NoSuchEntityException`
- `getRegionInfoByName(string $countryId, string $regionName) : \Magento\Directory\Api\Data\RegionInformationInterface, throws NoSuchEntityException`

`NoSuchEntityException` is thrown when:

- Country ID could not be found
- Region Name/Code could not be found

A `LocalizedException` is thrown if you dare to use `getRegionInfoById(int $regionId)`

Example
-------

[](#example)

```
public function __construct(RegionInformationAcquirerInterface $regionAcquirer)
{
    $state = $regionAcquirer->getRegionInfoByCode('US', 'OH');
    $state->getId(); // some number
    $state->getName(); // Ohio
    $state->getCode(); // OH
}

```

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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

Unknown

Total

1

Last Release

3311d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/24959115e049fb1d71612462e9106b345b3e0e6126439493514018cd440e8937?d=identicon)[navarr](/maintainers/navarr)

---

Top Contributors

[![navarr](https://avatars.githubusercontent.com/u/145128?v=4)](https://github.com/navarr "navarr (1 commits)")

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/navarr-m2-module-regionlookup/health.svg)

```
[![Health](https://phpackages.com/badges/navarr-m2-module-regionlookup/health.svg)](https://phpackages.com/packages/navarr-m2-module-regionlookup)
```

###  Alternatives

[omikron/magento2-factfinder

FACTFinder Webcomponents SDK

1161.8k](/packages/omikron-magento2-factfinder)[loki/magento2-admin-components

Admin Panel grids and forms created via Loki Components

173.7k7](/packages/loki-magento2-admin-components)

PHPackages © 2026

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