- 1 General notes
- 2 Usage policy
- 3 Almost-API 0.6
- 4 XAPI
- 5 Overpass API
- 6 Converted Output (still in beta tests)
- Usable by anyone
- World wide coverage
- Not guaranteed to suit your needs, use at your own risks, can stop anytimes, etc.
You are welcome to use that API for any purpose but not for any number of query by day. Not every query consumes the same ressources, but above 1.000 queries per day per "project" you might get banned. (By "project" I mean if you use this API in a smartphone app and you have 10.000 customer querying once per day then you are above the limit)
Note : If you plan to call those API with your own software doing lots of mechanical calls, please add
&contact=your@email at the end of your queries. (It doesn't change the result since it isn't taken into account) But I'll be able to contact you to find a solution in case of problems like overload instead of banning you without notices (no promises however).
This Almost-API 0.6 service allows you to access a copy of the openstreetmap data updated every minute. It allows an accelerated read access and supports modification/addition/deletion of data by forwarding your requests to the official server at api.openstreetmap.org (acting as a proxy).
It can be used everywhere the official API could be used as long as the software permits to change the URL from api.openstreetmap.org to api.openstreetmap.fr
It can be faster than the official API server for certain type of queries and can be used to reduce the load on it. Its download area size and max number of objects are larger so that it can be used for intensive usage that is generally not recommended or is forbidden on the official API server.
How/when can you use it
If you need an access to several elements for analysis, statistics, etc.. It is recommended to avoid using the official API to avoid slowing down other contributors's work of editing and use instead some other services for that purpose, like this service if you want API 0.6 compatibilty (or XAPI or Overpass_API for other APIs). However note that if you wish to work for large areas (like hundreds of kilometers wide) that API won't help and you should work with base extracts
In an openstreetmap editor
Since datas are only a few minutes late, it is also possible to use this API to edit with JOSM or Merkaator or even other edition software. Advantages being that this API allows you to download wider areas and/or more objects that the official API would.
- To use in JOSM : Presets (F12) -> "Connexion paramèters"
instead of the default
Nothing else changes, you can use same login/password as before (your osm account)
- Your user and password are transmitted plain text (well, like the official API) but do transit through our server, (however, the password isn't stored)
- No Oauth support
Requests concerning history of objects and gps tracks are forwarded (HTTP 301) directly to the official API, no acceleration is performed and same limits as the official API apply.
Data a little older / data delay
Read calls are answered with a local database copy of openstreetmap, and can be a few minutes late (typically 1 to 2 minutes), this can lead to strange behaviour you have to be aware of : If you are modifying data in some place, upload your changes and delete your JOSM data layers + re-download the data right-away, you'll have the old version before your modifications.
What you should do in that case is keep the data in your editor if you wish to modify it again, or work on another area or wait 1 or 2 minutes.
- Here you can see in munin how late the local data is : api.openstreetmap.fr data delay
Requests not compliant with the API specs
Some calls don't react like the official API : when using calls like /api/0.6/(nodes|ways|relations)?4567,456,789 if one of the element was deleted, this api doesn't return anything while the official API returns it with the attribut "visible=false" to express the fact it was deleted.
For data download, it doesn't matter much, but if you have kept a local version of an osm file in which elements where deleted since, after using JOSM's action "update data/selection" the now suppressed element will still appear in your local copy.
Note that the reverter plugin of JOSM will crash, in some cases due to this limitation.
If you have kept such a local copy of old data that you want to "update", you should switch back to the official API in your settings, then update your local data, then switch back to api.openstreetmap.fr Link title
- https://github.com/osm-fr/simple_api_proxy for the API 0.6 to overpassAPI proxy
The api.openstreetmap.fr service also provide a "XAPI". Address being : http://api.openstreetmap.fr/xapi?
- (example : http://api.openstreetmap.fr/xapi?node[name=London]) See XAPI documentation
There also is a "reduced API" at
- http://api.openstreetmap.fr/xapi-without-meta? (Like the XAPI provided by the OverpassAPI, it sends smaller files and quicker (attributs necessary for edition are not returned unless you add [@meta] to your query, and in that case it does react like the previous)
note : This Overpass installation is in version 7.4 and support area queries
Converted Output (still in beta tests)
Output to osm where ways/relations are converted to nodes
(This uses osmconvert)
- http://api.openstreetmap.fr/osm2node?*[XAPI or Overpass API syntax] -> send a simplified osm file where ways and relation are removed and converted to nodes
Output to GPX
(This uses osmconvert + home made converter)
- http://api.openstreetmap.fr/osm2nodegpx?*[XAPI or Overpass API syntax] -> same but the output is in GPX format with waypoints only