FaceSearchAI API

v1.0 • REST API

All systems operational
Get API Key

FaceSearchAI API Documentation

The FaceSearchAI API provides powerful face recognition and image search capabilities. Our REST API uses predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes and authentication.

Base URL

https://facesearchai.com/api

Authentication

The FaceSearchAI API uses API key authentication. Include your API key in the api-key header:

api-key: your_api_key_here

Keep your API key secure

Never expose your API key in client-side code. Make API calls from your backend server only.

Quick Start

Get started with a simple face search request in just a few lines of code:

curl -X POST https://facesearchai.com/api/search \
  -H "api-key: your_api_key_here" \
  -H "accept: application/json" \
  -F "file=@/path/to/image.jpg"

Rate Limits

API rate limits vary based on your subscription plan and usage requirements.

Contact Support for Rate Limit Information

Rate limits depend on your specific subscription plan and usage needs. Please contact our support team to learn about the rate limits that apply to your account.

Contact Developer Support

Rate limit headers are included in every response to help you track your usage.

POST

/search

Upload an image to search for similar faces across the web. Returns a list of matching images with their source URLs.

Request Parameters

ParameterTypeDescription
filefileImage file (JPG, JPEG, PNG, WebP). Max size: 10MB

Code Examples

curl -X POST https://facesearchai.com/api/search \
  -H "api-key: your_api_key_here" \
  -H "accept: application/json" \
  -F "file=@/path/to/image.jpg"

Response

{
    "UST_time": 1735498671,
    "results": [
        {
            "adultContent": false,
            "sourceUrl": "https://example.com/article1",
            "imageUrl": "https://example.com/image1.png"
        },
        {
            "adultContent": false,
            "sourceUrl": "https://example.com/article2",
            "imageUrl": "https://example.com/image2.jpg"
        }
    ]
}
GET

/profile

Retrieve your account information, including usage statistics and subscription details.

Code Examples

curl -X GET https://facesearchai.com/api/profile \
  -H "api-key: your_api_key_here" \
  -H "accept: application/json"

Response

{
  "success": true,
  {
    "email": "user@domain.com",
    "monthly_credits": 20000,
    "daily_credits": 4000,
    "daily_searches_used": 1000,
    "monthly_searches_used": 10000,
    "subscribe_date": "2024-12-29T12:42:47.104536Z"
  }
}

Error Codes

FaceSearchAI uses conventional HTTP response codes to indicate the success or failure of an API request.

CodeStatusDescription
200OKRequest successful
400Bad RequestInvalid request parameters
401UnauthorizedInvalid or missing API key
403ForbiddenAPI key doesn't have required permissions
413Payload Too LargeFile size exceeds 10MB limit
415Unsupported Media TypeFile format not supported
429Too Many RequestsRate limit exceeded
500Internal Server ErrorSomething went wrong on our end

Error Response Format

{
  "success": false,
  "error": {
    "code": "INVALID_FILE_FORMAT",
    "message": "The uploaded file format is not supported. Please use JPG, JPEG, PNG, or WebP.",
    "details": {
      "supportedFormats": ["jpg", "jpeg", "png", "webp"],
      "receivedFormat": "gif"
    }
  },
  "timestamp": 1735498671
}

Response Schemas

Search Result Object

FieldTypeDescription
imageUrlstringDirect URL to the matching image
sourceUrlstringURL of the webpage containing the image
adultContentbooleanWhether the result contains adult content

Webhooks

Webhooks allow you to receive real-time notifications when certain events occur in your account.

Coming Soon

Webhook functionality is currently in development. Contact us if you're interested in early access.

Need Help?

Our developer support team is here to help you integrate FaceSearchAI into your applications.