Skip to main content

Overview

The Loqate TypeScript SDK makes it easy to capture, verify, and enrich address data without handling HTTP requests or response parsing manually. It’s available as the @loqate/core package and can be used in Node.js, browser, or Next.js apps. You can call the same services exposed by our API — just faster, safer, and with full TypeScript support.
🔧 The SDK replaces direct API calls, but everything maps 1:1 to our REST API. You can still reference endpoint details in the API Reference.

Installation

Basic instructions for package managers:

Initialisation and configuration

You can initialise the Loqate client by importing the LoqateClient class from the @loqate/core package and providing your API key in the configuration object, as shown below:
You can also configure additional options such as the server URL for the API. This is useful if you want to proxy requests through your own server or use a different endpoint. Your API key can be set on the client instance, or passed in per-request:

Quick start examples

Address Capture

Address capture provides two main methods: find and retrieve.

Address Capture - Find

The find request is used to search for addresses based on user input.
You can also pass additional parameters to refine the search, such as container to specify a container ID.

Address Capture - Retrieve

The retrieve request is used to get the full address details for a specific address ID returned from a find request.
For interactive address search or autocomplete, see the Capture SDK guide.

Address Verify

Address verification provides a method to verify and standardize addresses.

Advanced usage

For more advanced usage and additional features, refer to the npm listing.