TransWikia.com

User_Agent argument in Nominatim in GeoPy

Geographic Information Systems Asked on June 22, 2021

I am trying to understand argument in package geopy and Nominatim geocoder.

from geopy.geocoders import Nominatim
geolocator = Nominatim(user_agent="specify_your_app_name_here")

from their documentation.

What User_Agent is and how should I decide what to fill there?

One Answer

User_Agent is an http request header that is sent with each request.

Nominatim requires this value to be set to your application name. The goal is to be able to limit the number of requests per application.

https://operations.osmfoundation.org/policies/nominatim/

Provide a valid HTTP Referer or User-Agent identifying the application (stock User-Agents as set by http libraries will not do).

Moreover, should you have a lot of queries, Nominatim asks that the user_agent also contains your email address (or that you use the email parameter)

https://nominatim.org/release-docs/develop/api/Search/

email=< valid email address >

If you are making large numbers of request please include a valid email address or alternatively include your email address as part of the User-Agent string. This information will be kept confidential and only used to contact you in the event of a problem, see Usage Policy for more details.

Correct answer by JGH on June 22, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP