Developer API

Where Is This Photo API

Integrate Where Is This Photo photo location detection directly into your applications with this easy to use API.

About the API

The 3 endpoints below are all you need to integrate photo location detection into your workflow.

POST/v1/location

Locate Photo

Submit a URL of the target image and receive a prediction of the location of that image, along with other details such as the location title, coordinates and the Where Is This Photo ID for future reference.

GET/v1/location?id={id}

Get Prediction

Retrieve a previously made prediction using the prediction ID. Useful for fetching prediction details later.

GET/v1/account-details

Account Details

Check your account status to view your remaining prediction credits.

API Pricing

Simple monthly plans that scale with your usage. All plans include the same great features.

Full API access
Premium AI models
Priority support
Unused credits roll over

Starter

$19/month
130 credits / month
$0.15 per credit
Get Started
Most Popular

Professional

$49/month
350 credits / month
$0.14 per credit
Get Started

Enterprise

$99/month
800 credits / month
$0.12 per credit
Get Started

How Credit Rollover Works

Unused credits automatically roll over to the next month, so you never lose the value of your subscription. Credits continue to accumulate month after month as long as your account is actvie. Even after cancelling your subscription, you will still have access to your remaining credits.

Example with Professional Plan (350 credits/month):

  • Month 1: You receive 350 credits and use 300 → 50 credits roll over
  • Month 2: You receive 350 and use 300 → 50 rollover = 100 credits available at the end of the month
  • Month 3+: Unused credits continue to accumulate each month

Need more credits?
Contact us for custom enterprise plans or purhase more one time credits in your account page.

Documentation

Everything you need to integrate the Where Is This Photo API into your application.

Base URL

https://api.whereisthisphoto.com

Postman Collection

Get started quickly with our Postman collection. View on GitHub

Authentication

1Generate Your API Credentials

To get started, generate an API key in your account page. When you create a new API key, you will receive two pieces of information:

API Key ID

A unique identifier for your API key. This can be viewed anytime in your account.

API Secret

A secure secret used to authenticate your requests. Keep this safe!

Important: Store Your Secret Securely

Due to the nature of secure hashing, your API secret will only be shown once — at the moment of creation. Store it securely immediately. The secret cannot be retrieved later by anyone, including Where Is This Photo administrators. If you lose your secret, you will need to generate a new API key.

2Authenticate Your Requests

Include your credentials in the Authorization header of every API request using the following format:

Authorization: ApiKey {api_key_id}:{api_secret}

3Example Request

Here's an example of how to include the authorization header in your request:

curl -X POST https://api.whereisthisphoto.com/v1/location \
  -H "Authorization: ApiKey ak_abc123def456:sk_xyz789secret" \
  -H "Content-Type: application/json" \
  -d '{"imageUrl": "https://example.com/photo.jpg"}'

Tip: When you generate an API key, the UI will provide the complete authorization header value ready for you to copy and use.

Endpoints

Available API endpoints for photo location detection.

POST/v1/location

Locate Photo

Submit a publicly accessible URL to the target image and receieve a prediction of the location of the image including a title, description and coordinates.

Request Body
ParameterTypeRequiredDescription
imageUrlstringRequiredA publicly accessible URL to the image you want to locate. Supports all image formats.
Example Request
JSON
{
  "imageUrl": "https://example.com/photo.jpg"
}
Response Fields
FieldTypeDescription
coordinatesobjectContains latitude and longitude of the predicted location
coordinates.latitudenumberLatitude coordinate of the predicted location
coordinates.longitudenumberLongitude coordinate of the predicted location
descriptionstringDetailed AI-generated description explaining how the location was identified, including distinctive visual features
imageURLstringThe URL of the processed image (echoed from request)
locationTitlestringHuman-readable location name including landmarks, city, and country
moderationPassedbooleanIndicates whether the image passed content moderation checks
predictionIdnumberUnique identifier for this prediction, useful for tracking and support
Example Response
200 OKapplication/json
{
  "coordinates": {
    "latitude": 39.6543,
    "longitude": 66.975
  },
  "description": "Night view of Sher-Dor Madrasa on Registan Square in Samarkand, Uzbekistan. Distinctive features include the massive pishtaq (arched portal) flanked by two tall minarets, intricate turquoise-and-blue geometric tilework, and the ribbed turquoise dome set just behind the facade—hallmarks of the Sher-Dor Madrasa on the eastern side of Registan.",
  "imageURL": "https://example.com/photo.jpg",
  "locationTitle": "Sher-Dor Madrasa, Registan Square, Samarkand, Uzbekistan",
  "moderationPassed": true,
  "predictionId": 96864
}
GET/v1/location

