Skip to main content

Places API Geocoding!

There are a many geocoding APIs out there to choose from. However, Places API tops them all with the most accurate, affordable, and effective solution!

Our package focuses on a pythonic and accessible way to geocode POIs (Places of Interest) in Python.


SUPPORT

We have multiple support channels that you can contact us on:


NOTE

Places is a commercial product created for the purpose of geocoding with simplicity and speed. Authorization API tokens are necessary for using the API endpoints. Registering such API tokens is possible through our website subscription page.

→ Check out our official documentation!


QUICK START

The places module:

The places(token: str) module allows you to register your access tokens into the Places API which provides the base functionality for geocoding, density, convex, and radius calls.

→ Note: The Places API package undergoes constant development so consider that endpoint changes may occur.

To import the Places API package:

from places_geocoding import places_api as pa

TABLE OF CONTENTS

Endpoint Function
load_properties_api load_radius()
convex_search convex()
density_search density()
reverse_geocode reverse()
batch_reverse batch_reverse()
geocode forward()
batch_geocode batch_forward()

API EXAMPLES

To use the Places API for free leave "token" argument blank

Note: Free usage has a rate limit of 2 requests / second

All example code to the Places API package can be found below:

load_radius()
  • coordinate: required, indicates center of search
  • radius: required, indicates radius of search
  • reverse_param: option, (bool indicating the order of the input coordinates)
Example(1)
pg = pa.Places(token)
# pg = pa.Places() for free plan

result = pg.load_properties(
    coordinates=[43.0961466, -77.6337776],
    radius=100,
    reverse_param=False
)
convex()
  • coordinate_array: required, edges of polygon
  • reverse_param: optional, (bool indicating the order of the input coordinates)
Example(2)
pg = pa.Places(token)
# pg = pa.Places() for free plan

result = pg.convex(
    coordinates=[[43.0961466, -77.6337776],
     [43.1018722, -77.6334654],
     [43.1010339, -77.6342459]],
    reverse_param=False
)
density()

Radius Load Density:

  • unit_input: required, str
    • options: [km, mi, m, ft, yd]
  • unit_output: required, str
    • options: [km, mi, m, ft, yd]
  • coordinates: optional, list
  • reverse_param: optional, (bool indicating the order of the input coordinates)
Example(3)
pg = pa.Places(token)
# pg = pa.Places() for free plan

result = pg.density(
    unit_in='ft',
    unit_out='ft',
    coordinates=[43.1010339, -77.6342459],
    radius=100
)

Custom Density:

  • unit_input: required, str
    • options: [km, mi, m, ft, yd]
  • unit_output: required, str
    • options: [km, mi, m, ft, yd]
  • custom_option: optional, str
    • city
    • postcode
    • region/state
  • custom_utility: optional, int/str,
    • custom_utility specifies the input of custom_option
Example(4)
pg = pa.Places(token)
# pg = pa.Places() for free plan

result = pg.density(
    unit_in='ft',
    unit_out='ft',
    custom_option='postcode',
    custom_utility=10980
)
reverse()
  • coordinate: required, geographic location of POI
  • radius: optional, radius of error
    • Default error radius is 10 ft
  • reverse_param: optional, (bool indicating the reversal of the input coordinates)
Example(5)
pg = pa.Places(token)
# pg = pa.Places() for free plan

result = pg.reverse(
    coordinate=[43.1017283, -77.6338936],
    radius=10, 
    reverse_param=False
)
batch_reverse()
  • coordinates: required, geographic location(s) of POI
  • radius: optional, radius of error
    • Default error radius is 10 ft
  • reverse_param: optional, (bool indicating the reversal of the input coordinate)
Example(6)
pg = pa.Places(token)
# pg = pa.Places() for free plan

result = pg.batch_reverse(
    coordinates=[[43.1017283, -77.6338985],
    [43.0936914, -77.6349024],
    [43.0937299, -77.6350315],
    [43.0930091, -77.6354702],
    [43.09245, -77.6353749]],
    radius=10,
    reverse_param=False
)
forward()

Full Address Geocoding

  • full address: optional, user-defined1 address of the POI
  1. Places flex-formatting AI allows for multiple address formats
Example(7)
pg = pa.Places(token)
# pg = pa.Places() for free plan

