SearchPeopleAPI Documentation
SearchPeopleAPI provides endpoints to search for individuals and their address history based on various parameters. Each endpoint requires an API key for authentication.
1. Search Users
Endpoint: /api/search
Method: GET
Description: Fetches user details based on a combination of parameters.
Headers
Name | Required | Description |
---|---|---|
api-key | Yes | The API key for authentication |
Query Parameters
Name | Required | Description |
---|---|---|
firstname | No | First name of the user |
lastname | No | Last name of the user |
street | No | Street address |
state | No | State abbreviation |
city | No | City name |
zipcode | No | Zip code |
dob | No | Date of birth (format: YYYYMMDD) |
phone | No | Phone number |
id | No | User ID |
limit | Yes | Number of results to fetch |
Responses
- 200 OK: Returns a JSON array of user objects
- 400 Bad Request: Missing required parameters
- 403 Forbidden: Invalid API key
- 404 Not Found: No users found
Example Request
GET /api/search?firstname=John&lastname=Doe&city=New York&limit=10 Host: searchpeopleapi.com Headers: api-key: valid
Example Response
[ { "ID": "123", "firstname": "John", "lastname": "Doe", "middlename": "A", "dob": "1985-06-15", "address": "123 Main St", "city": "New York", "county_name": "Kings", "st": "NY", "zip": "10001", "phone1": "123-456-7890", "aka1fullname": "Johnny Doe" } ]
2. Search Address History
Endpoint: /api/searchAddresses
Method: GET
Description: Fetches address history of a user based on their ID, first name, and last name.
Headers
Name | Required | Description |
---|---|---|
api-key | Yes | The API key for authentication |
Query Parameters
Name | Required | Description |
---|---|---|
firstname | No | First name of the user |
lastname | No | Last name of the user |
id | Yes | User ID |
Responses
- 200 OK: Returns a JSON array of address history objects
- 400 Bad Request: Missing required parameters
- 403 Forbidden: Invalid API key
- 404 Not Found: No address history found
Example Request
GET /api/searchAddresses?id=123&firstname=John&lastname=Doe Host: searchpeopleapi.com Headers: api-key: valid
Example Response
[ { "ID": "123", "firstname": "John", "lastname": "Doe", "middlename": "A", "dob": "1985-06-15", "address": "123 Main St", "city": "New York", "county_name": "Kings", "st": "NY", "zip": "10001", "phone1": "123-456-7890", "aka1fullname": "Johnny Doe" }, { "ID": "123", "firstname": "John", "lastname": "Doe", "middlename": "A", "dob": "1985-06-15", "address": "456 Elm St", "city": "Brooklyn", "county_name": "Kings", "st": "NY", "zip": "11201", "phone1": "123-456-7890", "aka1fullname": "Johnny Doe" } ]
Common Error Responses
403 Forbidden
{ "error": "INVALID API-KEY" }
400 Bad Request
{ "error": "ID are required" }
404 Not Found
{ "error": "No users found" }
Usage Notes
- API Key Validation: Ensure the correct API key is passed in the api-key header.
- Query Parameters: Use limit to restrict the number of results for /api/search. Without this parameter, the request will fail.
- ID Matching: /api/searchAddresses relies on matching ID based on ID, first name, and last name. Ensure accurate data is passed.