API Docs


Before using the API make sure you read the docs.


If you are new around here, first get an API key.




Parameter Usage Example Description
X-API-KEY 'X-API-KEY: [YOUR-API-KEY]' Add your API key

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
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-API-KEY],
	  'Accept': 'application/json',
	  'Cache-Control': 'no-cache'
	}
})

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

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


Try it Here