Get Prediction

Retrieve a previously made prediction by its ID. This is useful for fetching prediction details at a later time or sharing prediction results.

Query Parameters
ParameterTypeRequiredDescription
idnumberRequiredThe predictionId returned from a previous POST request to /v1/location.
Example Request
URL
GET https://api.whereisthisphoto.com/v1/location?id=96864
Response Fields
FieldTypeDescription
coordinatesobjectContains latitude and longitude of the predicted location
coordinates.latitudenumberLatitude coordinate of the predicted location
coordinates.longitudenumberLongitude coordinate of the predicted location
descriptionstringDetailed AI-generated description explaining how the location was identified, including distinctive visual features
imageURLstringA signed URL to access the processed image (expires after 1 hour)
locationTitlestringHuman-readable location name including landmarks, city, and country
moderationPassedbooleanIndicates whether the image passed content moderation checks
predictionIdstringUnique identifier for this prediction
Example Response
200 OKapplication/json
{
  "coordinates": {
    "latitude": 39.6543,
    "longitude": 66.975
  },
  "description": "Night view of Sher-Dor Madrasa on Registan Square in Samarkand, Uzbekistan. Distinctive features include the massive pishtaq (arched portal) flanked by two tall minarets, intricate turquoise-and-blue geometric tilework, and the ribbed turquoise dome set just behind the facade—hallmarks of the Sher-Dor Madrasa on the eastern side of Registan.",
  "imageURL": "https://example.com/photo.jpg",
  "locationTitle": "Sher-Dor Madrasa, Registan Square, Samarkand, Uzbekistan",
  "moderationPassed": true,
  "predictionId": "96864"
}
GET/v1/account-details

Account Details

Check your account status and available prediction credits. Use this endpoint to monitor your usage and ensure you have sufficient credits before making location predictions.

Parameters

This endpoint does not require any parameters.

Example Request
URL
GET https://api.whereisthisphoto.com/v1/account-details
Response Fields
FieldTypeDescription
predictionCreditsAvailablenumberThe number of API credits remaining in your account
Example Response
200 OKapplication/json
{
  "predictionCreditsAvailable": 93
}

Frequently Asked Questions

Common questions about the WhereIsThisPhoto API

How can I generate an API key?

You can generate an API key in your account page. Go to the API Configuration tab and click the "Create API Key" button. The secret key is only available once and cannot be retrieved again. Make sure to store this somewhere safe.

How can I retrieve my secret key after the API key is created?

You can't. API secret keys are only available once and cannot be retrieved again. This is for security reasons.

How do API credits work?

Each photo location prediction uses 1 credit. Unused credits roll over to the next month. You can view your credits using the account-details GET endpoint or by checking your account page.

What image formats are supported?

All image formats are supported. Images must be submitted via a publicly accessible URL.

Is there a rate limit?

There is no limit to the number of API calls you can make. However, there is throttling limits on the API to ensure service stability.

What does moderationPassed mean?

The moderationPassed field indicates whether the submitted image passed our content moderation checks. If false, the image was rejected and location data will not be returned.

Can I cancel my subscription?

Yes, you can cancel anytime from your account page. Your remaining credits will continue to work after you cancel.

Is there a way to get more credits?

Yes, you can purchase more credits from your account page. Go to the Prediction Credits tab and select the package you want to purchase. These credits will then be added to your account balance and can be used in the API.

Can I use my API credits in the UI?

Yes! API credits can be used to make predictions in the UI on the home page.

Ready to Get Started?

Create your API key in seconds and start integrating photo location detection into your application today.

Get Your API Key

We use cookies to enhance your experience

We use cookies and similar technologies to help personalize content, provide social media features, analyze traffic, and show you relevant ads. By clicking "Accept All", you consent to our use of cookies.