Select a quantity of agents from the given country at random, and return the results as a JSON file.
Query Parameters: | |
---|---|
|
|
Request Headers: | |
|
|
Status Codes: |
|
Try it:
In this example, sample a quantity of 2 agents from Canada. The ISO 3166 country code for Canada is “ca” so that is added to the URL.
http://pplapi.com/batch/2/country/ca/sample.json
Example request:
GET /batch/2/country/ca/sample.json HTTP/1.1
Host: pplapi.com
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 673
[
{
"age": 53,
"country_name": "Canada",
"country_tld": "ca",
"date_of_birth": "1962-04-21",
"id": 6355564308,
"id_str": "yVe-Rq1",
"income": 47966,
"internet": true,
"language": "other",
"religion": "Catholic",
"sex": "Male"
},
{
"age": 0,
"country_name": "Canada",
"country_tld": "ca",
"date_of_birth": "2015-09-09",
"id": 6384186621,
"id_str": "2l2-GUe",
"income": 67623,
"internet": true,
"language": "English",
"religion": "Catholic",
"sex": "Female"
}
]