Random Agent from a Country (JSON)

Retrieve one agent at random from the given country.

GET /country/(string: country_code)/random.json
Query Parameters:
 
  • country_code – an ISO 3166 country code
Request Headers:
 
Status Codes:

Try it:

In this example, select one agent at random from Canada. The ISO 3166 country code for Canada is “ca” so that is added to the URL.

http://pplapi.com/country/ca/random.json

Example request:

GET /country/ca/random.json HTTP/1.1
Host: pplapi.com

Example response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: 278

{
    "age": 88,
    "country_name": "Canada",
    "country_tld": "ca",
    "date_of_birth": "1927-03-01",
    "id": 6371992226,
    "id_str": "DUa-qh6",
    "income": 30878,
    "internet": true,
    "language": "English",
    "religion": "none",
    "sex": "Male"
}