Face Recognition API: Detect, Compare and Search Faces
Face recognition API for developers: verify a selfie against an ID photo, compare two faces, search a face across your own database (1:N), and get age, gender, emotion and landmarks for every face. One REST call, no SDK or GPU.
See It in Action
Real examples generated by the API. See the quality for yourself.

A source photo matched to a different photo of the same woman, and no match against another woman.
Features
Face Detection
Detect multiple faces in a single image with precise bounding boxes and 7 facial landmarks.
Age, Gender & Emotion
Estimate age range, gender, smile, eyeglasses, sunglasses, and dominant emotion for each face.
Celebrity Recognition
Identify celebrities in images with name and reference URLs. Separates recognized and unrecognized faces.
Face Comparison
Compare faces from two images to find matches, built for verification and identity confirmation.
Face Repositories
Create custom face databases to store, manage, and search facial features for re-identification.
Cloud-Based & Scalable
Low latency, high availability. Analyze large volumes of images without managing any infrastructure.
API Reference
10 endpoints, simple integration. Here's everything you need.
Supported Content Types
https://faceanalyzer-ai.p.rapidapi.com/faceanalysisDetect faces in an image with landmarks, gender, age range, smile, eyeglasses, sunglasses, and emotion estimation.
imagefilerequiredImage file to analyze, sent as multipart/form-data
urlstringrequiredPublic URL of the image, sent as application/x-www-form-urlencoded
Send either image (file upload) or url, not both.
{
"statusCode": 200,
"body": {
"faces": [
{
"boundingBox": { "topLeft": { "x": 0.28, "y": 0.12 }, "bottomRight": { "x": 0.72, "y": 0.85 } },
"facialFeatures": {
"Gender": "Male",
"Smile": true,
"Eyeglasses": false,
"Sunglasses": false,
"AgeRange": { "Low": 25, "High": 35 },
"Emotions": ["HAPPY"]
},
"landmarks": {
"eyeLeft": { "center": { "x": 0.38, "y": 0.40 } },
"eyeRight": { "center": { "x": 0.62, "y": 0.40 } },
"mouth": { "left": { "x": 0.40, "y": 0.70 }, "right": { "x": 0.60, "y": 0.70 } },
"nose": { "center": { "x": 0.50, "y": 0.55 } }
}
}
]
}
}https://faceanalyzer-ai.p.rapidapi.com/celebrity-recognitionRecognize celebrities in an image. Returns celebrity names, info URLs, and facial features for each recognized face.
imagefilerequiredImage file to analyze, sent as multipart/form-data
urlstringrequiredPublic URL of the image, sent as application/x-www-form-urlencoded
Send either image or url, not both.
{
"statusCode": 200,
"body": {
"celebritiesFaces": [
{
"boundingBox": { ... },
"facialFeatures": { ... },
"landmarks": { ... },
"celebrityName": "John Doe",
"celebrityUrlsInfo": ["https://..."]
}
],
"unrecognizedFaces": [
{
"boundingBox": { ... },
"facialFeatures": { ... },
"landmarks": { ... }
}
]
}
}https://faceanalyzer-ai.p.rapidapi.com/compare-facesCompare faces from two different images. Returns matched and unmatched faces from the target image.
source_imagefilerequiredSource face image file, sent as multipart/form-data
source_image_urlstringrequiredSource face image URL, sent as form-urlencoded
target_imagefilerequiredTarget image to search for matching faces, as a file upload
target_image_urlstringrequiredTarget image URL to search for matching faces
Send either source_image or source_image_url, and either target_image or target_image_url.
{
"statusCode": 200,
"body": {
"matchedFaces": [
{ "boundingBox": { ... }, "landmarks": { ... } }
],
"unmatchedFaces": [
{ "boundingBox": { ... }, "landmarks": { ... } }
]
}
}https://faceanalyzer-ai.p.rapidapi.com/create-facial-repositoryCreate a custom facial repository to store facial features for re-identification.
repository_idstringrequiredUnique identifier for the new repository
{
"statusCode": 200,
"body": {
"message": "OK"
}
}https://faceanalyzer-ai.p.rapidapi.com/delete-facial-repositoryDelete an existing facial repository and all its stored faces.
repository_idstringrequiredID of the repository to delete
{
"statusCode": 200,
"body": {
"message": "OK"
}
}https://faceanalyzer-ai.p.rapidapi.com/list-facial-repositoriesList all created facial repositories.
{
"statusCode": 200,
"body": {
"FacialRepositoriesId": ["repo-1", "repo-2"]
}
}https://faceanalyzer-ai.p.rapidapi.com/save-face-in-repositorySave a face's features from an image into a repository for later re-identification.
imagefilerequiredImage containing the face, sent as multipart/form-data
urlstringrequiredPublic URL of the image, sent as form-urlencoded
repository_idstringrequiredID of the target repository
external_idstringrequiredExternal identifier for the face (e.g. person name)
max_facesnumberrequiredMaximum number of faces to save from the image
Send either image or url, not both.
{
"statusCode": 200,
"body": {
"FacesId": ["face-id-1", "face-id-2"]
}
}https://faceanalyzer-ai.p.rapidapi.com/list-repository-facesList all faces stored in a specific repository.
repository_idstringrequiredID of the repository (query string parameter)
{
"statusCode": 200,
"body": {
"Faces": [
{ "FaceId": "...", "ExternalImageId": "..." }
]
}
}https://faceanalyzer-ai.p.rapidapi.com/delete-face-from-repositoryDelete one or more faces from a repository.
repository_idstringrequiredID of the repository
face_idsarrayrequiredArray of face IDs to delete
{
"statusCode": 200,
"body": {
"message": "OK"
}
}https://faceanalyzer-ai.p.rapidapi.com/search-face-in-repositorySearch for a face in a repository by providing an image. Returns matching faces with similarity scores.
imagefilerequiredImage containing the face to search, sent as multipart/form-data
urlstringrequiredPublic URL of the image, sent as form-urlencoded
repository_idstringrequiredID of the repository to search in
Send either image or url, not both.
{
"statusCode": 200,
"body": {
"SearchedFaceBoundingBox": { ... },
"FaceMatches": [
{
"FaceId": "...",
"BoundingBox": { ... },
"ExternalImageId": "...",
"Similarity": 98
}
]
}
}Response
Returns JSON with detected faces, facial features, landmarks, and endpoint-specific data (celebrity info, matches, repository entries).
Quick Start
Copy-paste code to get started in seconds. Replace YOUR_API_KEY with your RapidAPI key.
# Face Analysis
curl -X POST "https://faceanalyzer-ai.p.rapidapi.com/faceanalysis" \
-H "x-rapidapi-key: YOUR_API_KEY" \
-H "x-rapidapi-host: faceanalyzer-ai.p.rapidapi.com" \
-F "image=@photo.jpg"
# Celebrity Recognition
curl -X POST "https://faceanalyzer-ai.p.rapidapi.com/celebrity-recognition" \
-H "x-rapidapi-key: YOUR_API_KEY" \
-H "x-rapidapi-host: faceanalyzer-ai.p.rapidapi.com" \
-d "url=https://example.com/celeb.jpg"
# Compare Faces
curl -X POST "https://faceanalyzer-ai.p.rapidapi.com/compare-faces" \
-H "x-rapidapi-key: YOUR_API_KEY" \
-H "x-rapidapi-host: faceanalyzer-ai.p.rapidapi.com" \
-F "source_image=@person1.jpg" \
-F "target_image=@group.jpg"
# Search Face in Repository
curl -X POST "https://faceanalyzer-ai.p.rapidapi.com/search-face-in-repository" \
-H "x-rapidapi-key: YOUR_API_KEY" \
-H "x-rapidapi-host: faceanalyzer-ai.p.rapidapi.com" \
-F "image=@person.jpg" \
-F "repository_id=my-repo"What Developers Build with This Face Recognition API
Each use case below has a step-by-step tutorial with working Python code and real API responses.
Face Verification
Confirm that two photos show the same person in one call: selfie against ID photo, today's check-in against the enrolled photo.
Face comparison tutorialeKYC Onboarding
Match a user's selfie to the portrait on their ID document and read the document fields in the same flow.
Selfie and ID verification guideDuplicate Account Detection
Search every new signup selfie in your face index and hold repeat users for review before they claim a second bonus.
Duplicate account guideAttendance and Access Control
Enroll staff once, then identify each check-in photo with a 1:N search and a similarity score.
Attendance system tutorialEvent Photo Search
Index a wedding, race or conference gallery once, then let each guest find every photo they appear in with one selfie.
Event photos by selfie guideFace Blurring for GDPR
Pixelate every face in a photo or folder before you publish it, or blur everyone except the person who asked for a copy.
Blur faces in Python guidePhoto Library by Person
Sort a photo library into one album per person, then file every new photo in the right album as it is uploaded.
Group photos by face guideMigrate from Kairos or Betaface
Keep the enroll, recognize and verify calls of your app with a drop-in Python module, and re-enroll your people in minutes.
Kairos and Betaface alternative guideAge Verification
Estimate an age range from a selfie and gate adult content or age-restricted products in about a second.
Age verification guideJavaScript and Node.js
Replace face-api.js with plain fetch calls from Node.js 20: detection, comparison and labeled face search without model files.
face-api.js alternative guideChoosing a Provider
Cost at 10,000 calls a month, free tiers and the status of each face recognition API in 2026.
Face recognition APIs comparedPricing
Start free, scale as you grow. All plans include full API access with no credit card required for the free tier.
Basic
30 requests/mo
- Full API access
- All endpoints
- Standard support
Pro
5,000 requests/mo
- Full API access
- All endpoints
- Standard support
Ultra
10,000 requests/mo
- Full API access
- All endpoints
- Standard support
Mega
50,000 requests/mo
- Full API access
- All endpoints
- Standard support
Frequently Asked Questions
- Is there a free face recognition API?
- Yes. The Basic plan includes 30 requests a month for free, with every endpoint available: face analysis, face comparison and the face repository search. It is enough to test verification and 1:N search on your own photos before choosing a plan.
- How much does the face recognition API cost?
- Pro costs $12.99 a month for 5,000 requests, Ultra $22.99 for 10,000 (about $0.0023 per call) and Mega $92.99 for 50,000 (about $0.0019 per call). Every endpoint uses the same quota, so detection, comparison and search are billed alike.
- How do I verify a selfie against an ID photo?
- Send the ID portrait as source_image and the selfie as target_image to the /compare-faces endpoint. The response lists the target faces in matchedFaces (same person) or unmatchedFaces (someone else), so a single matched face means the identity is verified.
- Can I search one face across thousands of people (1:N)?
- Yes. Create a facial repository, save each person's face with your own ID as external_id, then call /search-face-in-repository with a new photo. The response returns the matching IDs with a Similarity score from 0 to 100. In our tests, new photos of enrolled people scored between 99.49 and 100, even when downscaled, blurred or rotated.
- What can the Face Analyzer API detect in an image?
- The Face Analyzer API detects faces and returns detailed facial attributes including age range, gender, smile, eyeglasses, sunglasses, dominant emotion, and 7 facial landmarks. It also supports celebrity recognition, face comparison between two images, and custom face re-identification repositories.
- How does the face comparison feature work?
- The face comparison endpoint accepts a source image and a target image, then identifies whether the same person appears in both. It returns matched and unmatched faces with bounding boxes, making it ideal for identity verification, access control, and attendance systems.
- Can I build a facial recognition system with this API?
- Yes. The Face Analyzer API provides facial repository endpoints that let you create custom face databases, store facial features with external IDs, and search for matching faces by similarity score. This enables scalable face re-identification workflows without managing your own ML infrastructure.
Tutorials & Guides
Learn how to integrate this API with step-by-step tutorials and real-world use cases.

