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": "Thomas",
        "email": "thomas@gmail.com",
        "position": "Human Resources",
        "photo": "https:\/\/uifaces.co\/our-content\/donated\/DxZ-rULb.jpg"
    },
    {
        "name": "Carsten Griffith",
        "email": "carsten.griffith@gmail.com",
        "position": "Manager",
        "photo": "https:\/\/images.generated.photos\/nLDaKuZTAyRzaZR0bjIp1Fxa0B8YpJxyIVOMp2fHINs\/rs:fit:512:512\/Z3M6Ly9nZW5lcmF0\/ZWQtcGhvdG9zLzA1\/MTEzNzkuanBn.jpg"
    },
    {
        "name": "Alisa Hester",
        "email": "alisa.hester@gmail.com",
        "position": "Part Time",
        "photo": "https:\/\/i.imgur.com\/XVMNba2.jpg"
    },
    {
        "name": "Jennifer Sharmila",
        "email": "jennifer.sharmila@gmail.com",
        "position": "Lead Developer",
        "photo": "https:\/\/uifaces.co\/our-content\/donated\/DR-4XH3z.jpeg"
    },
    {
        "name": "Jaslynn Land",
        "email": "jaslynn.land@gmail.com",
        "position": "Accounting",
        "photo": "https:\/\/images.unsplash.com\/photo-1526080652727-5b77f74eacd2?ixlib=rb-1.2.1&q=80&fm=jpg&crop=faces&fit=crop&h=200&w=200&ixid=eyJhcHBfaWQiOjE3Nzg0fQ"
    }
]