Use this endpoint to suggest first names based on user input.
For last name suggestions, see Name API — Last name validation →
/FIRSTNAMESUGGEST/
Request
Both GET and POST are supported.
Code examples
First name suggestion
Send all parameters in the request body using
Content-Type: application/x-www-form-urlencoded.
The server address remains in the URL.
Code examples
First name suggestion
Parameters
| Parameter | Description | Mand / Opt |
|---|---|---|
| Licence | Licence code assigned to your account. | Mandatory |
| Firstname | Part of the first name already entered by the user. | Mandatory |
| Gender |
M, F, or I.
|
Optional |
| NBResponse |
Maximum number of suggestions to return. Default:
10.
|
Optional |
| Country | ISO 3-letter country code used to prioritize suggestions. | Optional |
| Format |
Desired output format. Default: 0.
|
Optional |
| Verifname |
Checks whether the first name exists without
autocomplete (pass Y).
|
Optional |
Format values
| Format | Description |
|---|---|
0
|
First name in uppercase without accents. |
1
|
First letter uppercase without accents. |
2
|
First name in lowercase without accents. |
3
|
First name in uppercase with accents. |
4
|
First letter uppercase with accents. |
5
|
First name in lowercase with accents. |
Response
The JSON response is a dictionary containing the
suggest key. Its value is an array of suggested
items. Each item is an array of two strings: the first value
is the gender of the first name (M, F,
or I), and the second value is the suggested
first name.
| Key | Possible values | Description | Type |
|---|---|---|---|
| suggest[X][0] |
F, M, I
|
Gender of the suggested first name — F:
feminine, M: masculine, I:
unknown.
|
STRING(1) |
| suggest[X][1] | — | Suggested first name. | STRING(255) |
Response example
{
"suggest": [
["F", "ALICE"],
["F", "ALICE-ANNE"],
["F", "ALICE-MARIE"]
]
}
Errors
| Error type | Request example | Response body |
|---|---|---|
Missing, empty, or incorrect Licence
parameter
|
https://{SERVER_ADDRESS}/FIRSTNAMESUGGEST/?Firstname=Ali&Gender=F&NBResponse=10
|
{}
|
Missing or empty Firstname parameter
|
https://{SERVER_ADDRESS}/FIRSTNAMESUGGEST/?Gender=F&NBResponse=10&Licence={LICENCE_CODE}
|
{"suggest": []}
|
| Parameter typo |
https://{SERVER_ADDRESS}/FIRSTNAMESUGGEST/?Firtname=Ali&Gender=F&NBResponse=10&Licence={LICENCE_CODE}
|
{"suggest": []}
|
Test the API
Click the button below to test this endpoint live in your browser.
Open console
See also
Related to