Geocoder.ca

User supplied material to help you with using geocoder.ca - send us a note if you wish to contribute to this page

Note: This code is supplied by various contributors and comes with no warranties on our part. There is probably much more client code in other programming languages on the web that you can find by doing a google search. If you find something you like and find useful in your favorite programming language, let us know.

Geocoder.ca Autocomplete class in javascript

Bash one liner for batch geocoding CSV/Text filesSeptember-3-2016: Of all the various clients interfacing with our geocoding API, the simplest one deserves some praise. Here is a bash one liner that takes as input a CSV file of locations, and outputs the file with the location information appended at the end of each line:
#!/bin/bash
while IFS='' read -r line || [[ -n "$line" ]]; do
    echo $line,`curl -X POST -d locate="$line" -d geoit="csv" https://geocoder.ca`;
done < "$1"
Save as geocode.sh then chmod a+x geocode.sh then run it as:
./geocode.sh input.csv>output.csv

Your input file might look something like:
input.csv

20 WYPER SQ , Toronto, ON M1S0B3
415 LAKEWAY, Ding Dong, TX 76549
Yonge and Dundas, Toronto
and the output

output.csv

20 WYPER SQ , Toronto, ON M1S0B3,200,1,43.790920,-79.245789
415 LAKEWAY, Ding Dong, TX 76549,200,0.8,30.976936,-97.817796
Yonge and Dundas, Toronto,200,0.9,43.655778,-79.380650
Four columns were appended to the input file. The status (200 success), the confidence score (a number between 0 and 1, with 1 being best match), the Latitude and the Longitude.

Begin forwarded message:

Date: November 5, 2010 10:19:31 PM GMT+01:00 To: [email protected] Subject: GeoCoder PHP library Hi there, Last October, I wrote a PHP library for the GeoCoder.ca website (actually, I took code from a forum [1] and tidied it up). I haven't implemented a couple of functions since the project I worked on didn't need it at the time. Maybe you might be interested in forking it from GitHub? [2] [1] https://groups.google.com/group/Google-Maps-API/browse_thread/thread/6012540c29625bf2/f684d8edaf90b9f6 (didn't load for me just now) [2] https://github.com/sillygwailo/GeoCoder -- Richard Eriksson justagwailo.com


Data Definiton File (Jan 18, 2006) | A php4 code example - (March 21, 2006) | CPAN geocoder client perl module | Java code for using geocoder.ca | Another php example | A php5 example | Python class which will process geocoder transactions | An ASP C# example | Node.js example


A Data definition file for geocoder.ca xml port output - received today on Jan 18, 2006.
Hello,

I wanted to drop you a line and thank you for the wonderful
service. I used it yesterday to run a test data sample and it
worked very smoothly.

Also, as a part of my test integration, I created a DTD file
and I thought it might be useful for other people too. I am
attaching it to this e-mail

-- Best regards, Anthony

File: GEOCODER_CA_RESPONSE.dtd



Hello!    I have created a php4 script that retrieves geodata
information from your site. Perhaps it would be a good idea to add
this to your php examples as right now you only have php5. The only
drawback with my script is you need DOMPHP installed (which should be
installed on almost all servers, so this shouldn't be a problem - use
phpinfo() to check!)

Cheers!

Patrick Hayes

Script is below!

Output format

https://geocoder.ca/?locate=

API access

For developers & applications

One HTTPS endpoint for forward, reverse, postal, geoparse and autocomplete. Returns XML, JSON, JSONP or CSV. Reading your first result in minutes.

✓ Forward, reverse & postal lookups
✓ Batch tools, polygons, census enrichment
✓ Pay-as-you-go or subscription

Create an API account Read the docs →

Data products

For teams who want the dataset

License the Canadian & U.S. address and postal database. Run it on your own servers with no per-call billing and no caching restrictions — the data is yours.

✓ Downloadable address & postal data
✓ Self-hosted, offline-capable
✓ Flat, predictable cost

Create a data account See pricing →

What it does

One endpoint, the full toolkit

Everything in the examples, grouped by what you'd actually reach for.

Forward

Address, postal/ZIP or intersection → coordinates.

Reverse

Latitude, longitude → nearest address & corner.

Postal / ZIP

Full 6-character Canadian postal & US ZIP+4 lookup.

Autocomplete

As-you-type suggestions. Demo →

Geoparse

Pull locations out of free text. Try it →

Batch & polygons

batchpostal, showaddrs, postal-in-polygon, getpolygon.

Places (POIs)

Nearest points of interest with reverse lookups.

Census data

Enrich results with StatsCan census attributes.

Run it your way

Hosted, on AWS, or fully in-house

The same geocoder, wherever your data needs to live.

☁️

Hosted API

Call geocoder.ca directly. Nothing to run, scales with you.
API docs →

🟧

AWS Marketplace

Launch your own Geocoder.ca server as an AMI in your AWS account.
Get the AMI →

🗄️

Local database

License the dataset and run it entirely on your own infrastructure.
Data products →

More from Geolytica

Need wider coverage?

Geocoder.ca covers North America. Its sister services go global.