As a developer, I often need realistic dummy data for testing, prototyping, or even populating demo applications. Instead of spending hours writing seeders or manually crafting JSON files, I created the Random Profile API—a powerful and flexible tool that generates random user profiles on demand. In this post, I’ll walk you through the API’s features and endpoints. Details about the package itself can be found here.
If you decide to use this API, please reach out to me and tell me its use case. I'd love to hear it.
Why Random Profile API?
When developing applications, especially ones that involve user data, it’s important to test with realistic and varied inputs. The Random Profile API solves this by providing you with:
- Dynamic Data Generation: Generate single or multiple profiles with just a simple GET request.
- Customizability: Filter profiles by gender and choose which fields you need.
- Ease of Integration: With a straightforward RESTful design, it’s simple to integrate with your frontend or backend.
Features
Here’s what you can expect from the Random Profile API:
- Profile Generation:
- Generate a single random profile:
GET https://profile.halukaksoy.dev/api/profile
- Generate multiple profiles:
GET https://profile.halukaksoy.dev/api/profiles/{count}
- Filter profiles by gender (male/female):
GET https://profile.halukaksoy.dev/api/profiles/{gender}/{count}
- Generate a single random profile:
- Custom Fields:
- Customize the response by specifying fields via the
fields
query parameter. - Example:
https://profile.halukaksoy.dev/api/profile?fields=name,surname,email
- Customize the response by specifying fields via the
- Rate Limiting:
- The API limits requests to 60 per minute per IP address to maintain stability and prevent abuse.
- If you exceed this limit, you’ll receive a 429 Too Many Requests response.
- API Endpoints in Detail
Profile Generation
- Single Profile:
GET https://profile.halukaksoy.dev/api/profile
Retrieve a single, randomly generated profile. - Multiple Profiles:
GET https://profile.halukaksoy.dev/api/profiles/{count}
Replace{count}
with the number of profiles you need. For example,/api/profiles/5
returns 5 profiles. - Profiles by Gender:
GET https://profile.halukaksoy.dev/api/profiles/{gender}/{count}
Replace{gender}
with eithermale
orfemale
and{count}
with the number of profiles. For instance,/api/profiles/female/3
returns 3 female profiles.
Customizing Your Response
The API lets you tailor the data you receive by including a comma-separated list of fields using the fields
query parameter:GET
https://profile.halukaksoy.dev/api/profile?fields=name,surname,email
This request will return only the name
, surname
, and email
fields in the JSON response.
Example Response
A typical response from the API might look like this:
{
"gender": "female",
"name": "Emel",
"surname": "Tuğluk",
"tckn": "50529731282",
"serialNumber": "B19QUIGNS",
"birthdate": "1974-07-12",
"age": 50,
"titles": {
"academic_title": null
},
"email": "[email protected]",
"phone": {
"number": "05404368854",
"device_operation_system": "Android",
"device": "OnePlus 10 Pro",
"imei": "478076218170846"
},
"loginCredentials": {
"username": "Serhan_184",
"email": "[email protected]",
"password": "|{8lwO}T[v=KO",
"salt": "26a1720701dd2387d44ba77ec5872e91",
"hash": "$2y$12$1tXCTWoAb.g4jNsIny9V2.bo/lfV6xnsEVEQDJAlEhjDpPUan5B.O",
"md5": "e0f952d22050935b75d4bac8d81e152e",
"sha1": "8b91926f8bc75bde76acb9c099008a7903178d8a",
"sha256": "$2y$12$1tXCTWoAb.g4jNsIny9V2.bo/lfV6xnsEVEQDJAlEhjDpPUan5B.O",
"created_at": "2025-01-02 09:38:43",
"updated_at": "2025-02-06 05:18:24"
},
"miscellaneous": {
"favorite_emojis": [
"🤣",
"😒"
],
"language_code": "uz",
"country_code": "TR",
"locale_data": "zh_HK",
"currency_code": "TRY"
},
"networkInfo": {
"ipv_4": "249.17.116.227",
"ipv_6": "3f39:23dc:cd64:8275:ea28:3cef:1f5e:243b",
"mac_address": "1C:30:B8:03:0C:E0"
},
"maritalInfo": {
"status": "married",
"marriage_date": "1995-03-30",
"marriedFor": 32,
"spouse": {
"gender": "male",
"name": "Görkem",
"surname": "Avan",
"tckn": "39190001542",
"serialNumber": "IF89VDE7C",
"birthdate": "2006-11-23",
"age": 70,
"email": "[email protected]",
"phone": {
"number": "05462291223",
"device_operation_system": "Android",
"device": "Samsung Galaxy A53",
"imei": "835716135716811"
}
}
},
"children": {
"count": 0,
"children": [
]
},
"address": {
"fullAddress": "Sandalcı Kavşağı Merkez No: 97 / Aksaray",
"city": "Aksaray",
"district": "Merkez",
"street": "Sandalcı Kavşağı",
"apartmentNumber": 97,
"postalCode": 47651,
"timeZone": {
"timeZone": "Europe/Istanbul",
"time": "14:19:56"
},
"coordinates": {
"latitute": "37.646023",
"longitute": "28.386904"
},
"openstreetmap_link": "https://www.openstreetmap.org/?mlat=37.646023&mlon=28.386904"
},
"bankAccount": {
"iban": "TR582580195862252129980748050",
"bic": "BGWXTA1V268",
"bank": "Yapı Kredi",
"currency": "TRY",
"balance": 50093.71,
"debt": 49817.12
},
"images": {
"avatar": "https://avatars.dicebear.com/api/personas/yiğit.jpg",
"profile_picture": "https://xsgames.co/randomusers/avatar.php?g=female",
"pixel_art": "https://xsgames.co/randomusers/avatar.php?g=pixel"
},
"job": {
"workingStatus": "working",
"company": "Çörekçi Poyrazoğlu A.Ş. Grup",
"position": "Öğretmen",
"startDate": "2008-05-21",
"endDate": null,
"experience": 16,
"salary": {
"monthly": 87326,
"annually": 1047912
}
}
}
This response includes a rich set of details, from personal information and contact data to job information and even network details. The comprehensive nature of the generated data makes it a great tool for testing a variety of applications.
Rate Limiting & Request Logging
To ensure fair usage and maintain performance, the Random Profile API enforces a rate limit of 60 requests per minute per IP address. If you hit the limit, the API will respond with a 429 status code, so be sure to incorporate error handling in your application.
Additionally, the API logs each request and maintains statistics.
Disclaimer
For improved security, analytics, and to ensure fair usage of the service, the Random Profile API logs certain request details, including your IP address and user agent. These logs are used solely for diagnostic purposes, rate limiting, and monitoring API performance. By using this API, you acknowledge and consent to this logging practice. If you have any concerns, please review our privacy policy or contact us for more information.
Random Profile API
A robust API built with Laravel that generates random user profiles with customizable fields and gender options.