Kairos and Betaface API Alternative: Drop-in Python Code
Kairos moved to identity verification and the public Betaface API is down. Replace enroll, recognize and verify with drop-in Python code, tested live.

Group Photos by Face in Python: One Album per Person
Group photos by face in Python: detect every face, match it in a face repository and sort a photo library into one album per person. Real results inside.

Blur Faces in Photos Automatically with Python (GDPR)
Blur faces automatically in Python: detect every face with one API call, pixelate it with Pillow and strip GPS data. Batch script and GDPR tips included.

face-api.js Alternative: Face Recognition in Node.js
face-api.js has not shipped a release since 2020. Replace it with a face recognition API in Node.js: detection, comparison and FaceMatcher-style search, tested.

Find Event Photos by Selfie with a Face Search API
Let guests find their event photos with one selfie: index every photo with a face search API and return each guest's matches in Python. Real results inside.

Detect Duplicate Accounts with a Face Search API
Stop multi-accounting and bonus abuse at signup: search each new selfie in a face index and flag repeat users. Python code, real similarity scores, GDPR notes.

Best Age Verification APIs in 2026: Pricing Compared
Compare age verification APIs in 2026: facial age estimation vs ID checks, liveness, cost at 10,000 checks a month, and a Python age gate with a safety buffer.

