Photon (Komoot) API
Free Photon geocoding API with no key: fast OpenStreetMap-based search built for typeahead, with forward and reverse geocoding. Self-hostable. Tested.
Endpoint tested and returned HTTP 200 on 2026-08-20
What is the Photon (Komoot) API?
Photon is a free, key-free geocoding API built on OpenStreetMap data and optimised for search-as-you-type, providing forward and reverse geocoding with GeoJSON output.
Photon exists because Nominatim, while excellent, is too slow and too rate-limited for autocomplete. Photon is built on Elasticsearch specifically for fast prefix matching, which makes it the right tool for a location search box.
Its public instance is run by Komoot and has no hard rate limit published, but the software is open source — self-hosting is the expected route for production use, and removes any dependency on someone else's goodwill.
Quick facts
- Base URL
https://photon.komoot.io/api- Authentication
- No API key required on the public instance.
- Rate limit
- No published hard limit, but the public instance is a courtesy — self-host for production.
- Pricing
- Free and open source. Data is ODbL, requiring OpenStreetMap attribution.
- CORS
- Not enabled — call it from your server
- Official docs
- Read the docs
How to use the Photon (Komoot) API
Every request below was executed against the live API on 2026-08-20, and the response shown is the real body it returned — not an illustration.
1. Geocode a place name
GET https://photon.komoot.io/api/?q=berlin&limit=1
curl 'https://photon.komoot.io/api/?q=berlin&limit=1'const res = await fetch("https://photon.komoot.io/api/?q=berlin&limit=1");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);import requests
res = requests.get("https://photon.komoot.io/api/?q=berlin&limit=1", timeout=20)
res.raise_for_status()
print(res.json()){
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"osm_type": "R",
"osm_id": 62422,
"osm_key": "place",
"osm_value": "city",
"type": "city",
"name": "Berlin",
"country": "Deutschland",
"countrycode": "DE",
"extra": {
"admin_level": "4"
},
"extent": [
13.088345,
52.6755087,
13.7611609,
52.3382448
]
},
"geometry": {
"type": "Point",
"coordinates": [
13.3951309,
52.5173885
]
}
}
]
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
q | string | Required | Search query — works well with partial input. berlin |
limit | integer | Optional | Maximum results. 5 |
lang | string | Optional | Language for returned names. en |
lat / lon | float | Optional | Bias results towards a location. 52.52 |
bbox | string | Optional | Restrict to a bounding box. 13.0,52.3,13.7,52.7 |
Response fields
typestring- FeatureCollection — the response is GeoJSON.
features[].geometry.coordinatesarray- [longitude, latitude] — note the order.
features[].properties.namestring- Place name.
features[].properties.country / state / citystring- Administrative context.
features[].properties.osm_id / osm_typeinteger|string- OpenStreetMap object reference.
features[].properties.typestring- Feature classification such as city or street.
What you can build with the Photon (Komoot) API
- Build a fast location autocomplete box
- Geocode addresses without Nominatim's one-per-second limit
- Bias search results towards the user's current position
- Self-host geocoding for privacy or volume
Common errors and how to fix them
Coordinates plotted wrongly
GeoJSON orders coordinates [longitude, latitude].
Fix: Swap them — most mapping code expects latitude first.
Irrelevant results
Global search with no bias.
Fix: Pass lat/lon to bias towards the user, or bbox to constrain the area.
Public instance unavailable
It is a courtesy service.
Fix: Self-host Photon for anything production — it is open source and designed to be run yourself.
Photon (Komoot) API — frequently asked questions
Is Photon free?
Yes, the public instance is free with no API key. It is open source and intended to be self-hosted for production use.
How is it different from Nominatim?
Photon is built on Elasticsearch for fast prefix matching, which makes it suitable for search-as-you-type. Nominatim is more precise for full addresses but limited to one request per second.
Why are my markers in the wrong place?
The response is GeoJSON, which orders coordinates as [longitude, latitude] — the reverse of what most mapping code expects. Swap the first two values.
Do I need to attribute OpenStreetMap?
Yes. The underlying data is ODbL-licensed, so displaying results requires attributing OpenStreetMap contributors.
Tools that pair with this API
JSON Formatter
Format, beautify and minify JSON online with 2-space, 4-space or tab indentation. Sort keys alphabetically and catch syntax errors instantly — free and private.
Unit Converter
Convert between units of length, weight, temperature, area, volume, speed, time and data storage instantly, with a swap button and common conversion tables.
Photon (Komoot) is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-20; always check the official documentation before relying on this API in production, as terms and limits can change.