Skip to content
Passport Photo

Photo specs API

A free, read-only JSON endpoint with every photo specification on this site. Cached for 24 hours; please keep requests under 60 per minute.

GET /v1/passport/specs

ParameterDescription
countryISO 3166-1 alpha-2 code (optional), e.g. US
documentpassport, visa, id, residence, driving or baby (optional)

Response fields: w, h (mm), head [min, max] mm, eye [min, max] mm from the bottom, background, px/pxMax digital size, kb file-size limits, glasses, smile, onsite, source, review.

curl

curl "https://trypassportphoto.com/v1/passport/specs?country=US&document=passport"

JavaScript

const res = await fetch("https://trypassportphoto.com/v1/passport/specs?country=GB&document=passport");
const { specs } = await res.json();

Python

import requests
specs = requests.get("https://trypassportphoto.com/v1/passport/specs", params={"country": "IN", "document": "visa"}).json()["specs"]

Go

resp, err := http.Get("https://trypassportphoto.com/v1/passport/specs?country=CA&document=passport")

PHP

$specs = json_decode(file_get_contents("https://trypassportphoto.com/v1/passport/specs?country=DE&document=visa"), true);

Photo processing API

Travel agencies can process photos server-side with prepaid Business credits. Contact support@trypassportphoto.com.