Skip to content
🌐 Turn any <input> into an address autocomplete
JavaScript HTML Shell CSS
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Create PULL_REQUEST_TEMPLATE.md Nov 14, 2016
__mocks__ feat(reverse-geocoding): expose the reverse geocoding API. (#653) Dec 14, 2018
docs feat(postcode-search): add postcodeSearch attribute and document rest… Feb 17, 2020
scripts chore(release-typings): include typings in dist directory (#899) Sep 30, 2019
src release v1.18.1 Feb 17, 2020
test chore(flaky-e2e-test): improve e2e tests to be less flaky (#973) Jan 6, 2020
.babelrc fix(promise-polyfill): remove babel-polyfill and let babel do magic (#… Feb 5, 2019
.eslintignore fix(autocomplete-css): use babel transpiling for places.css (#887) Sep 30, 2019
.eslintrc.js chore(deps): upgrade all deps (#504) Jun 4, 2018
.gitignore fix(autocomplete-css): use babel transpiling for places.css (#887) Sep 30, 2019
.nvmrc chore(deps): update node.js to v10.19.0 (#995) Feb 17, 2020
.ruby-version chore(deps): update dependency ruby to v2.7.0 Dec 29, 2019
.travis.yml chore(deps): upgrade bundler and ruby version (#997) Feb 17, 2020
CHANGELOG.md release v1.18.1 Feb 17, 2020
CONTRIBUTING.md fix(contributing): fix link Mar 31, 2017
DATA_REFRESH.md chore(pipeline-changelog): update pipeline-changelog (#699) Jan 14, 2019
LICENSE docs(misc): add LICENSE, fix links Apr 6, 2016
PIPELINE_CHANGELOG.md chore(pipeline-changelog): update pipeline-changelog (#699) Jan 14, 2019
README.md release v1.18.1 Feb 17, 2020
autocompleteDataset.js chore(deps): update dependency eslint-config-algolia to v15 (#908) Nov 25, 2019
babel-css.js fix(autocomplete-css): use babel transpiling for places.css (#887) Sep 30, 2019
demo.gif docs(README): demo.gif update Jun 15, 2016
header.png docs(README): add header image Jul 1, 2016
index.js chore(deps): update dependency eslint-config-algolia to v15 (#908) Nov 25, 2019
instantsearchWidget.js chore(deps): update dependency eslint-config-algolia to v15 (#908) Nov 25, 2019
package.json release v1.18.1 Feb 17, 2020
renovate.json Configure Renovate (#507) Jun 11, 2018
typings.d.ts chore(release-typings): include typings in dist directory (#899) Sep 30, 2019
webpack.config.docs.js chore(deps): update dependency eslint-config-algolia to v15 (#908) Nov 25, 2019
webpack.config.js chore(deps): update dependency eslint-config-algolia to v15 (#908) Nov 25, 2019
yarn.lock chore(deps): update dependency uglify-js to v3.7.7 (#994) Feb 17, 2020

README.md

header

Version Build Status License Downloads jsDelivr Hits

Algolia Places provides a fast, distributed and easy way to use an address search autocomplete JavaScript library on your website.

See the website for more information.

Read the blog post introducing Algolia Places.

Fill the Google form to report any irrelevant results.

Demo

Watch more examples on the website.

demo

Getting started

To use Algolia Places, all you need is an <input> and some JavaScript code that will load and use the places.js library.

CDN <script>

Our JavaScript library is available on the jsDelivr CDN and also on cdnjs.

<script src="https://cdn.jsdelivr.net/npm/places.js@1.18.1"></script>

Version is the latest version.

Here's a small example using it:

<input type="search" id="address-input" placeholder="Where are we going?" />

<script>
  var placesAutocomplete = places({
    appId: <YOUR_PLACES_APP_ID>,
    apiKey: <YOUR_PLACES_API_KEY>,
    container: document.querySelector('#address-input')
  });
</script>

Using npm

Algolia Places is also available on npm.

Install the module:

npm install places.js --save

Put an <input> in your html page:

<input type="search" id="address-input" placeholder="Where are we going?" />

Initialize the places.js library:

var places = require('places.js');
var placesAutocomplete = places({
  appId: <YOUR_PLACES_APP_ID>,
  apiKey: <YOUR_PLACES_API_KEY>,
  container: document.querySelector('#address-input')
});

Full documentation is available on the Algolia Places website.

Contributing

Wanna contribute? Awesome, please read the contributing guide.

You can’t perform that action at this time.