API Documentation
Everything you need to integrate reverse image search into your application.
Base URL
https://api.searchthisimage.com
Authentication
All API requests require an API key sent via the X-API-Key header.
Header
X-API-Key: sti_live_your_api_key_hereSearch by URL
POST/v1/search/url
Submit an image URL to find matching pages, similar images, and web entities.
Request
curl -X POST https://api.searchthisimage.com/v1/search/url \
-H "Content-Type: application/json" \
-H "X-API-Key: sti_live_abc123..." \
-d '{"image_url": "https://example.com/photo.jpg"}'Response
{
"status": "success",
"is_nsfw": false,
"results": {
"pages_with_matching_images": [
{
"url": "https://example.com/article",
"page_title": "Example Article"
}
],
"visually_similar_images": [
"https://similar.com/image.jpg"
],
"web_entities": [
{
"description": "Sunset",
"score": 0.95
}
],
"best_guess_labels": [
"sunset over ocean"
]
}
}Search by Upload
POST/v1/search/upload
Upload an image file directly. Supports JPG, PNG, WebP, and GIF.
Request
curl -X POST https://api.searchthisimage.com/v1/search/upload \
-H "X-API-Key: sti_live_abc123..." \
-F "file=@/path/to/image.jpg"NSFW Detection
All images are automatically screened for adult and violent content using Google SafeSearch. If content is flagged, the response will include:
Blocked response
{
"status": "blocked",
"is_nsfw": true,
"nsfw_reason": "Adult content detected",
"results": null
}Error Codes
| Status | Meaning |
|---|---|
| 400 | Bad request — invalid image URL or file |
| 401 | Unauthorized — missing or invalid API key |
| 402 | Payment required — quota exceeded |
| 415 | Unsupported file type |
| 429 | Rate limited — too many requests |
| 500 | Internal server error |
Rate Limits
Rate limits depend on your plan. When exceeded, the API returns 429 Too Many Requests. Check the response headers for your current usage:
Rate limit headers
X-RateLimit-Limit: 10
X-RateLimit-Remaining: 7
X-RateLimit-Reset: 1679616000