MapLarge Geocoder API Reference v1.2

Key Terms:

  1. API Key:  your unique api key.  To request an api key please contact us at info@maplarge.com
  2. Address The location information provided to a geocoder is often informally referred to as an “address”. The following are the formal components of an address in the API
  1. Not Case Sensitive:  Inputs are not case sensitive
  2. Region indicators:  Only 1 of the following is required, but providing more inputs will yield higher match quality.  If no address is supplied then the geocoder will snap to the center point of the most precise region component supplied
  1. State:  Either full name or two letter code Ex (Georgia or GA),
  2. City:  The name of the city the address is located in for example “Atlanta”
  3. Zip: The 5 digit zip code the address is located in, for example 30309.  Nine digit “zip + 4” codes are also accepted for example “30309-1234” but only the first 5 digits are used for geocoding.
  1. Address:  The street name and number. For example: “123 North Main Street”.  All standard abbreviations are also supported like for example “123 N Main St.”
  1. Regions Covered:  The Geocoder API currently only covers addresses located in the United States (50 states + District of Columbia).  However, international support is available on a custom support basis. Please contact info@maplarge.com

Geocoding Methods

Manual: You can manually use our geocoder here

http://alphaapi.maplarge.com/geocoder 

On the results page in the "Invoice Code" box at the bottom enter this code, and you can get the full results without going through the credit card checkout.

Invoice Code:

YOUR-API-KEY

Simple Restful JSON API:  

We also have a simple URL based geocode method to our api with a JSON response format that is useful for individual geocodes based on user input from a webpage. In the examples below if you click on the url it should "just work" with no programming required.  

JSON without Callback  (useful for server to server calls)

http://alphaapi.maplarge.com/geocoder/json?address=149%20Robin%20Hood%20Rd&city=Atlanta&state=GA&zip=30309&key=YOUR-API-KEY

Example Response:

{    

"lat":33.7977,

"lng":-84.3829875,

"success":true,

"streetMatch":"KnownAlternateName",

"numMatch":"Exact",

"streetName":"robin hood rd"

}

JSON with Callback (useful for in webpage calls)

http://alphaapi.maplarge.com/geocoder/json?address=149%20Robin%20Hood%20Rd&city=Atlanta&state=GA&zip=30309&key=YOUR-API-KEY&callback=abc123

Example Response:

abc123({"lat":33.7977,"lng":-84.3829875,"success":true,"streetMatch":"KnownAlternateName","numMatch":"Exact","streetName":"robin hood rd"});

Bulk Geocoding API:

We also have a bulk geocoding api. The examples below show it's programmatic use.  The inputs are identical to the manual geocoding api.  Basically, you just post a file up, and the response it the geocoded records in csv format. The api expects a post with 1 mandatory parameter, 'key' and the post body contains the csv data

The response is csv text.  

I created a test account key for you:

YOUR-API-KEY

Bulk Geocoding Example Code Snippets

Single File: Post a CSV File and get CSV File response

string url = "http://alphaapi.maplarge.com/Geocoder/PostCSV?key=YOUR-API-KEY";

string filePath = @"C:\Maplarge\Geocode.csv";

WebClient wc = new WebClient();

byte[] responseArray = wc.UploadFile(url, filePath);

System.IO.File.WriteAllBytes(@"c:\Maplarge\result.csv", responseArray);

Multiple Files: Post One of more CSV files as a zip package, and get a zip package back

The optional parameter 'zipped=true' indicates that your upload format is a zipped package.

We support uploading a zipped dataset of one or more csv files, they will be returned as a zipped package

//Zipped package one ore more files

 url = "http://alphaapi.maplarge.com/Geocoder/PostCSV?key=YOUR-API-KEY&zipped=true";

 filePath = @"C:\Maplarge\Geocode.zip";

 responseArray = wc.UploadFile(url, filePath);

 System.IO.File.WriteAllBytes(@"c:\Maplarge\result.csv.zip", responseArray);