---
title: "Find credit unions with branches near a ZIP code"
method: GET
path: "/credit-unions/nearby"
tags: ["Reference Data"]
---

# Find credit unions with branches near a ZIP code

`GET /credit-unions/nearby`

## Request

- Base URL: `https://api.rateapi.dev`
- URL: `https://api.rateapi.dev/credit-unions/nearby`
- Auth: API key in header `X-API-Key`

Returns the closest NCUA-reported branch per credit union, ordered by estimated straight-line miles from the center of the requested Census ZIP area. This is not driving distance. ZIP-prefix matching remains only as a labelled fallback when centroid data is unavailable.

**Authentication required**: Pass your API key in the `X-API-Key` header.

## Query parameters

- `zip` string, required

## Response `200`

Nearest credit-union branch matches

- NearbyCreditUnionsResponse: Credit unions nearest a ZIP code, with the matching method and the precision disclosure that must accompany the distances.
  - `zip` string, required: The five-digit ZIP code that was searched.
  - `count` integer, required: Number of credit unions returned.
  - `precision` string, required: How the distances were computed, stated in words so it cannot be mistaken for driving distance.
  - `disclosure` string, required: Disclosure text that must be shown alongside these distances.
  - `matches` NearbyCreditUnionMatch[], required: The nearby credit unions, nearest first.
    - `id` string, required: Credit-union id accepted by membership-eligibility endpoints.
    - `name` string, required: Name of the credit union.
    - `slug` string, required: Profile slug accepted with state by GET /credit-unions/{state}/{slug}.
    - `state` string, required: Two-letter US state code the credit union is chartered in.
    - `city` string, nullable, required: Institution headquarters city when available.
    - `match` 'same_zip' | 'distance' | 'nearby_zip_prefix', required: How this credit union was matched to the ZIP code: a branch in the same ZIP, a measured distance, or a shared ZIP prefix.
    - `distance_miles` number, nullable, required: Approximate straight-line miles; null only for the ZIP-prefix fallback.
    - `distance_method` 'branch_coordinate' | 'zip_centroid' | 'null', nullable, required: What the distance was measured from — a branch coordinate or the ZIP centroid — or null when no distance was computed.
    - `branch` NearbyCreditUnionBranch, required: The NCUA-reported branch that a nearby-credit-union distance was measured to.
      - `name` string, nullable, required: Branch name as reported to NCUA, or null when unnamed.
      - `address1` string, nullable, required: Street address of the branch, or null when not reported.
      - `city` string, nullable, required: City the branch is in, or null when not reported.
      - `state` string, nullable, required: Two-letter US state code of the branch, or null when not reported.
      - `postalCode` string, nullable, required: ZIP code of the branch, or null when not reported.
      - `phone` string, nullable, required: Branch phone number, or null when not reported.
      - `mainOffice` boolean, required: True when this branch is the credit union’s main office.

## Other responses

- `400`: The request was malformed — a missing required field, an unparseable body, or a parameter outside its allowed range. The `error` field names what was wrong; retrying the identical request will fail identically.
- `401`: No API key, or a key that is unknown or disabled. Send it in the `X-API-Key` header. Free keys are issued instantly by POST /keys with an email address. The response carries `WWW-Authenticate` pointing at this host's protected-resource metadata, and the `RateLimit-*` headers describing the Free-tier budget a key issued now would carry (scope `anonymous`) — a rejected request spends none of it, so `Remaining` equals `Limit`.
- `429`: Quota exhausted for the current window. `Retry-After` gives the seconds to wait; `upgradeInfo` explains how to lift the cap. Retrying before the reset will fail again and still counts as a request.

---

[API](https://skmtc.dev/rateapi/apis/rate-api.md) · [All operations](https://skmtc.dev/rateapi/apis/rate-api/llms.txt) · [OpenAPI document](https://skmtc.dev/rateapi/apis/rate-api/revisions/06a6db76995f?raw)
