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": "Malaki Macdonald",
        "email": "malaki.macdonald@gmail.com",
        "position": "Office Assistant",
        "photo": "https:\/\/i.imgur.com\/ZI45jIW.jpg"
    },
    {
        "name": "Sally Hawkins",
        "email": "sally.hawkins@gmail.com",
        "position": "Business Analyst",
        "photo": "https:\/\/images-na.ssl-images-amazon.com\/images\/M\/MV5BODE4MDE0MDEzMl5BMl5BanBnXkFtZTgwNjI1NTU5MDE@._V1_UY256_CR12,0,172,256_AL_.jpg"
    },
    {
        "name": "Judy Sewell",
        "email": "judy.sewell@gmail.com",
        "position": "Sales",
        "photo": "https:\/\/i.imgur.com\/Nf4Qwa7.jpg"
    },
    {
        "name": "Renata Holbrook",
        "email": "renata.holbrook@gmail.com",
        "position": "Manager",
        "photo": "https:\/\/i.imgur.com\/ztMTpBt.jpg"
    },
    {
        "name": "Morgan Fairchild",
        "email": "morgan.fairchild@gmail.com",
        "position": "Medical Assistant",
        "photo": "https:\/\/images-na.ssl-images-amazon.com\/images\/M\/MV5BMTM1ODQyOTU1MV5BMl5BanBnXkFtZTcwMDY5MjE3MQ@@._V1_UY256_CR5,0,172,256_AL_.jpg"
    }
]