Sign up Login

Geo-Code a Telephone Number

API Method: geo_code_telephone

Mobile location unavailable

We are currently unable to offer a service to geo-code a mobile telephone number. You can however still use the service to geo-code a landline.


Returns approximate position of a UK telephone number. This service must be approved by the mobile operators; we will process the application on your behalf.

Mandatory Parameters

Name Description
api_key or javascript_key Use your API key if invoking server-side. If invoking from the browser via JavaScript, generate a JavaScript key using the javascript_key method.
telephone_number Enter a UK telephone number. Please note that mobile location is only available after your service has been approved by the mobile operators.

Optional Parameters

Name Description
client You can optionally include an identifier for your final client or user. This is logged in your usage log and you will be able to view your usage statistics by client.
output Set to json for a JSON response; the default response is XML. Not applicable to the SOAP API.
callback When using JSON, specify a JSONP wrapper in which the JSON response is to be wrapped.

Returned Values

The XML response is contained within a <geo_code_telephone_res> element.

Name Description
status Returns ok if the operation has succeeded, or error if an error has occurred; Returns the error_code for error details.
error_code Returns the error code when the status is error. See below for error codes.
t2a_version_number The current API version number.
credit_used The number of credits used in order to execute the request.
mode Returns normal or test when executed in the free test mode.
geo_data A geo_data record. Note that the postcode is a sample postcode in the vicinity of the telephone number's location.

Returned when a mobile number is in use.

T2A always returns the location of the handset as a circle centered on the co-ordinates, with a radius in metres specified by this value. Expect values of 300-500m in dense urban areas, degrading to 1000-5000m in rural areas.
name Place or point of interest near the number.
containing_name Town that the number is near or within.
containing_name2 County or district that the number is within.
date_time A date_time record showing the approximate date and time (GMT) that the location was computed.
postcode_area The first part of the postcode (e.g. DT4).

Error Codes

Name Description
method_not_authorised_for_mobile Your service has not yet been approved by our supplier (on behalf of the mobile phone companies). We are therefore unable to report the position of a mobile telephone.
customer_private The mobile phone has been set to not report its location to services such as ours.

See also the common error codes.

Free Test Mode

When operating in the free test mode errors are returned if mandatory parameters are missing, or it returns a dummy data response, in an identical format to a real response.

Note that the mode is returned as test when the method is operating in the free test mode.

Example XML Response

<?xml version="1.0"?>
    <postcode>YO10 5HS</postcode>

Looking for the old documentation? Download it here (PDF format)

API Method List

< Back to T2A API Documentation

  1. Search for a person (person_search)
  2. Find people at an address (address_person)
  3. Search the UK Electoral Roll (electoral_roll)
  4. Search the Full UK Electoral Roll (full_electoral_roll)
  5. Person Verify (person_verify)
  6. Age verification (age_verification)
  7. Search for a residential telephone number (telephone_residential)
  8. Search for a business (business_search)
  9. Search for an address/postcode (address_search)
  10. Validate a telephone number (validate_telephone)
  11. Validate a mobile telephone number (validate_mobile_phone_number)
  12. Validate a credit card number (validate_credit_card)
  13. Validate an email address (validate_email)
  14. Validate a VAT number (validate_vat)
  15. TPS/CTPS check a telephone number (tps_full)
  16. TPS/CTPS checking a CSV file containing telephone numbers (tps_bulk)
  17. Find UK dialling codes (area_code)
  18. Find international dialling codes (country_dial)
  19. Geo-Code a single address (address_geo_code)
  20. Geo-Code a location (geo_code)
  21. Reverse Geo-Code (reverse_geo_code)
  22. Find company details (company_details)
  23. Find director details (director_details)
  24. Get a company credit report (company_credit_report)
  25. Find a location from an IP address (ip_location)
  26. Send a text message (send_text_message)
  27. Check the bereavement register (deceased)
  28. Bulk check the bereavement register (deceased_bulk)
  29. Check company name availability (company_name_check)
  30. Download a company document (company_document_download)
  31. Generate a secure JavaScript key (javascript_key)
  32. Create an asynchronous job (job_create)
  33. Read the progress of an asynchronous job (job_progress)
  34. Telephone number appending (tele_append)
  35. View information about your account (client_info)