Jurisdictions validate
Exactjurisdictions_validateDeterministic and authoritative — the canonical answer for this input.
Check whether a value is a recognized jurisdiction (country, US state, territory, DC, armed-forces postal). Returns is_valid (bool), type, and matched_by. Accepts codes (case-insensitive), full names, and curated common variants like 'USA'/'UK' (matched_by='alias'). Optional type and parent_code filters disambiguate collisions (e.g. CA = California vs Canada). Confidence 1.0 on unambiguous match, 0.85 when multiple types share the same code. Processing multiple inputs? Use `jurisdictions_validate_batch` to do up to 1000 in one call.
Parameters
valuestringrequiredJurisdiction code or full name to validate.
typestringoptionalFilter by jurisdiction type. Valid values: country, state, territory, district, armed_forces_postal. When omitted, all types are searched and the best match is returned (US-scoped types preferred when ambiguous).
parent_codestringoptionalFilter by parent code (e.g. 'US' to restrict to US states/territories/DC). Case-insensitive.
Call it
curl -X POST https://api.snipget.ai/v1/jurisdictions/validate \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{"value":"CA","parent_code":"US"}'The Batch tab sends up to 1000 inputs in one call via /v1/jurisdictions/validate/batch.
Example response
{
"is_valid": true,
"type": "state",
"matched_by": "code"
}FAQ
Why use this instead of asking an AI if something is a real place?
It checks your value against a fixed list of 192 countries, all 50 US states, territories, DC, and armed-forces postal codes. A language model will confidently guess, this gives you a yes or no you can trust and tells you whether it matched on a code, a full name, or a curated common variant (alias).
How do I stop CA from matching Canada when I mean California?
Pass parent_code as US to limit the search to US children, or pass type as state. Without a filter an ambiguous code returns the best match with confidence 0.85 so you know it was a judgment call.
Is this an exact check or a fuzzy guess?
It is exact and deterministic. A clean match on a single code or name returns confidence 1.0. The only soft case is an ambiguous code (like GA matching two places), which returns 0.85, never a wrong silent answer.
What does it give back?
Just the essentials: is_valid (true or false), the type (country, state, territory, district, or armed_forces_postal), and matched_by (code, name, or alias for curated common variants). Use Normalize or Look up a jurisdiction when you want the full record.
What happens if I send something that is not a real place?
You get a normal response with is_valid false and confidence 0, not an error. Blank or gibberish input is handled the same way, so you never have to catch a crash.