Sample from Agents in a Country (JSON)

Select a quantity of agents from the given country at random, and return the results as a JSON file.

GET /batch/(int: quantity)/country/(string: country_code)/sample.json
Query Parameters:
  • quantity – an integer > 0 and ≤ 500
  • country_code – an ISO 3166 country code
Request Headers:
Status Codes:
  • 200 OK – no error
  • 404 Not Found – either that quantity is bad, the country code is bad, or both

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.

Example request:

GET /batch/2/country/ca/sample.json HTTP/1.1

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"