result = pg.forward(
    full_address="94 Crittenden Way, Brighton, NY, 14623",
)

Parsed Address Geocoding

  • street: optional, street on which the POI is located
  • number: optional, number of the POI's street
  • postcode: optional, zip code or microregion of the POI
  • region: optional, state in the USA1 or region internationally
  • city: optional, city where the POI is located
  • unit: optional, unit if the POI is non-singular (ex. apartment)
  1. If the POI is within USA borders, the region must be the state's 2-letter abbreviation
Example (8.1) without unit
pg = pa.Places(token)
# pg = pa.Places() for free plan

result = pg.forward(
    street="Crittenden Way",
    number=94,
    postcode=14623,
    region="NY",
    city="Brighton",
)
Example (8.2) with unit
pg = pa.Places(token)
# pg = pa.Places() for free plan

result = pg.forward(
    street="Crittenden Way",
    number=88,
    postcode=14623,
    region="NY",
    city="Brighton",
    unit='Unit 2'
)
batch_forward()
  • addresses: optional, list of formatted addresses
  • address_file: optional, JSON or XML file of formatted addresses1
  1. Note: Check our documentation for formatting details
Example(9.1) array of addresses
pg = pa.Places(token)
# pg = pa.Places() for free plan

result = pg.batch_forward(addresses=["88 Crittenden Way, Brighton, NY, 14623, Unit 2",
                                     "140 Centre Drive, Brighton, NY, 14623",
                                     "94 Crittenden Way, Brighton, NY, 14623",
                                     "104 Crittenden Way, Brighton, NY, 14623, Unit 6"
                                     ])
Example(9.2) file of addresses
pg = pa.Places(token)
# pg = pa.Places() for free plan

result = pg.batch_forward(address_file=address_file.json)
pg = pa.Places(token)
# pg = pa.Places() for free plan

result = pg.batch_forward(address_file=address_file.xml)

→ Download the XML or JSON file as "address_file" to test the examples


INSTALLATION

Install the Places API on pip:

$ pip install places_geocoding

OR

Install the Places API on conda:

$ conda install -c Martin Mashalov places_geocoding

REQUIREMENTS


BUSINESS CONTACT

Our business email contact is: hello@places.place. Please feel free to reach out regarding any product feedback or support.

Release files for places-geocode 0.5.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for places-geocode 0.5.8
File Size Uploaded
places_geocode-0.5.8.tar.gz 7.6 kB Details

Release files / places_geocode-0.5.8.tar.gz

Download URL places_geocode-0.5.8.tar.gz
Size 7.6 kB
Tags Source
SHA-256 checksum
How to use checksums
acac5fed0f977c844781aaa4f9a8597b519461d3c0f940b559cf6df58c998e5d
BLAKE2b-256 checksum
How to use checksums
77fc323f92fed839cc6c0d6eda9e70a2a63fd4a4e8d427cdd7ca3148c6e1c1ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.0

Release history Release notifications | RSS feed

This release

0.5.8 This release

1 release file

0.5.7

1 release file

0.5.6

1 release file

0.5.5

1 release file

0.5.4

1 release file

0.5.3

1 release file

0.5.2

1 release file

0.5.1

1 release file

0.5.0

1 release file

0.4.9

1 release file

0.4.8

1 release file

0.4.7

1 release file

0.4.6

1 release file

0.4.5

1 release file

0.4.4

1 release file

0.4.3

1 release file

0.4.2

1 release file

0.4.1

1 release file

0.4.0

1 release file

0.3.9

1 release file

0.3.8

1 release file

0.3.7

1 release file

0.3.6

1 release file

0.3.5

1 release file

0.3.4

1 release file

0.3.3

1 release file

0.3.2

1 release file

0.3.1

1 release file

0.3.0

1 release file

0.2.8

1 release file

0.2.7

1 release file

0.2.6

2 release files

0.2.5

3 release files

0.2.4

2 release files

0.2.3

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.9

1 release file

0.1.8

1 release file

0.1.7

1 release file

0.1.6

1 release file

0.1.5

1 release file

0.1.4

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

0.0.9

1 release file

0.0.8

1 release file

0.0.7

1 release file

0.0.6

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page