API reference
One GET request returns one or more fictional people as JSON. No key is needed. Version 3 keeps every v2 field and URL.
Quick start
curl "https://lifesim.io/api/v1/people?seed=12345"curl "https://lifesim.io/api/v1/people?num=100&format=csv" -o people.csvEndpoints
| Method and path | Returns |
|---|---|
GET /api/ | The original v2 endpoint, kept unchanged for existing clients. For repeatable seeds and batches, use /api/v1/people. |
GET /api/v1/people | People as JSON or CSV (format=csv). The parameters, seeds and errors below apply to this endpoint. |
GET /openapi.json | This reference as an OpenAPI 3.0.3 document. |
Parameters
| Name | Type | Default | Rule |
|---|---|---|---|
num | integer | 1 | 1 to 100 |
seed | integer | random | 0 to 2147483647 |
format | string | json | json or csv, /api/v1/people only |
Seeds
The same seed returns the same person. The birthday is fixed, so the age goes up as time passes.
With num above 1, the first person uses your seed and the rest use seeds derived from it. Every person carries its own seed, so you can fetch any one of them again alone.
A seed is repeatable against one reference dataset. The response names it in meta.dataset.
Errors
Errors return JSON with a code you can test and a message you can show.
{
"error": {
"code": "invalid_num",
"message": "num must be from 1 to 100. You sent 500."
}
}| Status | Code | When |
|---|---|---|
| 400 | invalid_num | num is not a whole number from 1 to 100 |
| 400 | invalid_seed | seed is not a whole number from 0 to 2147483647 |
| 400 | invalid_format | format is not json or csv, or csv was asked of /api/ |
| 422 | seed_unavailable | the generator cannot make a person from this seed; try another seed |
| 502 | upstream_failed | the generator behind the API did not answer |
| 503 | unavailable | reference data is not loaded |
Response
time is the generation time in seconds, people is the list, and meta names the engine and dataset. The example below leaves out married and timeline to keep it short.
{
"time": 0.004,
"people": [
{
"age": 71,
"birth_day": "1955-03-05",
"children": {
"children": false
},
"education": {
"education_highest": "Bachelor's degree"
},
"email": {
"status": true,
"address": "carmen.vazquez@gmail.com"
},
"employment": {
"status": "Employed",
"company": {
"size": "Large"
},
"schedule": {
"start": "7:00",
"end": "18:00",
"days": {
"text": "Monday-Friday",
"day_nums": [1, 2, 3, 4, 5]
}
},
"commute": {
"time": 36,
"type": "car",
"description": "Carmen has a rural 36 minute commute by car.",
"text": "by car"
}
},
"favorite_color": "Blue",
"housing": {
"owns": true,
"type": "House",
"status": "Homeowner"
},
"income": {
"num": 3.8,
"min": 150000,
"max": 200000,
"amount": 162322
},
"location": {
"id": "1600000US2577890",
"density": "rural",
"location": "West Springfield Town, Massachusetts",
"population": "28391",
"city": "West Springfield Town",
"state": "Massachusetts",
"state_abbrev": "MA",
"location_exact": {
"lat": 42.092957100999996,
"lng": -72.64807676
},
"races": {
"white": "24508",
"black": "939",
"asian": "4",
"american_indian": "1",
"hispanic": 3475
}
},
"name_first": "Carmen",
"name_last": "Vazquez",
"personality": {
"bigFive": {
"openness": 56,
"conscientiousness": 55,
"extraversion": 42,
"agreeableness": 50,
"neuroticism": 47
}
},
"pets": {
"has_pets": true,
"pets": ["Bird"]
},
"phone": {
"phone": true,
"smartphone": false,
"carrier": "AT&T"
},
"physical": {
"gender": "Male",
"height": {
"cm": 171,
"imperial": {
"ft": 5,
"in": 7
}
},
"weight": {
"kg": 64,
"lbs": 141,
"bmi": 22,
"bmiDescription": "Healthy Weight"
},
"hair_color": "Brown",
"eye_color": "Brown",
"sexuality": "Heterosexual",
"handedness": "Right Handed",
"vision": {
"color_vision": true
},
"lactose_tolerance": true,
"race": "Hispanic",
"pronouns": {
"personal": "he",
"possessive": "his",
"objective": "him"
},
"penis_size": {
"cm": 15,
"imperial": {
"ft": 0,
"in": 6
}
},
"piercing": {
"earlobe": false
},
"blood_type": "B+",
"allergies": ["Penicillin"],
"has_allergies": true
},
"religion": "Catholic",
"religiousity": 33,
"seed": 12345,
"smoking": {
"smoking": false
},
"social_media": {
"uses_social_media": true,
"platforms": ["Facebook", "YouTube", "Reddit"],
"platform_count": 3
},
"summary": "Carmen Vazquez is a 71 year old hispanic male. He lives in West Springfield Town, Massachusetts, a rural city of 28,000 people. Carmen works at a large company and commutes by car.",
"swim_ability": true,
"tendencies": {
"musicGenres": ["Pop", "Country"],
"podcastAffinity": 0,
"drinking": {
"drinking": true
}
},
"vehicles": {
"has_vehicle": true,
"count": 2,
"primary_transport": "Personal Vehicle"
},
"veteran": {
"is_veteran": true,
"branch": "Marines",
"service_period": "Vietnam Era"
},
"wallet": {
"credit_cards": [
{
"num": "3675394150182975",
"type": "American Express",
"prefix": 3,
"name": "Carmen Vazquez",
"date": "16/28",
"cvv": 500
},
{
"num": "5141044754060280",
"type": "Master Card",
"prefix": 5,
"name": "Carmen Vazquez",
"date": "04/29",
"cvv": 882
},
{
"num": "4692019975126231",
"type": "Visa",
"prefix": 4,
"name": "Carmen Vazquez",
"date": "24/31",
"cvv": 698
},
{
"num": "4034542091485279",
"type": "Visa",
"prefix": 4,
"name": "Carmen Vazquez",
"date": "07/27",
"cvv": 226
},
{
"num": "4165340580917907",
"type": "Visa",
"prefix": 4,
"name": "Carmen Vazquez",
"date": "30/29",
"cvv": 176
},
{
"num": "6092659878783314",
"type": "Discover",
"prefix": 6,
"name": "Carmen Vazquez",
"date": "20/27",
"cvv": 857
}
],
"cash": 24,
"misc": []
}
}
],
"meta": {
"jsonapi": {
"version": 3
},
"engine": "upstream",
"dataset": "upstream"
}
}Fields
Every field of a person, grouped as in the response. Nested fields use dotted paths.
Person
| Field | Type | Meaning |
|---|---|---|
| seed | integer | Seed for this person; pass it back to get the same person |
| name_first | string | First name |
| name_last | string | Last name |
| age | integer | Age in years on the generation date |
| birth_day | date | Date of birth, YYYY-MM-DD |
| religion | string | Religious affiliation |
| religiousity | integer | How religious, 0 to 100 (spelling kept from API v2) |
| favorite_color | string | Favorite color |
| swim_ability | boolean | Can swim |
| timeline | map of TimelineEvent | Life events keyed by name, for example birth or wedding |
| summary | string | One-paragraph description |
Physical
| Field | Type | Meaning |
|---|---|---|
| physical.gender | string | Sex as recorded on the census formOne of: Male, Female |
| physical.height.cm | integer | Height in centimeters |
| physical.height.imperial.ft | integer | Feet part of the height |
| physical.height.imperial.in | integer | Inches part of the height |
| physical.weight.kg | integer | Weight in kilograms |
| physical.weight.lbs | integer | Weight in pounds |
| physical.weight.bmi | integer | Body mass index, rounded |
| physical.weight.bmiDescription | string | CDC BMI categoryOne of: Underweight, Healthy Weight, Overweight, Obese |
| physical.hair_color | string | Hair color |
| physical.eye_color | string | Eye color |
| physical.race | string | Race or ethnicity, drawn from the place's population mix |
| physical.sexuality | string | Sexual orientation |
| physical.handedness | string | Dominant handOne of: Right Handed, Left Handed, Ambidextrous |
| physical.vision.color_vision | boolean | True when the person is not color blind |
| physical.lactose_tolerance | boolean | Can digest lactose |
| physical.blood_type | string | ABO and Rh blood type, weighted by raceOne of: O+, O-, A+, A-, B+, B-, AB+, AB- |
| physical.allergies | array of string | Food, environmental and drug allergies |
| physical.has_allergies | boolean | True when allergies is not empty |
| physical.pronouns.personal | string | Subject pronoun, for example she |
| physical.pronouns.possessive | string | Possessive pronoun, for example her |
| physical.pronouns.objective | string | Object pronoun, for example her |
| physical.piercing.earlobe | boolean | Has pierced earlobes |
Location
| Field | Type | Meaning |
|---|---|---|
| location.id | string | Census-style place id, 1600000US + state FIPS + place code |
| location.city | string | City or town |
| location.state | string | State name |
| location.state_abbrev | string | Two-letter state code |
| location.location | string | City and state as one string |
| location.population | string | Place population (a string, as in API v2) |
| location.density | string | Settlement typeOne of: urban, suburban, rural |
| location.location_exact.lat | number | Latitude of a point near the place |
| location.location_exact.lng | number | Longitude of a point near the place |
| location.races.white | string | Share of the place that is White, percent |
| location.races.black | string | Share that is Black, percent |
| location.races.asian | string | Share that is Asian, percent |
| location.races.american_indian | string | Share that is American Indian or Alaska Native, percent |
| location.races.hispanic | number | Share that is Hispanic or Latino, percent (a number, as in API v2) |
Income
| Field | Type | Meaning |
|---|---|---|
| income.amount | integer | Annual income in US dollars |
| income.min | integer | Lower bound of the income bracket |
| income.max | integer | Upper bound of the income bracket |
| income.num | number | Income percentile, 1 to 99 |
Education
| Field | Type | Meaning |
|---|---|---|
| education.education_highest | string | Highest level finishedOne of: No High School, Some High School, High School Graduate, Some College, Associate's degree, Bachelor's degree, Master's degree, Doctorate |
Employment
| Field | Type | Meaning |
|---|---|---|
| employment.status | string | Work statusOne of: Employed, Unemployed, Retired, Student |
| employment.company.size | string | Employer sizeOne of: Small, Medium, Large |
| employment.schedule.start | string | Shift start, 24-hour H:MM |
| employment.schedule.end | string | Shift end, 24-hour H:MM |
| employment.schedule.days.text | string | Working days as text, for example Monday-Friday |
| employment.schedule.days.day_nums | array of integer | Working days, 0 = Sunday |
| employment.commute.time | integer | One-way commute in minutes |
| employment.commute.type | string | Mode: car, bus, train, bike, walk or remote |
| employment.commute.description | string | One sentence about the commute |
| employment.commute.text | string | Mode as a phrase, for example by car |
Marriage
| Field | Type | Meaning |
|---|---|---|
| married.married | boolean | Currently married |
| married.wedding_day.date(optional) | date | Wedding date |
| married.wedding_day.date_formatted(optional) | string | Wedding date as text, for example July 4, 1995 |
| married.wedding_day.age(optional) | integer | Age at the wedding |
| married.spouse(optional) | any |
Housing
| Field | Type | Meaning |
|---|---|---|
| housing.owns | boolean | Owns their home |
| housing.type | string | Kind of homeOne of: House, Apartment, Condo, Townhouse, Mobile Home, Farmhouse |
| housing.status | string | TenureOne of: Homeowner, Renter |
Pets
| Field | Type | Meaning |
|---|---|---|
| pets.has_pets | boolean | Has at least one pet |
| pets.pets | array of string | Kinds of petsOne of: Dog, Cat, Fish, Bird, Small Animal, Reptile |
| pets.dog_count(optional) | integer | Number of dogs, when pets includes Dog |
| pets.cat_count(optional) | integer | Number of cats, when pets includes Cat |
Veteran
| Field | Type | Meaning |
|---|---|---|
| veteran.is_veteran | boolean | Served in the US military |
| veteran.branch(optional) | string | Branch, veterans onlyOne of: Army, Navy, Air Force, Marines, Coast Guard |
| veteran.service_period(optional) | string | Era of service, veterans onlyOne of: World War II, Korean War, Vietnam Era, Gulf War Era I, Gulf War Era II |
Vehicles
| Field | Type | Meaning |
|---|---|---|
| vehicles.has_vehicle | boolean | Household has a vehicle |
| vehicles.count | integer | Vehicles owned |
| vehicles.primary_transport | string | Main way of getting aroundOne of: Personal Vehicle, Public Transit |
Phone
| Field | Type | Meaning |
|---|---|---|
| phone.phone | boolean | Has a mobile phone |
| phone.number(optional) | string | Fictional number in the 555-01xx range |
| phone.smartphone.OS | string | Phone operating systemOne of: iOS, Android |
| phone.smartphone.Brand | string | Phone maker |
| phone.smartphone.model | string | Phone model |
| phone.carrier | string | Mobile carrier |
| Field | Type | Meaning |
|---|---|---|
| email.status | boolean | Has an email address |
| email.address | string | Address on a reserved example domain, never deliverable |
Personality
| Field | Type | Meaning |
|---|---|---|
| personality.bigFive.openness | integer | Openness to experience, 0 to 100 |
| personality.bigFive.conscientiousness | integer | Conscientiousness, 0 to 100 |
| personality.bigFive.extraversion | integer | Extraversion, 0 to 100 |
| personality.bigFive.agreeableness | integer | Agreeableness, 0 to 100 |
| personality.bigFive.neuroticism | integer | Neuroticism, 0 to 100 |
Tendencies
| Field | Type | Meaning |
|---|---|---|
| tendencies.musicGenres | array of string | Favorite music genres |
| tendencies.podcastAffinity | integer | How likely they are to listen to podcasts, 0 to 100 |
| tendencies.drinking.drinking | boolean | Drinks alcohol |
Limits and access
The API is free and needs no key. For API keys and higher rate limits, use the LifeSim listing on RapidAPI.
Try requests in the playground.