API


Before using the API make sure you get the UI Faces key which is required.


🔑 Get UI Faces key




Parameter Usage Example Description
X-API-KEY 'X-API-KEY: [YOUR-UIFACES-KEY]' Add your API key via the HTTP headers

Parameter Usage Example Description
limit ?limit=10 Number of avatars (30 max per call, default is 10)
gender[] ?gender[]=male Filter by gender: male or female
from_age ?from_age=18 Set minimum age
to_age ?to_age=40 Set maximum age
hairColor[] ?hairColor[]=blond Filter by hair color
emotion[] ?emotion[]=happiness Filter by emotion
provider[] ?provider[] Premium Get avatars by provider ID
popular ?popular Premium Order avatars by popularity
offset ?offset=10 Premium Skip number of avatars from the result
license ?license=CC0 Premium Coming soon
random ?random Deprecated (results are random by default)

fetch('https://uifaces.co/api', {
	method: 'GET',
	headers: {
	  'X-API-KEY': [YOUR-UIFACES-KEY],
	  'Accept': 'application/json',
	  'Cache-Control': 'no-cache'
	}
})

curl 
	--header Cache-Control: no-cache 
	--header Accept: application/json 
	--header X-API-KEY: [YOUR-UIFACES-KEY] 
	https://uifaces.co/api

{ "error" : "Maximum allowed number of results exceeded." }


Try it Here


[
    {
        "name": "Karen Gillan",
        "email": "karen.gillan@gmail.com",
        "position": "Delivery Driver",
        "photo": "https:\/\/m.media-amazon.com\/images\/M\/MV5BMTQwMDQ0NDk1OV5BMl5BanBnXkFtZTcwNDcxOTExNg@@._V1_UY256_CR2,0,172,256_AL_.jpg"
    },
    {
        "name": "Sarah Wright",
        "email": "sarah.wright@gmail.com",
        "position": "Senior Developer",
        "photo": "https:\/\/images-na.ssl-images-amazon.com\/images\/M\/MV5BOTgzODAyODA1Ml5BMl5BanBnXkFtZTcwNTIxMDk5MQ@@._V1_UX172_CR0,0,172,256_AL_.jpg"
    },
    {
        "name": "Armie Hammer",
        "email": "armie.hammer@gmail.com",
        "position": "Sales",
        "photo": "https:\/\/images-na.ssl-images-amazon.com\/images\/M\/MV5BMzI3NTYwMzIxM15BMl5BanBnXkFtZTcwMzI1ODY1NA@@._V1_UX172_CR0,0,172,256_AL_.jpg"
    },
    {
        "name": "Tom Bekkers",
        "email": "tom.bekkers@gmail.com",
        "position": "Human Resources",
        "photo": "https:\/\/uifaces.co\/our-content\/donated\/cZSdIsrF.png"
    },
    {
        "name": "Nitzan",
        "email": "nitzan@gmail.com",
        "position": "Human Resources",
        "photo": "https:\/\/uifaces.co\/our-content\/donated\/IASPQqhS.jpg"
    }
]