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": "Artem Tymchuk",
        "email": "artem.tymchuk@gmail.com",
        "position": "Marketing",
        "photo": "https:\/\/uifaces.co\/our-content\/donated\/KBoDdl1J.png"
    },
    {
        "name": "Lana Steiner",
        "email": "lana.steiner@gmail.com",
        "position": "Product Designer",
        "photo": "https:\/\/images.unsplash.com\/photo-1520810627419-35e362c5dc07?ixlib=rb-1.2.1&q=80&fm=jpg&crop=faces&fit=crop&h=200&w=200&ixid=eyJhcHBfaWQiOjE3Nzg0fQ"
    },
    {
        "name": "\u00d0\u203a\u00d0\u00b0\u00d1\u20ac\u00d0\u00ba\u00d0\u00b8\u00d0\u00bd\u00d0\u00b0 \u00d0\u203a\u00d0\u00b5\u00d0\u00bd\u00d0\u00b0",
        "email": "\u00d0\u203a\u00d0\u00b0\u00d1\u20ac\u00d0\u00ba\u00d0\u00b8\u00d0\u00bd\u00d0\u00b0.\u00d0\u203a\u00d0\u00b5\u00d0\u00bd\u00d0\u00b0@gmail.com",
        "position": "Part Time",
        "photo": "https:\/\/uifaces.co\/our-content\/donated\/D7h2tl-Z.jpg"
    },
    {
        "name": "Clint Dunham",
        "email": "clint.dunham@gmail.com",
        "position": "Accountant",
        "photo": "https:\/\/i.imgur.com\/zmWJVyd.jpg"
    },
    {
        "name": "Verena Funk",
        "email": "verena.funk@gmail.com",
        "position": "Executive Assistant",
        "photo": "https:\/\/randomuser.me\/api\/portraits\/women\/4.jpg"
    }
]