Search for a Person
API Method: person_search
Description
Searches the edited electoral register, phone book, companies house and consumer data for a UK resident.
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. |
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. |
records_per_page | Specify the number of records to return on the current page. We offer page caching for this method - once your search is invoked, we store the pages on our server for 60 minutes; a subsequent request for a page of results from that search is displayed from the cache, at no charge to you. See result page caching. |
page_num | Zero based integer - current page number to return. |
name |
The person's name, for example:- Mr John D Fawcett Do not specify this if you wish to do an address-only search. T2A will parse the name into the relevant components. |
name2 |
The name of a 2nd resident The person_search method allows you to search for records where T2A will parse the name into the relevant components. |
forename |
The person's forename, for example:- To make the person_search more flexible we allow you to input the components of a name (forename, middleinitial and lastname) separately. Do not use these distinct parameters if you have specfied a |
middleinitial |
The person's middle initial, this will filter out any records which do not have this middle initial. Please note some data sources may not record the person's middle initial. To make the person_search more flexible we allow you to input the components of a name (forename, middleinitial and lastname) separately. Do not use these distinct parameters if you have specfied a |
lastname |
The person's lastname, for example:- To make the person_search more flexible we allow you to input the components of a name (forename, middleinitial and lastname) separately. Do not use these distinct parameters if you have specfied a |
forename2 |
The forename of a second resident, the person_search method allows you to search for records where two names are found at the same address. |
middleinitial2 |
The middleinitial of a second resident, the person_search method allows you to search for records where two names are found at the same address. |
lastname2 |
The lastname of a second resident, the person_search method allows you to search for records where two names are found at the same address. |
place | Enter a UK place, postcode, or postcode area. Do not specify this to do a national UK search. |
street | The street name. |
premises | The house number or name. |
sex |
Set to m or f to specify the gender to be returned, where that gender is known. This parameter is only applicable to electoral roll data; any results from other data sources are not filtered by this parameter. |
use_er | Set to false to NOT search the electoral register. Defaults to true. |
use_osis | Set to false to NOT search the phone book. Defaults to true. |
use_director | Set to false to NOT search for directors using Companies House. Defaults to true. |
fuzzy | Defaults to true. Set to false to disable fuzzy matching. |
Returned Values
The XML response is contained within a <person_search_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. |
person_list |
An array of person records. Only one of the lists is present :-
|
place_list | An array of place records. This is present if the place
name is ambiguous. No charge is made when a place_list is retuned. |
street_list | An array of street records. This is present if the
street name is ambiguous. No charge is made when a
street_list is returned. |
premises_list |
This is seen if the premises parameter is ambiguous or not specified; it is a free list of addresses at which there is data about the resident(s), and can be used to allow the end user to select the household to be viewed. Use the name value from the selected premises to replace the premises input parameter value when re-invoking this method. No charge is made when a |
total_records |
The total number of records, irrespective of the number displayed on any page. This is only used when a |
page_number |
Current page being displayed, a zero-based integer. This is only used when a |
er_searched | Set to true if the electoral roll data was searched. |
telephone_data_searched |
Set to true if the telephone data was searched. Note that licensing restrictions prevent telephone data being searched if:-
|
Error Codes
See the common error codes. There are no errors which are specific to this method.
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.
The free test mode for this method operates in the following manner:-
- If the
place
parameter is set to leeds, aplace_list
is returned. - If the
surname
andplace
are both empty, a dummystreet_list
is returned. - If the
surname
is set (to anything) a dummyperson_list
is returned.
Example XML Response
<?xml version="1.0"?> <people_search_res> <mode>test</mode> <t2a_version_number>3.2.9.4b</t2a_version_number> <status>ok</status> <credit_used>0</credit_used> <person_list> <person> <line_1>17</line_1> <line_2>Imagination Gardens</line_2> <line_3>Virtual Road</line_3> <place>Heslington</place> <town>York</town> <postcode>YO91 3X0</postcode> <addr_single_line>17 Imagination Gardens, Virtual Road, Heslington, York, YO91 3X0</addr_single_line> <title>Mr</title> <forename>Alan</forename> <surname>Fiction</surname> <name_single_line>Mr Alan Fiction</name_single_line> <telephone_number>(01904) 000000</telephone_number> <years_list> <string>2009</string> <string>2010</string> <string>2011</string> </years_list> <mobile></mobile> <dob>1974-12-01</dob> <email_address>alan.fiction@gmail.com</email_address> </person> <person> <line_1>17</line_1> <line_2>Imagination Gardens</line_2> <line_3>Virtual Road</line_3> <place>Heslington</place> <town>York</town> <postcode>YO91 3X0</postcode> <addr_single_line>17 Imagination Gardens, Virtual Road, Heslington, York, YO91 3X0</addr_single_line> <title>Mrs</title> <forename>Anne</forename> <middle_initial>J</middle_initial> <name_single_line>Mrs Anne J</name_single_line> <telephone_number>(01904) 000000</telephone_number> <years_list> <string>2009</string> <string>2010</string> <string>2011</string> </years_list> <mobile></mobile> <dob>1980-06-08</dob> <email_address>anne.j@gmail.com</email_address> </person> </person_list> <er_searched>true</er_searched> <telephone_data_searched>true</telephone_data_searched> </people_search_res>
Looking for the old documentation? Download it here (PDF format)
API Method List
< Back to T2A API Documentation
- Search for a person (
person_search
) - Find people at an address (
address_person
) - Search the UK Electoral Roll (
electoral_roll
) - Search the Full UK Electoral Roll (
full_electoral_roll
) - Person Verify (
person_verify
) - Age verification (
age_verification
) - Search for a residential telephone number (
telephone_residential
) - Search for a business (
business_search
) - Search for an address/postcode (
address_search
) - Validate a telephone number (
validate_telephone
) - Validate a mobile telephone number (
validate_mobile_phone_number
) - Validate a credit card number (
validate_credit_card
) - Validate an email address (
validate_email
) - Validate a VAT number (
validate_vat
) - TPS/CTPS check a telephone number (
tps_full
) - TPS/CTPS checking a CSV file containing telephone numbers (
tps_bulk
) - Find UK dialling codes (
area_code
) - Find international dialling codes (
country_dial
) - Geo-Code a single address (
address_geo_code
) - Geo-Code a location (
geo_code
) - Reverse Geo-Code (
reverse_geo_code
) - Find company details (
company_details
) - Find director details (
director_details
) - Get a company credit report (
company_credit_report
) - Find a location from an IP address (
ip_location
) - Send a text message (
send_text_message
) - Check the bereavement register (
deceased
) - Bulk check the bereavement register (
deceased_bulk
) - Check company name availability (
company_name_check
) - Download a company document (
company_document_download
) - Generate a secure JavaScript key (
javascript_key
) - Create an asynchronous job (
job_create
) - Read the progress of an asynchronous job (
job_progress
) - Telephone number appending (
tele_append
) - View information about your account (
client_info
)