Best Face Recognition & Comparison APIs in 2026 (Pricing)
Compare face recognition APIs in 2026: face comparison (1:1), face search (1:N), free tiers, cost at 10,000 calls a month, and which APIs went offline.

Add eKYC to Your SaaS: Selfie-to-ID Face Verification API
Build an eKYC onboarding step that matches a user's selfie to their ID document. Combines a face comparison API and an OCR API, with Python and a decision flow.

Emotion Detection: Face Analyzer API vs DeepFace
Compare a cloud face analysis API with DeepFace open source for emotion detection. Side-by-side tests on 3 images, accuracy results, and code examples.

Face Recognition Attendance System with REST API (Python)
Build a face recognition attendance system in Python using a REST API for face detection and comparison. Step-by-step tutorial with Flask source code.

Build a Face-Based Age Verification System with API
Learn how to build a face-based age verification system using the Face Analyzer API in Python. Comply with age-gate regulations for ecommerce and delivery apps.

Face Matching in 5 Lines of Python: Detect, Encode, Compare
How face matching works under the hood and how to implement it in 5 lines of Python. Covers face detection, embedding vectors, and similarity comparison with real test results.

KYC Selfie Verification with a Face Comparison API
Check a KYC selfie against an ID photo with a face comparison API. Python code and real results, plus profile verification and fraud prevention.

Face Comparison API: Match and Verify Two Faces in Python
Compare two faces with a face comparison API: match a selfie to an ID photo in Python, cURL or JavaScript and turn the response into a clear verify decision.

Building a Face Detection App with a REST API
Step-by-step tutorial for building a face detection application using a REST API. Includes cURL, Python, and JavaScript code examples with the Face Analyzer API.
Start Using Face Analyzer Today
Sign up on RapidAPI to get your API key. The free tier includes generous monthly requests — no credit card required.