Skip to content

geoapify/sample-query-places-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Getting OpenStreetMap data in Python

This code sample shows how to get OSM data using the Geoapify Places API. You can query cities and places by specifying a city and places category.

Run the code sample

Important! Sign up on Geoapify, generate an API key and replace "YOUR_API_KEY" with your API key.

You can run the Python code either locally or through an online compiler. For example, Programiz.

To run the code sample locally:

  1. Install Python3 from the official page >>
  2. Install the "requests" module. You can find detailed instructions here >>
  3. Execute the Python file with "python3 city_find.py"

Get OSM places for a city

You can download up to 60000 places/day with your API key for free. Learn Geoapify Pricing policies here >>

  1. Choose a place category and put it to the placeCategory variable. You can find a list of categories here >>
  2. Set the city variable.
  3. Adjust the limitPerRequest and totalLimit variables.
  4. Run the Code Sample

Learn more

About

This code sample shows how to get OpenStreetMap data using the Geoapify Places API.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages