Subnational2Code List and Search Web Service API
URL |
description |
notes |
---|---|---|
data/subnational2/list?locale=<locale to use for names> |
Return entire list of "county" names |
|
data/subnational2/list?countryCode=<2-letter ISO country code>&locale=<locale to use for names> |
Return list of "county" names found in the given country |
|
data/subnational2/find?q=<string to match>&locale=<locale used in match string> |
Return list of "county" names that match |
Can wildcards be used in the match string? |
data/subnational2/list?subnational1Code=<eBird subnational1 code>&locale=<locale to use for names> |
Return list of "county" names found in the given "state" |
|
parameter |
required |
default |
value options |
description |
---|---|---|---|---|
locale |
no |
en_US |
Java standard locale codes |
locale in which to perform matching, and in which to provide names in response (when possible) |
countryCode |
no |
n/a |
|
2-letter ISO country code |
subnational1Code |
no |
n/a |
|
eBird standard subnational1Code |
format |
no |
csv |
|
format to use for response |
CSV Result Format
<country code>, <subnational1 code>, <subnational2 code>, <name associated with subnational2 code>
<country code>, <subnational1 code>, <subnational2 code>, <name associated with subnational2 code
<country code>, <subnational1 code>, <subnational2 code>, <name associated with subnational2 code>
XML Result Format
<response> <header> <locale country="US" language="en"/> <timestamp>2008-02-21T12:37:32.546-05:00</timestamp> <criteria> <property name="locIDs" value="[L97555]"/> </criteria> <comment> </comment> </header> <result> <location countryCode="" subnational1Code="" subnational2Code="">name of the subnational2 region </location> <location countryCode="" subnational1Code="" subnational2Code="">name of the subnational2 region </location> <location countryCode="" subnational1Code="" subnational2Code="">name of the subnational2 region </location> <location countryCode="" subnational1Code="" subnational2Code="">name of the subnational2 region </location> </result> </response