« Back to the developer index
The Geo API v2
The Geo API provides a simple way to find the location of a phone number. Results are given with their estimated level of confidence based on factors such as record age, and number distribution within a geographic location.
If available, the exact address of the location is given. Otherwise, where available, the location is calculated based on the geographic centerpoint of known records within the phone prefix. For example 0262195555 becomes 02621955XX, then 0262195XXX, and finally 026219XXXX. All results attempt to provide a latitude and longitude of the centerpoint.
The request to our API is a standard HTTP GET request as follows:
http://api.reversecanada.com/geolookup-v2.php?format=FORMAT&key=APIKEY&q=PHONE
Parameters
format (required)
valid options are json, xml, phps. Due to the extended output of this API, text is not a supported format.
key (required)
32 characters long, provided when you join the developer program
q (required)
valid Canada phone number
Example Query Results
JSON
http://api.reversecanada.com/geolookup-v2.php?format=json&key=EXAMPLE&q=0262195555
result
{"exact":{"formatted":"College St, Canberra ACT 2617, Australia","lat":-35.2424748,"lng":149.0773466,"confidence":"0%"},"XX":{"mask":"02621955XX","confidence":"5%","lat":-35.242475,"lng":149.077347,"geo":{"street":"Tourist Drive 4","suburb":"Bruce","state":"ACT","country":"Australia","zip":"2617","formatted":"Tourist Drive 4, Bruce ACT 2617, Australia"}},"XXX":{"mask":"0262195XXX","confidence":"28%","lat":-35.226951,"lng":149.077744,"geo":{"suburb":"Lawson","state":"ACT","country":"Australia","zip":"2617","formatted":"Lawson ACT 2617, Australia"}},"XXXX":{"mask":"026219XXXX","confidence":"35%","lat":-35.183079,"lng":149.136214,"geo":{"suburb":"Gungahlin","state":"ACT","country":"Australia","zip":"2912","formatted":"Gungahlin ACT 2912, Australia"}},"phone":"(02) 6219 5555"}
XML
http://api.reversecanada.com/geolookup-v2.php?format=xml&key=EXAMPLE&q=0262195555
result
<?xml version="1.0" encoding="iso-8859-1"?><record><exact><formatted>College St, Canberra ACT 2617, Australia</formatted><lat>-35.2424748</lat><lng>149.0773466</lng><confidence>0%</confidence></exact><XX><mask>02621955XX</mask><confidence>5%</confidence><lat>-35.242475</lat><lng>149.077347</lng><geo><street>Tourist Drive 4</street><suburb>Bruce</suburb><state>ACT</state><country>Australia</country><zip>2617</zip><formatted>Tourist Drive 4, Bruce ACT 2617, Australia</formatted></geo></XX><XXX><mask>0262195XXX</mask><confidence>28%</confidence><lat>-35.226951</lat><lng>149.077744</lng><geo><suburb>Lawson</suburb><state>ACT</state><country>Australia</country><zip>2617</zip><formatted>Lawson ACT 2617, Australia</formatted></geo></XXX><XXXX><mask>026219XXXX</mask><confidence>35%</confidence><lat>-35.183079</lat><lng>149.136214</lng><geo><suburb>Gungahlin</suburb><state>ACT</state><country>Australia</country><zip>2912</zip><formatted>Gungahlin ACT 2912, Australia</formatted></geo></XXXX><phone>(02) 6219 5555</phone></record>
PHPS
http://api.reversecanada.com/geolookup-v2.php?format=phps&key=EXAMPLE&q=0262195555
result
a:5:{s:5:"exact";a:4:{s:9:"formatted";s:40:"College St, Canberra ACT 2617, Australia";s:3:"lat";d:-35.242474799999996548649505712091922760009765625;s:3:"lng";d:149.07734659999999848878360353410243988037109375;s:10:"confidence";s:2:"0%";}s:2:"XX";a:5:{s:4:"mask";s:10:"02621955XX";s:10:"confidence";s:2:"5%";s:3:"lat";d:-35.2424749999999988858689903281629085540771484375;s:3:"lng";d:149.077347000000003163222572766244411468505859375;s:3:"geo";a:6:{s:6:"street";s:15:"Tourist Drive 4";s:6:"suburb";s:5:"Bruce";s:5:"state";s:3:"ACT";s:7:"country";s:9:"Australia";s:3:"zip";s:4:"2617";s:9:"formatted";s:42:"Tourist Drive 4, Bruce ACT 2617, Australia";}}s:3:"XXX";a:5:{s:4:"mask";s:10:"0262195XXX";s:10:"confidence";s:3:"28%";s:3:"lat";d:-35.2269509999999996807673596777021884918212890625;s:3:"lng";d:149.07774399999999559440766461193561553955078125;s:3:"geo";a:5:{s:6:"suburb";s:6:"Lawson";s:5:"state";s:3:"ACT";s:7:"country";s:9:"Australia";s:3:"zip";s:4:"2617";s:9:"formatted";s:26:"Lawson ACT 2617, Australia";}}s:4:"XXXX";a:5:{s:4:"mask";s:10:"026219XXXX";s:10:"confidence";s:3:"35%";s:3:"lat";d:-35.18307899999999932560967863537371158599853515625;s:3:"lng";d:149.1362139999999953943188302218914031982421875;s:3:"geo";a:5:{s:6:"suburb";s:9:"Gungahlin";s:5:"state";s:3:"ACT";s:7:"country";s:9:"Australia";s:3:"zip";s:4:"2912";s:9:"formatted";s:29:"Gungahlin ACT 2912, Australia";}}s:5:"phone";s:14:"(02) 6219 5555";}
API Support
Please contact support@reversecanada.com if you are having trouble implementing our API