- Joined
- Nov 24, 2022
- Messages
- 87
- Reaction score
- 7
API: Personal Data API
The Personal Data API is a lightweight and userfriendly tool that enables users to retrieve personal data such as male and female first and last names. The API supports filtering data based on prefixes, making it easy to search for specific fragments of names. This tool is ideal for use in applications generating random data or systems supporting data management.
Features
1. Retrieving Lists of Names in Poland
Users can fetch complete lists of male and female first and last names.
Example:
2. Filtering Results
Users can search for names or surnames starting with a specific prefix.
Example:
3. Returning Data in JSON Format
All responses are returned in a machinereadable JSON format, enabling seamless integration with applications.
4. Multilingual Support (Planned)
The API aims to support multiple languages via the
Endpoints
1. Retrieve Male First Names
Endpoint:
Parameters:
Example Requests:
Fetch all names:
Fetch names starting with "Ad":
Example Response:
2. Retrieve Male Last Names
Endpoint:
Parameters:
Example Requests:
Fetch all surnames:
Fetch surnames starting with "Ko":
Example Response:
3. Retrieve Female First Names
Endpoint:
Parameters:
Example Requests:
Fetch all names:
Fetch names starting with "Ma":
Example Response:
4. Retrieve Female Last Names
Endpoint:
Parameters:
Example Requests:
Fetch all surnames:
Fetch surnames starting with "Now":
Example Response:
Error Handling
The API provides clear error messages in the following situations:
1. Missing
2. Invalid parameter:
Example Usage
1. Fetch the full list of male first names:
2. Search for female names starting with "An":
3. Fetch male surnames without filtering:
Personal Data API is a fast and efficient tool for retrieving personal data in an organized JSON format. Its flexible filtering options make it easy to tailor results to your specific needs.
The Personal Data API is a lightweight and userfriendly tool that enables users to retrieve personal data such as male and female first and last names. The API supports filtering data based on prefixes, making it easy to search for specific fragments of names. This tool is ideal for use in applications generating random data or systems supporting data management.
Features
1. Retrieving Lists of Names in Poland
Users can fetch complete lists of male and female first and last names.
Example:
male_names
.2. Filtering Results
Users can search for names or surnames starting with a specific prefix.
Example:
male_names=Ad
(returns male names starting with "Ad").3. Returning Data in JSON Format
All responses are returned in a machinereadable JSON format, enabling seamless integration with applications.
4. Multilingual Support (Planned)
The API aims to support multiple languages via the
lang
parameter in the future.Endpoints
1. Retrieve Male First Names
Endpoint:
https://infinityhost.ct8.pl/personal_data.php
Parameters:
lang
: Required. Language code (e.g., pl
).male_names
: Optional. Name fragment or an empty string.Example Requests:
Fetch all names:
GET https://infinityhost.ct8.pl/personal_data.php?lang=pl&male_names
Fetch names starting with "Ad":
GET https://infinityhost.ct8.pl/personal_data.php?lang=pl&male_names=Ad
Example Response:
JSON:
{
"male_names": {
"size": 2,
"names": ["Adam", "Adrian"]
}
}
2. Retrieve Male Last Names
Endpoint:
https://infinityhost.ct8.pl/personal_data.php
Parameters:
lang
: Required. Language code (e.g., pl
) currently supports only Polish.male_surnames
: Optional. Surname fragment or an empty string.Example Requests:
Fetch all surnames:
GET https://infinityhost.ct8.pl/personal_data.php?lang=pl&male_surnames
Fetch surnames starting with "Ko":
GET https://infinityhost.ct8.pl/personal_data.php?lang=pl&male_surnames=Ko
Example Response:
JSON:
{
"male_surnames": {
"size": 3,
"names": ["Kowalski", "Konieczny", "Kostrzewa"]
}
}
3. Retrieve Female First Names
Endpoint:
https://infinityhost.ct8.pl/personal_data.php
Parameters:
lang
: Required. Language code (e.g., pl
).female_names
: Optional. Name fragment or an empty string.Example Requests:
Fetch all names:
GET https://infinityhost.ct8.pl/personal_data.php?lang=pl&female_names
Fetch names starting with "Ma":
GET https://infinityhost.ct8.pl/personal_data.php?lang=pl&female_names=Ma
Example Response:
JSON:
{
"female_names": {
"size": 1,
"names": ["Maria"]
}
}
4. Retrieve Female Last Names
Endpoint:
https://infinityhost.ct8.pl/personal_data.php
Parameters:
lang
: Required. Language code (e.g., pl
).female_surnames
: Optional. Surname fragment or an empty string.Example Requests:
Fetch all surnames:
GET https://infinityhost.ct8.pl/personal_data.php?lang=pl&female_surnames
Fetch surnames starting with "Now":
GET https://infinityhost.ct8.pl/personal_data.php?lang=pl&female_surnames=Now
Example Response:
JSON:
{
"female_surnames": {
"size": 1,
"names": ["Nowak"]
}
}
Error Handling
The API provides clear error messages in the following situations:
1. Missing
lang
parameter:
Code:
json
{
"error": "Invalid or missing parameter. Use ie. ?lang=pl"
}
2. Invalid parameter:
Code:
json
{
"error": "Invalid or missing parameter. Use ?male_names= or ?female_names= to get the data."
}
Example Usage
1. Fetch the full list of male first names:
GET https://infinityhost.ct8.pl/personal_data.php?lang=pl&male_names
2. Search for female names starting with "An":
GET https://infinityhost.ct8.pl/personal_data.php?lang=pl&female_names=An
3. Fetch male surnames without filtering:
GET https://infinityhost.ct8.pl/personal_data.php?lang=pl&male_surnames
Personal Data API is a fast and efficient tool for retrieving personal data in an organized JSON format. Its flexible filtering options make it easy to tailor results to your specific needs.