# latlongify

> Calculate country/county/state from lat/long

Latest version **2.0.1** (published 2025-09-22) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install latlongify
pnpm add latlongify
yarn add latlongify
bun add latlongify
```

## Health

**Score 55/100 (C)** — status: stable.

Positive: esm support; no vulnerabilities; has provenance.

Warnings: low downloads; no types; large bundle.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2025-09-22 |
| First published | 2022-09-30 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 13.3 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 0 |
| Author | Glynn Bird |
| Maintainers | glynnbird |
| Keywords | Geo |

## Links

- npm: https://www.npmjs.com/package/latlongify
- Repository: https://github.com/glynnbird/latlongify
- Homepage: https://github.com/glynnbird/latlongify#readme
- Issues: https://github.com/glynnbird/latlongify/issues
- npm.io page: https://npm.io/package/latlongify

## Recent versions

- 2.0.1 (latest) — 2025-09-22
- 2.0.0 — 2025-06-19
- 1.0.2 — 2022-10-03
- 1.0.1 — 2022-10-03
- 1.0.0 — 2022-09-30

## README

# latlongify

A simple utility to lookup a lat/long pair and tell you:

- which country it is in
- which UK county it is in (if in the UK)
- which US state it is in (if in the USA)
- the nearest UK town/city (if in the UK)

## Installation

```sh
npm install --save latlongify
```

## Usage

```js
import * as latlongify from 'latlongify'
const r = await latlongify.find(52.4226, 0.01) // latitude & longitude
console.log(r)
// {
//   country: { name: 'United Kingdom', code: 'GBR', group: 'Countries' },
//   state: undefined,
//   county: { name: 'Cambridgeshire', group: 'UK Counties' },
//   city: { name: 'Somersham', lat: 52.3823, long: 0.0006 }
// }
```

---
_Source: https://npm.io/package/latlongify · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
