
Security News
OWASP 2025 Top 10 Adds Software Supply Chain Failures, Ranked Top Community Concern
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.
@geoapify/geocoder-autocomplete
Advanced tools
A JavaScript address autocomplete input, compatible with Leaflet, MapLibre, OpenLayers, and other map libraries for efficient location search and geocoding.
A lightweight TypeScript/JavaScript library that adds fast, reliable address autocomplete and address autofill to any web app.
It’s powered by the Geoapify Address Autocomplete API, delivering accurate, global results with flexible configuration options.

DIV) and style them freely.type parameter to build structured input fields (e.g., country, city, postcode, street, or amenity), perfect for checkout or registration forms.You can install the Geoapify Geocoder Autocomplete package using your preferred package manager:
npm install @geoapify/geocoder-autocomplete
# or
yarn add @geoapify/geocoder-autocomplete
Alternatively, load it directly from a CDN:
<link rel="stylesheet" href="https://unpkg.com/@geoapify/geocoder-autocomplete/styles/minimal.css" />
<script src="https://unpkg.com/@geoapify/geocoder-autocomplete/dist/index.min.js"></script>
Here’s the improved section for step 2:
Visit Geoapify.com to sign up and get your free API key.
Geoapify offers a Free Plan that includes up to 3,000 address search requests per day, making it ideal for testing, prototyping, and small projects.
You can explore all available plans and usage limits on the Geoapify Pricing page.
Create an HTML container and initialize the autocomplete:
<!-- Container must have position: relative (or absolute) -->
<div id="autocomplete" style="position: relative;"></div>
import { GeocoderAutocomplete } from '@geoapify/geocoder-autocomplete';
const container = document.getElementById('autocomplete');
// When using CDN, access the control as `autocomplete.GeocoderAutocomplete`
const autocomplete = new GeocoderAutocomplete(container, 'YOUR_API_KEY', {
placeholder: 'Enter address...',
lang: 'en',
limit: 5
});
This creates an interactive input that fetches address suggestions in real time. You can customize its behavior through the constructor and available options.
Subscribe to events to react to user selections or API updates:
autocomplete.on('select', (feature) => {
console.log('Selected location:', feature);
});
autocomplete.on('suggestions', (suggestions) => {
console.log('Address suggestions:', suggestions);
});
autocomplete.on('open', () => console.log('Dropdown opened'));
autocomplete.on('close', () => console.log('Dropdown closed'));
See the full list of available events in the Events Reference.
For detailed usage, options, and examples:
The documentation covers everything you need to integrate and customize the autocomplete widget:
Try the address autocomplete in the Playground. Experiment with different options, such as geocoding, biasing results, and more, to see how the autocomplete behavior adapts:
A complete set of ready-to-run demos is available in this repository.
These examples demonstrate how to integrate Geoapify Geocoder Autocomplete into different use cases — from simple address forms to advanced map-based applications.
| Preview | Description | ||
|---|---|---|---|
![]() | One Field Address Form — Single-field autocomplete input | Open | Source |
![]() | Multi-field Address Form — Step-by-step structured address input | Open | Source |
![]() | Address Form + Map — Combined address search with interactive map | Open | Source |
![]() | Autocomplete Types — Filter results by location type | Open | Source |
![]() | Filters & Bias — Demonstrates filter and bias customization | Open | Source |
![]() | Events Showcase — Demonstrates available events and callbacks | Open | Source |
![]() | Places Search (No Map) — Category search with built-in list | Open | Source |
![]() | Leaflet Integration — Address search and markers on interactive map | Open | Source |
![]() | Leaflet + Custom Places List — Custom UI for places results | Open | Source |
![]() | Leaflet + Built-in Places List — Category search with default UI | Open | Source |
![]() | MapLibre GL Integration — Vector maps and reverse geocoding on click | Open | Source |
Explore live examples demonstrating how to use Geoapify Geocoder Autocomplete with various map libraries and input scenarios.
| Demo | Description | Link |
|---|---|---|
| Address Field + Leaflet Map | Integrates the autocomplete field with a Leaflet map for interactive address search. | Open JSFiddle |
| Address Field + MapLibre GL Map | Shows how to connect the autocomplete with a MapLibre GL map. | Open JSFiddle |
| Address Form 1 | Simple address form demonstrating address search and autofill. | Open JSFiddle |
| Address Form 2 | Another address form example with multiple fields. | Open JSFiddle |
| Precise Location for Shipping | Shows how to validate and confirm precise delivery locations. | Open JSFiddle |
| Custom Geocoding Function | Example of a custom autocomplete logic using Geoapify’s Address Autocomplete API. | Open JSFiddle |
⚠️ Note: Address autocomplete speeds up user input, but no service guarantees 100% precision or global coverage.
For critical use cases like shipping or delivery, always verify locations using map previews or reverse geocoding (e.g., the Geoapify Reverse Geocoding API).
We welcome contributions! Here's how you can help:
If you need assistance or have any questions, feel free to reach out to our support team at info@geoapify.com.
FAQs
A JavaScript address autocomplete input, compatible with Leaflet, MapLibre, OpenLayers, and other map libraries for efficient location search and geocoding.
The npm package @geoapify/geocoder-autocomplete receives a total of 4,194 weekly downloads. As such, @geoapify/geocoder-autocomplete popularity was classified as popular.
We found that @geoapify/geocoder-autocomplete demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.