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": "Johnny Simpson",
        "email": "johnny.simpson@gmail.com",
        "position": "Graphic Designer",
        "photo": "https:\/\/randomuser.me\/api\/portraits\/men\/22.jpg"
    },
    {
        "name": "Anne Mcfadden",
        "email": "anne.mcfadden@gmail.com",
        "position": "Marketing",
        "photo": "https:\/\/images.pexels.com\/photos\/774909\/pexels-photo-774909.jpeg?auto=compress&cs=tinysrgb&crop=faces&fit=crop&h=200&w=200"
    },
    {
        "name": "Mayank \u00f0\u0178\u2018\u2039\u00f0\u0178\u008f\u00bc\u00f0\u0178\u02dc\u20ac",
        "email": "mayank.\u00f0\u0178\u2018\u2039\u00f0\u0178\u008f\u00bc\u00f0\u0178\u02dc\u20ac@gmail.com",
        "position": "Data Entry",
        "photo": "https:\/\/uifaces.co\/our-content\/donated\/tRhgibwY.jpg"
    },
    {
        "name": "Aliah Pitts",
        "email": "aliah.pitts@gmail.com",
        "position": "Marketing",
        "photo": "https:\/\/i.imgur.com\/KS7Q2TL.jpg"
    },
    {
        "name": "Lindsay Strickland",
        "email": "lindsay.strickland@gmail.com",
        "position": "Clerical",
        "photo": "https:\/\/i.imgur.com\/uVFTEpE.jpg"
    }
]