The GeoEnrichment service provides a helper method that returns standard geography IDs and features for the supported geographic levels.
The most common workflow for this service is to find a FIPS (standard geography ID) for a geographic name. For example, you can use this service to find the FIPS for the county of San Diego which is 06073. You can then use this FIPS ID within the GeoEnrichment service study area definition to get geometry and optional demographic data for the county. This study area definition is passed as a parameter to the GeoEnrichment service to return data defined in the enrichment pack and optionally return geometry for the feature.
Request URL
https://geoenrich.arcgis.com/arcgis/rest/services/World/GeoEnrichmentServer/StandardGeographyQuery
Request parameters
Parameter | Description |
---|---|
Optional parameter to specify the source country for the search. Use this parameter to limit the search and query of standard geographic features to one country. This parameter supports both the two-digit and three-digit country codes illustrated in the coverage table. Example Set source country to the United States:
| |
Optional parameter to specify a specific dataset within a defined country. Example
| |
Optional parameter to specify a specific hierarchy within a defined country. Default value optionalCountryHierarchy=esri2024 | |
Optional parameter to specify which standard geography layers are being queried or searched. If this parameter is not provided, all layers within the defined country will be queried. Default value
| |
Optional parameter to specify which IDs for the standard geography layers are being queried or searched. You can use this parameter to return attributes and/or geometry for standard geographic areas for administrative areas where you already know the ID. Default value
| |
Optional parameter to specify the text to query and search the standard geography layers specified. You can use this parameter to query and find standard geography features that meet an input term. Default value
| |
Optional parameter to return all the subgeographic areas that are within a parent geography. For example, you could return all the U.S. counties for a given U.S. state or you could return all the Canadian postal areas (FSAs) within a Census Metropolitan Area (city). Default value
| |
Optional parameter to return all the subgeographic areas that are within a parent geography. For example, you could return all the U.S. counties within a given U.S. state or you could return all the Canadian postal areas (FSAs) within a Census Metropolitan Areas (city). Default value
| |
Optional parameter to filter the results of the subgeography features that are returned by a search term. You can use this parameter to query and find subgeography features that meet an input term. This parameter is used to filter the list of subgeography features that are within a parent geography. Default value
| |
Optional parameter to request the output geometries in a specified spatial reference system. Default value
| |
Optional parameter to request the output geometries in the response. Default value
| |
Optional parameter to request the output geometry to return the center point for each feature. Use this parameter to return all the geometries as points. For example, you could return all U.S. ZIP Code centroids (points) rather than providing the boundaries. Default value
| |
Optional integer that specifies the level of generalization or detail in the area representations of the administrative boundary or standard geographic data layers. Values must be whole integers from 0 through 2, where 0 is most detailed and 2 is most generalized. Default value
| |
Optional parameter to define if text provided in the Default value
| |
Optional parameter that limits the number of features that are returned from the Default value
| |
Optional parameter that starts the results on the number of the records specified. Default value 0 | |
Optional parameter that specifies the language you wish to receive your GeoEnrichment results. The availability to use this parameter is determined by the data which is available within your study area. Default value en | |
Returns only requested fields. Default value
Example 1
| |
Returns a count of features within a parent geography. For example, return a count of census tracts within a state. Values: Default value
Notes:
| |
Optional parameter to specify the output response format. Default value
|
Optional parameters
sourceCountry
Optional parameter to specify the source country for the search. Use this parameter to limit the search and query of standard geographic features to one country. This parameter supports both the two-digit and three-digit country codes illustrated in the coverage table.
Examples
Example 1 – Set source country to the United States:
source
Example 2 – Set the source country to Canada:
source
Additional notes
- The list of available countries and their associated IDs are listed in the GeoEnrichment coverage topic. This list can be obtained, programmatically, by querying the Countries discovery method:
optionalCountryDataset
Optional parameter to specify a specific dataset within a defined country.
For example—in Japan, we offer datasets from different providers. One such dataset is provided by Esri Japan. We are able to query geographic features directly from that dataset.
Example
https
2023
&f=pjson&return
optionalCountryHierarchy
Optional parameter to specify a specific hierarchy within a defined country.
GeoEnrichment has the concept of a hierarchy, a tag for indicating which data source to use. The hierarchy tag can be passed in the optional
parameter to specify a non-default data source. For example, in the U.S. the esri2024 hierarchy is the default and indicates the latest data based on the Census 2020 boundaries. If this parameter is blank, the esri2024 hierarchy will be used. The esri2023 hierarchy is based on the 2020 census boundaries and Esri's updated demographics for the year 2023 and can be passed to override the default hierarchy.
Example
Return a state boundary from the esri2023 hierarchy based on boundaries from the 2020 decennial census and Esri's updated demographics for the year 2023.
https
geographyLayers
Optional parameter to specify which standard geography layers are being queried or searched. If this parameter is not provided, all layers within the defined country will be queried.
Default value
(null or empty)
Examples
Example 1 – Limit the search and query to all Canadian provinces:
geography
Example 2 – Limit the search and query to all U.S. counties and census places (Cities and Towns):
geography
Example 3 – Search and query all global city names:
geography
Example 4 – Search and query all country names:
geography
Additional notes
- The syntax of this parameter should be defined in a JSON array.
- If this parameter is not provided, the operation will take longer, as all layers within the defined country will be queried.
- You can define one or multiple layers to be queried.
- If
source
parameter is blank, at least one layer must be defined in this parameterCountry
geographyIDs
Optional parameter to specify which IDs for the standard geography layers are being queried or searched. You can use this parameter to return attributes and/or geometry for standard geographic areas for administrative areas where you already know the ID, for example, if you know the Federal Information Processing Standard (FIPS) Codes for a U.S. state or county; or, in Canada, to return the geometry and attributes for a Forward Sortation Area (FSA).
Default value
(null or empty)
Examples
Example 1 – Return the state of California where the geography
parameter is set to geographyLayers=[“US.States”]:
geography
Example 2 – Return two US ZIP Codes where the geography
parameter is set to geographyLayers=[“US.ZIP5”]:
geography
Additional notes
- The syntax of this parameter should be defined in a JSON array.
- You can provide one or many IDs in the array.
- You must define at least one layer in the
geography
parameter if you use this parameter to query features by ID.Layers - Only matched features will be returned from the layers defined in the
geography
parameter.Layers
geographyQuery
Optional parameter to specify the text to query and search the standard geography layers specified. You can use this parameter to query and find standard geography features that meet an input term—for example, a list of all the U.S. counties that contain the word orange
. The geography
parameter can be a string that contains one or more words.
Default value
(null or empty)
Example
Return all the counties that contain the word “orange” where geographyLayers=[“US.Counties”]:
geography
Search terms
A query is broken up into terms and operators. There are two types of terms: Single Terms and Phrases.
A Single Term is a single word such as "Redlands" or "Riverside".
A Phrase is a group of words surrounded by double quotes such as "Orange County".
Multiple terms can be combined together with Boolean operators to form a more complex query (see below).
Fields
Geography search supports fielded data. When performing a search, you can either specify a field or use search through all fields.
You can search any field by typing the field name followed by a colon ":" then the term you are looking for.
For example, to search for Orange County in California you could construct the query as follows:
Name
or
Name
or
"
The following fields are supported in geography
:
Field | Description |
---|---|
ID | Geography ID—for example, |
NAME | Geography NAM—for example, |
MajorSubdivisionName | Major subdivision name—for example, |
MajorSubdivisionAbbr | Major subdivision abbreviation—for example, |
MajorSubdivisionID | Major subdivision ID—for example, |
MajorSubdivision | Major subdivision ID, name and abbreviation—for example, |
Wildcard searches
The search supports single and multiple character wildcard searches within single terms (not within phrase queries).
To perform a single character wildcard search, use the "?" symbol.
To perform a multiple character wildcard search, use the "*" symbol.
The single character wildcard search looks for terms that match that with the single character replaced. For example, to search for "San" or "Sen" you can use the search:
S?n
Multiple character wildcard search looks for 0 or more characters. For example, you can use the search to find all cities that begin with “San Fran”:
San Fran*
You can also use the wildcard search in the middle of a term:
S*n
Fuzzy searches
Fuzzy searches are based on the Levenshtein Distance or Edit Distance algorithm. To perform a default fuzzy search, you can set the use
parameter to true. You can also explicitly set a fuzzy search with the geography
syntax by using the tilde symbol "~" at the end of a Single Term.
For example, a term similar in spelling to "County" uses the fuzzy search:
Count~
This search will find terms like “County”.
Using the tilde symbol "~" at the end of a single word, rather than explicitly setting the use
parameter, you can use fuzzy match for only one word in a multiple search term.
In the following example, only the word “orange” will be searched with fuzzy matching:
orange~ county
An additional (optional) numeric parameter can be specified after the tilde symbol ("~") to set the similarity tolerance. The value is between 0 and 1; with a value closer to 1, only terms with a higher similarity will be matched.
For example, if you only want to match terms with a similarity of 0.0 or higher, you can set the fuzzy search as follows:
count~0.8
The default that is used if the optional similarity number is not provided is 0.5.
Boolean Operators
Boolean operators allow terms to be combined through logic operators. The search supports AND, "+", OR, NOT and "-" as Boolean operators. Boolean operators must be ALL CAPS.
In geography
, the AND operator is the default conjunction operator. This means that if there is no Boolean operator between two or more terms, the AND operator is used. The AND operator matches items where both terms exist anywhere in the list of standard geography features. The symbol "&" can be used in place of the word AND.
Because the AND operator is used by default, to search for standard geography features that have “Orange” and “County” in their names, you can use the following query:
Orange County
You can also insert the operator and yield the same results:
"
The OR operator links two terms and finds a matching document if either of the terms exist in a document. This is equivalent to a union with using sets. The symbol "||" can be used in place of the word OR.
To search for features that contain either "Orange County" or "Orange" use the following query:
"orange county" orange
or
"orange county" O
The "+" or required operator requires that the term after the "+" symbol exist somewhere in the attribute of a standard geography feature.
To search for features that must contain "Orange" and may contain "County" use the following query:
+
The NOT operator excludes features that contain the term after NOT. The symbol "!" can be used in place of the word NOT.
To search for features that contain "orange" but not "county" use the following query:
"orange" NO
Grouping
Search supports using parentheses to group clauses to form subqueries. This can be useful if you want to control the Boolean logic for a query.
To search for either "Orange" or "Riverside" and "CA" use the following query:
(
Search supports using parentheses to group multiple clauses to a single field.
To search for a feature that contains both the word "Orange" and the phrase "County" use the query:
NAME
Escaping Special Characters
Search supports escaping special characters that are part of the query syntax. The available special characters are as follows:
+ - && || ! ( ) { } [ ] ^ " ~ * ? : \
To escape these characters, use the \ before the character.
Additional notes
- Use the
geography
parameter to define which layers are being searched.Layers - You can search more than one layer if the
geography
parameter is provided with multiple layers.Layers - To achieve optimal performance, it is strongly recommended that at least one layer is defined in the
geography
parameter.Layers - If
source
is blank, at least one layer must be defined in theCountry geography
parameter.Layers - If no
geography
are provided, all standard geography layers will be searched withinLayers source
. This will adversely affect performance.Country - If the
use
parameter is set to false, a standard text search is performed for all text submitted with theFuzzy Search geography
parameter.Query - If the
use
parameter is set to true, all words submitted withFuzzy Search geography
will be searched with fuzzy logic.Query - Searches within the geography query are not case sensitive
returnSubGeographyLayer
Use this optional parameter to return all the subgeographic areas that are within a parent geography. For example, you could return all the U.S. counties for a given U.S. state or you could return all the Canadian postal areas (FSAs) within a Census Metropolitan Area (city).
When this parameter is set to true, the output features will be defined in the sub
. The output geometries will be in the spatial reference system defined by out
.
Default value
false
The output geometries will not be returned with each feature in the response.
Example
Request the output geometries in the response:
return
Additional notes
- If
return
is set to true, you must define aSub Geography Layer sub
Geography Layer
subGeographyLayer
Use this optional parameter to return all the subgeographic areas that are within a parent geography—for example, you could return all the U.S. counties within a given U.S. state or you could return all the Canadian postal areas (FSAs) within a Census Metropolitan Areas (city) feature.
Default value
(null or empty)
Examples
Example 1 - Request U.S. county features to be returned within the defined U.S. states when geographyLayers=[“US.States”]:
sub
Example 2 - Request Canadian FSAs features (postal areas) to be returned within the defined metropolitan areas geographyLayers=[“ CAN.CMACA”]:
sub
Additional notes
- You can only set this parameter if
return
is set to true.Sub Geography Layer - The list of available standard geography levels and their associated IDs is listed in the coverage section.
- If
return
is set to true, this parameter is no longer optional; you must define aSub Geography Layer sub
.Geography Layer
subGeographyQuery
Optional parameter to filter the results of the subgeography features that are returned by a search term. You can use this parameter to query and find subgeography features that meet an input term.
This parameter is used to filter the list of subgeography features that are within a parent geography—for example, you may want a list of all the ZIP Codes that are within “San Diego County” and filter the results so that only ZIP Codes that start with “921” are included in the output response. The subgeography query is a string that contains one or more words.
Default value
(null or empty)
Example
Return all the ZIP Codes that start with “921”:
sub
Additional notes
- The syntax and supported operations for
sub
are the same asGeography Layer geography
.Layer - Consult the
geography
parameter documentation to get information on supported search operators.Query - The
sub
can only be defined ifGeography Layer return
is set to true and aSub Geography Layer sub
is defined.Geography Layer - If the
use
parameter is set to false, a standard text search is performed for all text submitted with theFuzzy Search sub
parameter.Geography Query - If the
return
parameter is set to true, all words submitted withSub Geography Layer sub
will be searched with fuzzy logic.Geography Query - Searches within the geography query are not case sensitive.
outSR
Optional parameter to request the output geometries in a specified spatial reference system.
When return
is set to true, this optional parameter can be specified to explicitly indicate the spatial reference system of the output geometry. The parameter value may be specified as the well-known ID describing the projected coordinate system or geographic coordinate system.
Default value
4326
The standard latitude and longitude-based geographic coordinate system based on the WGS 1984 datum will be used.
Example
Specify the output geometry in the Web Mercator (Auxiliary Sphere) projected coordinate system based on the WGS 1984 datum:
out
Additional notes
- For a list of valid WKID values, see Projected coordinate systems and Geographic coordinate systems.
returnGeometry
Optional parameter to request the output geometries in the response.
When this parameter is set to true, the output geometries associated with each feature will be included in the response. The output geometries will be in the spatial reference system defined by out
.
Default value
false
The output geometries will not be returned with each feature in the response.
Example
Request the output geometries in the response:
return
Additional notes
- Requesting output geometries can significantly increase the payload size of the output response which will increase the amount of time it takes to receive the response and negatively affect the speed and performance of any client applications consuming the service.
returnCentroids
Optional parameter to request the output geometry to return the center point for each feature. Use this parameter to return all the geometries as points—for example, you could return all U.S. ZIP Code centroids (points) rather than providing the boundaries.
When this parameter is set to true, the output features will be returned as points. The output geometries will be in the spatial reference system defined by out
.
Default value
false
Example
Request the output point geometries in the response:
return
Additional notes
- The center of each point will be returned for standard geographic areas.
- This parameter can only be set to true if the
return
parameter is also set to true.Geometry
generalizationLevel
Optional integer parameter that specifies the level of generalization or detail in the area representations of the administrative boundary or standard geographic data layers. Values must be whole integers from 0 through 2, where 0 is most detailed and 2 is most generalized.
Default value
0
Examples
Example 1 - Request the most detailed output geometry:
generalization
Example 2 - Request the most generalized output geometry:
generalization
Additional notes
-
A
generalization
of 0 will return the most detailed and precise polygon area features.Level -
Bandwidth "cost", for detailed features, will be greater and may lead to performance issues with many client applications depending on the number and size of the features in the query of the service request.
-
A
generalization
of 2 will produce a smaller and less detailed polygon.Level -
Less detailed features may not look as precise or match the shoreline of basemaps.
useFuzzySearch
Optional parameter to define if text provided in the geography
parameter should utilize fuzzy search logic. Fuzzy searches are based on the Levenshtein Distance or Edit Distance algorithm.
Using this approach will also help find matches for common misspellings—for example, the state of California can be found if the state name is spelled incorrectly with Californa
.
The output response has a Score field that specifies how similar the output attribute is to the input text. Values range from 0 to 100. A score of 100 indicates a perfect string match.
Default value
false
Example
use
Additional notes
- If this parameter is set to false, a standard text search is performed for all text submitted with the
geography
parameter.Query - If this parameter is set to true, all words submitted with
geography
will be searched with fuzzy logic.Query - More discussion about the fuzzy search capabilities are found in the
geography
parameter documentation.Query
featureLimit
Optional integer value where you can limit the number of features that are returned from the geography
parameter.
Default value
1000
Example
Request the output geometries in the response:
feature
Additional notes
- The Standard Geography Query service has a maximum of 5000 features.
- The
feature
parameter cannot exceed this maximum.Limit - The
feature
used with theLimit feature
parameter supports pagination of StandardGeographyQuery results.Offset
featureOffset
Start the results on the number of the record specified.
Default value
0.
This parameter supports pagination of StandardGeographyQuery results in combination with the featureLimit parameter.
langCode
Optional parameter that specifies the language you wish to receive your GeoEnrichment results. The availability to use this parameter is determined by the data which is available within your study area.
Default value
en (English)
Example
Request a result to be returned in Portuguese:
lang
outFields
Optional parameter that returns only the requested fields.
Default value
(null or empty)
returnCountOnly
Optional parameter that returns a count of features within a parent geography. For example, return a count of census tracts within a state.
Values: true
| false
Default value
false
Example 1
Return a count of Census Tracts in California:
Request
https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/StandardGeographyQuery?sourcecountry=US&geographylayers=US.States&geographyids=06&returnsubgeographylayer=true&subgeographylayers=US.Tracts&returncountonly=true&f=json
JSON response
{"results":[{"layerID":"US.Tracts","featureCount":9110}],"messages":[]}
Additional notes
- This parameter can be used together with the
return
and theSub Geography Layer sub
parameters.Geography Layer
f
Optional parameter to specify the output response format.
Default value
json
The output response will be returned in HTML format.
Example
Request the output geometries in JSON format:
f=json
Additional notes
- Supported formats include JSON and XML.
Example usage
Example 1: Get a list of all available geographic boundary data layers in the Canada dataset.
https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/Geoenrichment/StandardGeographyLevels/Canada?f=pjson
JSON response example 1
{
"geographyLevels" : [ {
"countryID" : "CA",
"countryName" : "Canada",
"datasets" : [ {
"datasetID" : "CAN_ESRI_2017",
"branches" : [ {
"id" : "CAN.WholeCanada",
"name" : "Entire Country",
"levels" : [ "CAN.WholeCanada" ]
}, {
"id" : "CANbyPR",
"name" : "Provinces",
"levels" : [ "CAN.PR" ]
}, {
"id" : "CANbyPRbyFED",
"name" : "Provinces by Federal Electoral Districts",
"levels" : [ "CAN.PR", "CAN.FED" ]
}, {
"id" : "CANbyPRbyCD",
"name" : "Provinces by Census Divisions",
"levels" : [ "CAN.PR", "CAN.CD" ]
}, {
"id" : "CANbyPRbyCSD",
"name" : "Provinces by Census Subdivisions",
"levels" : [ "CAN.PR", "CAN.CSD" ]
}, {
"id" : "CANbyPRbyCDbyCSD",
"name" : "Provinces by CDs by Census Subdivisions",
"levels" : [ "CAN.PR", "CAN.CD", "CAN.CSD" ]
}, {
"id" : "CANbyPRbyCMA",
"name" : "Provinces by Census Metropolitan Areas",
"levels" : [ "CAN.PR", "CAN.CMACA" ]
}, {
"id" : "CANbyPRbyCDbyCT",
"name" : "Provinces by CDs by Census Tracts",
"levels" : [ "CAN.PR", "CAN.CD", "CAN.CT" ]
}, {
"id" : "CANbyPRbyCSDbyCT",
"name" : "Provinces by CSDs by Census Tracts",
"levels" : [ "CAN.PR", "CAN.CSD", "CAN.CT" ]
}, {
"id" : "CANbyPRbyCMAbyCT",
"name" : "Provinces by CMA/CA by Census Tracts",
"levels" : [ "CAN.PR", "CAN.CMACA", "CAN.CT" ]
}, {
"id" : "CANbyPRbyCDbyFSA",
"name" : "Provinces by CDs by FSAs",
"levels" : [ "CAN.PR", "CAN.CD", "CAN.FSA" ]
}, {
"id" : "CANbyPRbyCSDbyFSA",
"name" : "Provinces by CSDs by FSAs",
"levels" : [ "CAN.PR", "CAN.CSD", "CAN.FSA" ]
}, {
"id" : "CANbyPRbyCMAbyFSA",
"name" : "Provinces by CMA/CAs by FSAs",
"levels" : [ "CAN.PR", "CAN.CMACA", "CAN.FSA" ]
}, {
"id" : "CANbyPRbyFSA",
"name" : "Provinces by FSAs",
"levels" : [ "CAN.PR", "CAN.FSA" ]
}, {
"id" : "CANbyPRbyCDbyDA",
"name" : "Provinces by CD by Dissemination Areas",
"levels" : [ "CAN.PR", "CAN.CD", "CAN.DA" ]
}, {
"id" : "CANbyPRbyCMAbyDA",
"name" : "Provinces by CMA/CA by Dissemination Areas",
"levels" : [ "CAN.PR", "CAN.CMACA", "CAN.DA" ]
}, {
"id" : "CANbyPRbyFEDbyDA",
"name" : "Provinces by FED by Dissemination Areas",
"levels" : [ "CAN.PR", "CAN.FED", "CAN.DA" ]
}, {
"id" : "CANbyPRbyFSAbyDA",
"name" : "Provinces by FSA by Dissemination Areas",
"levels" : [ "CAN.PR", "CAN.FSA", "CAN.DA" ]
} ],
"levels" : [ {
"id" : "CAN.WholeCanada",
"name" : "Whole Canada",
"isWholeCountry" : true,
"adminLevel" : "Admin1",
"singularName" : "Whole Canada",
"pluralName" : "Whole Canada"
}, {
"id" : "CAN.PR",
"name" : "Province and Territories (PRs)",
"isWholeCountry" : false,
"adminLevel" : "Admin2",
"singularName" : "Province and Territories (PRs)",
"pluralName" : "Province and Territories (PRs)"
}, {
"id" : "CAN.FED",
"name" : "Federal Electoral Districts (FEDs)",
"isWholeCountry" : false,
"adminLevel" : "Admin3",
"singularName" : "Federal Electoral Districts (FEDs)",
"pluralName" : "Federal Electoral Districts (FEDs)"
}, {
"id" : "CAN.CD",
"name" : "Census Divisions (CDs)",
"isWholeCountry" : false,
"adminLevel" : "Admin4",
"singularName" : "Census Divisions (CDs)",
"pluralName" : "Census Divisions (CDs)"
}, {
"id" : "CAN.CSD",
"name" : "Census Subdivisions (CSDs)",
"isWholeCountry" : false,
"adminLevel" : "Admin5",
"singularName" : "Census Subdivisions (CSDs)",
"pluralName" : "Census Subdivisions (CSDs)"
}, {
"id" : "CAN.CMACA",
"name" : "Census Metropolitan/Census Agglomeration Areas (CMA/CAs)",
"isWholeCountry" : false,
"adminLevel" : "Admin6",
"singularName" : "Census Metropolitan/Census Agglomeration Areas (CMA/CAs)",
"pluralName" : "Census Metropolitan/Census Agglomeration Areas (CMA/CAs)"
}, {
"id" : "CAN.CT",
"name" : "Census Tracts (CTs)",
"isWholeCountry" : false,
"adminLevel" : "Admin7",
"singularName" : "Census Tracts (CTs)",
"pluralName" : "Census Tracts (CTs)"
}, {
"id" : "CAN.FSA",
"name" : "Forward Sortation Areas (FSAs)",
"isWholeCountry" : false,
"adminLevel" : "Admin8",
"singularName" : "Forward Sortation Areas (FSAs)",
"pluralName" : "Forward Sortation Areas (FSAs)"
}, {
"id" : "CAN.DA",
"name" : "Dissemination Areas (DAs)",
"isWholeCountry" : false,
"adminLevel" : "Admin9",
"singularName" : "Dissemination Areas (DAs)",
"pluralName" : "Dissemination Areas (DAs)"
} ]
}, {
"datasetID" : "CAN_CPY_2017",
"branches" : [ {
"id" : "CAN.WholeCanada",
"name" : "Entire Country",
"levels" : [ "CAN.WholeCanada" ]
}, {
"id" : "CANbyPR",
"name" : "Province and Territories (PRs)",
"levels" : [ "CAN.PR" ]
}, {
"id" : "CANbyPRbyFED",
"name" : "Provinces by Federal Electoral Districts",
"levels" : [ "CAN.PR", "CAN.FED" ]
}, {
"id" : "CANbyPRbyCD",
"name" : "Provinces by Census Divisions",
"levels" : [ "CAN.PR", "CAN.CD" ]
}, {
"id" : "CANbyPRbyCSD",
"name" : "Provinces by Census Subdivisions",
"levels" : [ "CAN.PR", "CAN.CSD" ]
}, {
"id" : "CANbyPRbyCMA",
"name" : "Provinces by Census Metropolitan Areas",
"levels" : [ "CAN.PR", "CAN.CMACA" ]
}, {
"id" : "CANbyPRbyCDbyCT",
"name" : "Provinces by CDs by Census Tracts",
"levels" : [ "CAN.PR", "CAN.CD", "CAN.CT" ]
}, {
"id" : "CANbyPRbyCMAbyCT",
"name" : "Provinces by CMA/CA by Census Tracts",
"levels" : [ "CAN.PR", "CAN.CMACA", "CAN.CT" ]
}, {
"id" : "CANbyPRbyCSDbyCT",
"name" : "Provinces by CSDs by Census Tracts",
"levels" : [ "CAN.PR", "CAN.CSD", "CAN.CT" ]
}, {
"id" : "CANbyPRbyCDbyFSA",
"name" : "Provinces by CDs by FSAs",
"levels" : [ "CAN.PR", "CAN.CD", "CAN.FSA" ]
}, {
"id" : "CANbyPRbyCMAbyFSA",
"name" : "Provinces by CMA/CAs by FSAs",
"levels" : [ "CAN.PR", "CAN.CMACA", "CAN.FSA" ]
}, {
"id" : "CANbyPRbyCSDbyFSA",
"name" : "Provinces by CSDs by FSAs",
"levels" : [ "CAN.PR", "CAN.CSD", "CAN.FSA" ]
}, {
"id" : "CANbyPRbyFSA",
"name" : "Provinces by FSAs",
"levels" : [ "CAN.PR", "CAN.FSA" ]
}, {
"id" : "CANbyPRbyCDbyDA",
"name" : "Provinces by CD by Dissemination Areas",
"levels" : [ "CAN.PR", "CAN.CD", "CAN.DA" ]
}, {
"id" : "CANbyPRbyCMAbyDA",
"name" : "Provinces by CMA/CA by Dissemination Areas",
"levels" : [ "CAN.PR", "CAN.CMACA", "CAN.DA" ]
}, {
"id" : "CANbyPRbyFEDbyDA",
"name" : "Provinces by FED by Dissemination Areas",
"levels" : [ "CAN.PR", "CAN.FED", "CAN.DA" ]
}, {
"id" : "CANbyPRbyFSAbyDA",
"name" : "Provinces by FSA by Dissemination Areas",
"levels" : [ "CAN.PR", "CAN.FSA", "CAN.DA" ]
} ],
"levels" : [ {
"id" : "CAN.WholeCanada",
"name" : "Whole Canada",
"isWholeCountry" : true,
"adminLevel" : "Admin1",
"singularName" : "Whole Canada",
"pluralName" : "Whole Canada"
}, {
"id" : "CAN.PR",
"name" : "Province and Territories (PRs)",
"isWholeCountry" : false,
"adminLevel" : "Admin2",
"singularName" : "Province and Territories (PRs)",
"pluralName" : "Province and Territories (PRs)"
}, {
"id" : "CAN.FED",
"name" : "Federal Electoral Districts (FEDs)",
"isWholeCountry" : false,
"adminLevel" : "Admin3",
"singularName" : "Federal Electoral Districts (FEDs)",
"pluralName" : "Federal Electoral Districts (FEDs)"
}, {
"id" : "CAN.CD",
"name" : "Census Divisions (CDs)",
"isWholeCountry" : false,
"adminLevel" : "Admin4",
"singularName" : "Census Divisions (CDs)",
"pluralName" : "Census Divisions (CDs)"
}, {
"id" : "CAN.CSD",
"name" : "Census Subdivisions (CSDs)",
"isWholeCountry" : false,
"adminLevel" : "Admin5",
"singularName" : "Census Subdivisions (CSDs)",
"pluralName" : "Census Subdivisions (CSDs)"
}, {
"id" : "CAN.CMACA",
"name" : "Census Metropolitan/Census Agglomeration Areas (CMA/CAs)",
"isWholeCountry" : false,
"adminLevel" : "Admin6",
"singularName" : "Census Metropolitan/Census Agglomeration Areas (CMA/CAs)",
"pluralName" : "Census Metropolitan/Census Agglomeration Areas (CMA/CAs)"
}, {
"id" : "CAN.CT",
"name" : "Census Tracts (CTs)",
"isWholeCountry" : false,
"adminLevel" : "Admin7",
"singularName" : "Census Tracts (CTs)",
"pluralName" : "Census Tracts (CTs)"
}, {
"id" : "CAN.FSA",
"name" : "Forward Sortation Areas (FSAs)",
"isWholeCountry" : false,
"adminLevel" : "Admin8",
"singularName" : "Forward Sortation Areas (FSAs)",
"pluralName" : "Forward Sortation Areas (FSAs)"
}, {
"id" : "CAN.DA",
"name" : "Dissemination Areas (DAs)",
"isWholeCountry" : false,
"adminLevel" : "Admin9",
"singularName" : "Dissemination Areas (DAs)",
"pluralName" : "Dissemination Areas (DAs)"
} ]
} ],
"hierarchies" : [ {
"ID" : "census",
"branches" : [ {
"id" : "CAN.WholeCanada",
"name" : "Entire Country",
"levels" : [ "CAN.WholeCanada" ]
}, {
"id" : "CANbyPR",
"name" : "Provinces",
"levels" : [ "CAN.PR" ]
}, {
"id" : "CANbyPRbyFED",
"name" : "Provinces by Federal Electoral Districts",
"levels" : [ "CAN.PR", "CAN.FED" ]
}, {
"id" : "CANbyPRbyCD",
"name" : "Provinces by Census Divisions",
"levels" : [ "CAN.PR", "CAN.CD" ]
}, {
"id" : "CANbyPRbyCSD",
"name" : "Provinces by Census Subdivisions",
"levels" : [ "CAN.PR", "CAN.CSD" ]
}, {
"id" : "CANbyPRbyCDbyCSD",
"name" : "Provinces by CDs by Census Subdivisions",
"levels" : [ "CAN.PR", "CAN.CD", "CAN.CSD" ]
}, {
"id" : "CANbyPRbyCMA",
"name" : "Provinces by Census Metropolitan Areas",
"levels" : [ "CAN.PR", "CAN.CMACA" ]
}, {
"id" : "CANbyPRbyCDbyCT",
"name" : "Provinces by CDs by Census Tracts",
"levels" : [ "CAN.PR", "CAN.CD", "CAN.CT" ]
}, {
"id" : "CANbyPRbyCSDbyCT",
"name" : "Provinces by CSDs by Census Tracts",
"levels" : [ "CAN.PR", "CAN.CSD", "CAN.CT" ]
}, {
"id" : "CANbyPRbyCMAbyCT",
"name" : "Provinces by CMA/CA by Census Tracts",
"levels" : [ "CAN.PR", "CAN.CMACA", "CAN.CT" ]
}, {
"id" : "CANbyPRbyCDbyFSA",
"name" : "Provinces by CDs by FSAs",
"levels" : [ "CAN.PR", "CAN.CD", "CAN.FSA" ]
}, {
"id" : "CANbyPRbyCSDbyFSA",
"name" : "Provinces by CSDs by FSAs",
"levels" : [ "CAN.PR", "CAN.CSD", "CAN.FSA" ]
}, {
"id" : "CANbyPRbyCMAbyFSA",
"name" : "Provinces by CMA/CAs by FSAs",
"levels" : [ "CAN.PR", "CAN.CMACA", "CAN.FSA" ]
}, {
"id" : "CANbyPRbyFSA",
"name" : "Provinces by FSAs",
"levels" : [ "CAN.PR", "CAN.FSA" ]
}, {
"id" : "CANbyPRbyCDbyDA",
"name" : "Provinces by CD by Dissemination Areas",
"levels" : [ "CAN.PR", "CAN.CD", "CAN.DA" ]
}, {
"id" : "CANbyPRbyCMAbyDA",
"name" : "Provinces by CMA/CA by Dissemination Areas",
"levels" : [ "CAN.PR", "CAN.CMACA", "CAN.DA" ]
}, {
"id" : "CANbyPRbyFEDbyDA",
"name" : "Provinces by FED by Dissemination Areas",
"levels" : [ "CAN.PR", "CAN.FED", "CAN.DA" ]
}, {
"id" : "CANbyPRbyFSAbyDA",
"name" : "Provinces by FSA by Dissemination Areas",
"levels" : [ "CAN.PR", "CAN.FSA", "CAN.DA" ]
} ],
"levels" : [ {
"id" : "CAN.WholeCanada",
"name" : "Whole Canada",
"isWholeCountry" : true,
"adminLevel" : "Admin1",
"singularName" : "Whole Canada",
"pluralName" : "Whole Canada"
}, {
"id" : "CAN.PR",
"name" : "Province and Territories (PRs)",
"isWholeCountry" : false,
"adminLevel" : "Admin2",
"singularName" : "Province and Territories (PRs)",
"pluralName" : "Province and Territories (PRs)"
}, {
"id" : "CAN.FED",
"name" : "Federal Electoral Districts (FEDs)",
"isWholeCountry" : false,
"adminLevel" : "Admin3",
"singularName" : "Federal Electoral Districts (FEDs)",
"pluralName" : "Federal Electoral Districts (FEDs)"
}, {
"id" : "CAN.CD",
"name" : "Census Divisions (CDs)",
"isWholeCountry" : false,
"adminLevel" : "Admin4",
"singularName" : "Census Divisions (CDs)",
"pluralName" : "Census Divisions (CDs)"
}, {
"id" : "CAN.CSD",
"name" : "Census Subdivisions (CSDs)",
"isWholeCountry" : false,
"adminLevel" : "Admin5",
"singularName" : "Census Subdivisions (CSDs)",
"pluralName" : "Census Subdivisions (CSDs)"
}, {
"id" : "CAN.CMACA",
"name" : "Census Metropolitan/Census Agglomeration Areas (CMA/CAs)",
"isWholeCountry" : false,
"adminLevel" : "Admin6",
"singularName" : "Census Metropolitan/Census Agglomeration Areas (CMA/CAs)",
"pluralName" : "Census Metropolitan/Census Agglomeration Areas (CMA/CAs)"
}, {
"id" : "CAN.CT",
"name" : "Census Tracts (CTs)",
"isWholeCountry" : false,
"adminLevel" : "Admin7",
"singularName" : "Census Tracts (CTs)",
"pluralName" : "Census Tracts (CTs)"
}, {
"id" : "CAN.FSA",
"name" : "Forward Sortation Areas (FSAs)",
"isWholeCountry" : false,
"adminLevel" : "Admin8",
"singularName" : "Forward Sortation Areas (FSAs)",
"pluralName" : "Forward Sortation Areas (FSAs)"
}, {
"id" : "CAN.DA",
"name" : "Dissemination Areas (DAs)",
"isWholeCountry" : false,
"adminLevel" : "Admin9",
"singularName" : "Dissemination Areas (DAs)",
"pluralName" : "Dissemination Areas (DAs)"
} ]
} ]
} ]
}
Notes:
- The response has been abbreviated in the example where "..." is noted.
Request example 2
Return the province of Ontario in Canada by its Census ID.
https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/StandardGeographyQuery/execute?sourceCountry=CA&geographylayers=["CAN.PR"]&geographyids=["35"]&f=pjson
JSON response example 2
{
"results" : [ {
"paramName" : "RecordSet",
"dataType" : "GPFeatureRecordSetLayer",
"value" : {
"displayFieldName" : "",
"fieldAliases" : {
"DatasetID" : "DatasetID",
"DataLayerID" : "DataLayerID",
"AreaID" : "AreaID",
"AreaName" : "AreaName",
"MajorSubdivisionName" : "MajorSubdivisionName",
"MajorSubdivisionAbbr" : "MajorSubdivisionAbbr",
"MajorSubdivisionType" : "MajorSubdivisionType",
"CountryAbbr" : "CountryAbbr",
"Score" : "Score",
"ObjectId" : "ObjectId"
},
"fields" : [ {
"name" : "DatasetID",
"type" : "esriFieldTypeString",
"alias" : "DatasetID",
"length" : 256
}, {
"name" : "DataLayerID",
"type" : "esriFieldTypeString",
"alias" : "DataLayerID",
"length" : 256
}, {
"name" : "AreaID",
"type" : "esriFieldTypeString",
"alias" : "AreaID",
"length" : 256
}, {
"name" : "AreaName",
"type" : "esriFieldTypeString",
"alias" : "AreaName",
"length" : 256
}, {
"name" : "MajorSubdivisionName",
"type" : "esriFieldTypeString",
"alias" : "MajorSubdivisionName",
"length" : 256
}, {
"name" : "MajorSubdivisionAbbr",
"type" : "esriFieldTypeString",
"alias" : "MajorSubdivisionAbbr",
"length" : 256
}, {
"name" : "MajorSubdivisionType",
"type" : "esriFieldTypeString",
"alias" : "MajorSubdivisionType",
"length" : 256
}, {
"name" : "CountryAbbr",
"type" : "esriFieldTypeString",
"alias" : "CountryAbbr",
"length" : 256
}, {
"name" : "Score",
"type" : "esriFieldTypeInteger",
"alias" : "Score"
}, {
"name" : "ObjectId",
"type" : "esriFieldTypeOID",
"alias" : "ObjectId"
} ],
"features" : [ {
"attributes" : {
"DatasetID" : "CAN_ESRI_2017",
"DataLayerID" : "CAN.PR",
"AreaID" : "35",
"AreaName" : "Ontario",
"MajorSubdivisionName" : "Ontario",
"MajorSubdivisionAbbr" : "ON",
"MajorSubdivisionType" : "Province & Territories",
"CountryAbbr" : "CA",
"Score" : 100,
"ObjectId" : 1
}
} ]
}
} ],
"messages" : [ ]
}
Notes:
- Returns the attributes for all matching province IDs.
- No geometry is returned by default.
Request example 3
Return two U.S. ZIP Codes and return the polygon geometry for each feature.
https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/StandardGeographyQuery/execute?sourceCountry=US&geographylayers=["US.ZIP5"]&geographyids=["92129","92126"]&returnGeometry=true&f=pjson
JSON response example 3
{
"results" : [ {
"paramName" : "RecordSet",
"dataType" : "GPFeatureRecordSetLayer",
"value" : {
"displayFieldName" : "",
"fieldAliases" : {
"DatasetID" : "DatasetID",
"DataLayerID" : "DataLayerID",
"AreaID" : "AreaID",
"AreaName" : "AreaName",
"MajorSubdivisionName" : "MajorSubdivisionName",
"MajorSubdivisionAbbr" : "MajorSubdivisionAbbr",
"MajorSubdivisionType" : "MajorSubdivisionType",
"CountryAbbr" : "CountryAbbr",
"Score" : "Score",
"ObjectId" : "ObjectId"
},
"geometryType" : "esriGeometryPolygon",
"spatialReference" : {
"wkid" : 4326,
"latestWkid" : 4326
},
"fields" : [ {
"name" : "DatasetID",
"type" : "esriFieldTypeString",
"alias" : "DatasetID",
"length" : 256
}, {
"name" : "DataLayerID",
"type" : "esriFieldTypeString",
"alias" : "DataLayerID",
"length" : 256
}, {
"name" : "AreaID",
"type" : "esriFieldTypeString",
"alias" : "AreaID",
"length" : 256
}, {
"name" : "AreaName",
"type" : "esriFieldTypeString",
"alias" : "AreaName",
"length" : 256
}, {
"name" : "MajorSubdivisionName",
"type" : "esriFieldTypeString",
"alias" : "MajorSubdivisionName",
"length" : 256
}, {
"name" : "MajorSubdivisionAbbr",
"type" : "esriFieldTypeString",
"alias" : "MajorSubdivisionAbbr",
"length" : 256
}, {
"name" : "MajorSubdivisionType",
"type" : "esriFieldTypeString",
"alias" : "MajorSubdivisionType",
"length" : 256
}, {
"name" : "CountryAbbr",
"type" : "esriFieldTypeString",
"alias" : "CountryAbbr",
"length" : 256
}, {
"name" : "Score",
"type" : "esriFieldTypeInteger",
"alias" : "Score"
}, {
"name" : "ObjectId",
"type" : "esriFieldTypeOID",
"alias" : "ObjectId"
} ],
"features" : [ {
"attributes" : {
"DatasetID" : "USA_ESRI_2018",
"DataLayerID" : "US.ZIP5",
"AreaID" : "92126",
"AreaName" : "San Diego",
"MajorSubdivisionName" : "California",
"MajorSubdivisionAbbr" : "CA",
"MajorSubdivisionType" : "state",
"CountryAbbr" : "US",
"Score" : 100,
"ObjectId" : 1
},
"geometry" : {
"rings": [
[
[
-117.16557000032131,
32.941089999986
],
[
-117.16779000047586,
32.9396300002327
],
...
[
-117.16557000032131,
32.941089999986
]
]
]
}
},
{
"attributes" : {
"DatasetID" : "USA_ESRI_2018",
"DataLayerID" : "US.ZIP5",
"AreaID" : "92129",
"AreaName" : "San Diego",
"MajorSubdivisionName" : "California",
"MajorSubdivisionAbbr" : "CA",
"MajorSubdivisionType" : "state",
"CountryAbbr" : "US",
"Score" : 100,
"ObjectId" : 2
},
"geometry" : {
"rings": [
[
[
-117.1080300000784,
32.99997000006303
],
[
-117.10858999994744,
32.99889999993061
],
...
[
-117.1080300000784,
32.99997000006303
]
]
]
}
}
]
}
}
],
"messages": [
]
}
Notes:
- The response has been abbreviated in the example where "..." is noted.
- Returns the attributes and geometry for both U.S. ZIP Codes.
- Because the generalization level was not set, the most detailed boundary is returned for each ZIP Code.
JSON response rendered with ArcGIS for Desktop.

Notes:
- Transparency and fill properties have been adjusted for illustrative purposes.
Request example 4
Return the same two U.S. ZIP Codes in example 3, returning a more generalized geometry for each feature.
https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/StandardGeographyQuery/execute?sourceCountry=US&geographylayers=["US.ZIP5"]&geographyids=["92129","92126"]&returnGeometry=true&generalizationLevel=2&f=pjson
JSON response example 4
{
"results": [
{
"paramName": "RecordSet",
"dataType": "GPFeatureRecordSetLayer",
"value": {
"displayFieldName": "",
"fieldAliases": {
"DatasetID": "DatasetID",
"DataLayerID": "DataLayerID",
"AreaID": "AreaID",
"AreaName": "AreaName",
"MajorSubdivisionName": "MajorSubdivisionName",
"MajorSubdivisionAbbr": "MajorSubdivisionAbbr",
"MajorSubdivisionType": "MajorSubdivisionType",
"CountryAbbr": "CountryAbbr",
"Score": "Score",
"ObjectId": "ObjectId"
},
"geometryType": "esriGeometryPolygon",
"spatialReference": {
"wkid": 4326,
"latestWkid": 4326
},
"fields": [
{
"name": "DatasetID",
"type": "esriFieldTypeString",
"alias": "DatasetID",
"length": 256
},
{
"name": "DataLayerID",
"type": "esriFieldTypeString",
"alias": "DataLayerID",
"length": 256
},
{
"name": "AreaID",
"type": "esriFieldTypeString",
"alias": "AreaID",
"length": 256
},
{
"name": "AreaName",
"type": "esriFieldTypeString",
"alias": "AreaName",
"length": 256
},
{
"name": "MajorSubdivisionName",
"type": "esriFieldTypeString",
"alias": "MajorSubdivisionName",
"length": 256
},
{
"name": "MajorSubdivisionAbbr",
"type": "esriFieldTypeString",
"alias": "MajorSubdivisionAbbr",
"length": 256
},
{
"name": "MajorSubdivisionType",
"type": "esriFieldTypeString",
"alias": "MajorSubdivisionType",
"length": 256
},
{
"name": "CountryAbbr",
"type": "esriFieldTypeString",
"alias": "CountryAbbr",
"length": 256
},
{
"name": "Score",
"type": "esriFieldTypeInteger",
"alias": "Score"
},
{
"name": "ObjectId",
"type": "esriFieldTypeOID",
"alias": "ObjectId"
}
],
"features": [
{
"attributes": {
"DatasetID": "USA_ESRI_2018",
"DataLayerID": "US.ZIP5",
"AreaID": "92126",
"AreaName": "San Diego",
"MajorSubdivisionName": "California",
"MajorSubdivisionAbbr": "CA",
"MajorSubdivisionType": "state",
"CountryAbbr": "US",
"Score": 100,
"ObjectId": 1
},
"geometry": {
"rings": [
[
[
-117.12905000032795,
32.93618999945114
],
[
-117.13126000037254,
32.927820000352504
],
[
-117.11143000063073,
32.93665999977907
],
[
-117.11618999996674,
32.91718999977276
],
[
-117.1175999993001,
32.917330000164156
],
[
-117.11604000011407,
32.91702000018473
],
[
-117.11621999939824,
32.89588999966271
],
[
-117.11385999950102,
32.88990999977344
],
[
-117.10876000001997,
32.88058000004045
],
[
-117.12239999997422,
32.89374000018967
],
[
-117.1597800004402,
32.87994000005422
],
[
-117.1527399993916,
32.8889999996119
],
[
-117.16767000005477,
32.88860999948336
],
[
-117.16003999970563,
32.89840999984923
],
[
-117.17299999936974,
32.91406000053481
],
[
-117.1539799995508,
32.92262000014717
],
[
-117.17523000053255,
32.91438000003097
],
[
-117.18483000008412,
32.92336999942418
],
[
-117.179249999817,
32.9394699999199
],
[
-117.16936000067015,
32.94326999981694
],
[
-117.1650800003236,
32.943290000237475
],
[
-117.16557000032131,
32.941089999986
],
[
-117.12905000032795,
32.93618999945114
]
]
]
}
},
{
"attributes": {
"DatasetID": "USA_ESRI_2018",
"DataLayerID": "US.ZIP5",
"AreaID": "92129",
"AreaName": "San Diego",
"MajorSubdivisionName": "California",
"MajorSubdivisionAbbr": "CA",
"MajorSubdivisionType": "state",
"CountryAbbr": "US",
"Score": 100,
"ObjectId": 2
},
"geometry": {
"rings": [
[
[
-117.09542999988096,
32.99780999950081
],
[
-117.0940099995393,
32.991550000020204
],
[
-117.0935714356084,
32.996743573029995
],
[
-117.08345000021228,
32.996830000426996
],
[
-117.08272000027068,
32.98699000044098
],
[
-117.08378000024737,
32.98260000007631
],
[
-117.10621999994027,
32.94836000009906
],
[
-117.11049000017684,
32.9394699999199
],
[
-117.11058000026807,
32.93945999927819
],
[
-117.11093999973474,
32.93828999932169
],
[
-117.1110999996973,
32.938090000189966
],
[
-117.11148999949381,
32.936850000453894
],
[
-117.11136999997106,
32.93683000008464
],
[
-117.11143000063073,
32.93665999977907
],
[
-117.13126000037254,
32.927820000352504
],
[
-117.12905000032795,
32.93618999945114
],
[
-117.16557000032131,
32.941089999986
],
[
-117.15780306170763,
32.95149911909684
],
[
-117.17460878996538,
32.95138778063692
],
[
-117.17073000046204,
32.966879999891034
],
[
-117.15645999986913,
32.96073999973539
],
[
-117.14639000053977,
32.97611999998058
],
[
-117.1112200001184,
32.99921999976013
],
[
-117.09542999988096,
32.99780999950081
]
]
]
}
}
]
}
}
],
"messages": [
]
}
Notes:
- Returns the attributes and geometry for both U.S. ZIP Codes.
- Polygons are returned with the 6th most set of generalized polygons.
JSON response rendered with ArcGIS for Desktop.

Notes:
- Transparency and fill properties have been adjusted for illustrative purposes.
Request example 5
Return the same two U.S. ZIP Codes in examples 3 and 4, but as point centroids for each feature.
https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/StandardGeographyQuery/execute?sourceCountry=US&geographylayers=["US.ZIP5"]&geographyids=["92129","92126"]&returnGeometry=true&returnCentroids=true&f=pjson
JSON response example 5
{
"results" : [ {
"paramName" : "RecordSet",
"dataType" : "GPFeatureRecordSetLayer",
"value" : {
"displayFieldName" : "",
"fieldAliases" : {
"DatasetID" : "DatasetID",
"DataLayerID" : "DataLayerID",
"AreaID" : "AreaID",
"AreaName" : "AreaName",
"MajorSubdivisionName" : "MajorSubdivisionName",
"MajorSubdivisionAbbr" : "MajorSubdivisionAbbr",
"MajorSubdivisionType" : "MajorSubdivisionType",
"CountryAbbr" : "CountryAbbr",
"Score" : "Score",
"ObjectId" : "ObjectId"
},
"geometryType" : "esriGeometryPolygon",
"spatialReference" : {
"wkid" : 4326,
"latestWkid" : 4326
},
"fields" : [ {
"name" : "DatasetID",
"type" : "esriFieldTypeString",
"alias" : "DatasetID",
"length" : 256
}, {
"name" : "DataLayerID",
"type" : "esriFieldTypeString",
"alias" : "DataLayerID",
"length" : 256
}, {
"name" : "AreaID",
"type" : "esriFieldTypeString",
"alias" : "AreaID",
"length" : 256
}, {
"name" : "AreaName",
"type" : "esriFieldTypeString",
"alias" : "AreaName",
"length" : 256
}, {
"name" : "MajorSubdivisionName",
"type" : "esriFieldTypeString",
"alias" : "MajorSubdivisionName",
"length" : 256
}, {
"name" : "MajorSubdivisionAbbr",
"type" : "esriFieldTypeString",
"alias" : "MajorSubdivisionAbbr",
"length" : 256
}, {
"name" : "MajorSubdivisionType",
"type" : "esriFieldTypeString",
"alias" : "MajorSubdivisionType",
"length" : 256
}, {
"name" : "CountryAbbr",
"type" : "esriFieldTypeString",
"alias" : "CountryAbbr",
"length" : 256
}, {
"name" : "Score",
"type" : "esriFieldTypeInteger",
"alias" : "Score"
}, {
"name" : "ObjectId",
"type" : "esriFieldTypeOID",
"alias" : "ObjectId"
} ],
"features" : [ {
"attributes" : {
"DatasetID" : "USA_ESRI_2018",
"DataLayerID" : "US.ZIP5",
"AreaID" : "92126",
"AreaName" : "San Diego",
"MajorSubdivisionName" : "California",
"MajorSubdivisionAbbr" : "CA",
"MajorSubdivisionType" : "state",
"CountryAbbr" : "US",
"Score" : 100,
"ObjectId" : 1
},
"geometry" : {
"x" : -117.14518412759737,
"y" : 32.91487807528496
}
}, {
"attributes" : {
"DatasetID" : "USA_ESRI_2018",
"DataLayerID" : "US.ZIP5",
"AreaID" : "92129",
"AreaName" : "San Diego",
"MajorSubdivisionName" : "California",
"MajorSubdivisionAbbr" : "CA",
"MajorSubdivisionType" : "state",
"CountryAbbr" : "US",
"Score" : 100,
"ObjectId" : 2
},
"geometry" : {
"x" : -117.12470540351119,
"y" : 32.96522667992019
}
} ]
}
} ],
"messages" : [ ]
}
Notes:
- Returns the attributes and geometry for both U.S. ZIP Codes.
- ZIP Code centroids are returned as the feature geometry for each postal area.
JSON response rendered with ArcGIS for Desktop.

Notes:
- Properties have been adjusted and labels added for illustrative purposes.
Request example 6
Return all the Census Tracts that are within Orange County, CA at the most generalized level.
https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/StandardGeographyQuery/execute?sourceCountry=US&geographylayers=["US.Counties"]&geographyids=["06059"]&returnGeometry=true&returnSubGeographyLayer=true&subGeographyLayer=US.Tracts&generalizationLevel=2&f=pjson
JSON response example 6
{
"results": [
{
"paramName": "RecordSet",
"dataType": "GPFeatureRecordSetLayer",
"value": {
"displayFieldName": "",
"fieldAliases": {
"DatasetID": "DatasetID",
"DataLayerID": "DataLayerID",
"AreaID": "AreaID",
"AreaName": "AreaName",
"MajorSubdivisionName": "MajorSubdivisionName",
"MajorSubdivisionAbbr": "MajorSubdivisionAbbr",
"MajorSubdivisionType": "MajorSubdivisionType",
"CountryAbbr": "CountryAbbr",
"Score": "Score",
"ObjectId": "ObjectId"
},
"geometryType": "esriGeometryPolygon",
"spatialReference": {
"wkid": 4326,
"latestWkid": 4326
},
"fields": [
{
"name": "DatasetID",
"type": "esriFieldTypeString",
"alias": "DatasetID",
"length": 256
},
{
"name": "DataLayerID",
"type": "esriFieldTypeString",
"alias": "DataLayerID",
"length": 256
},
{
"name": "AreaID",
"type": "esriFieldTypeString",
"alias": "AreaID",
"length": 256
},
{
"name": "AreaName",
"type": "esriFieldTypeString",
"alias": "AreaName",
"length": 256
},
{
"name": "MajorSubdivisionName",
"type": "esriFieldTypeString",
"alias": "MajorSubdivisionName",
"length": 256
},
{
"name": "MajorSubdivisionAbbr",
"type": "esriFieldTypeString",
"alias": "MajorSubdivisionAbbr",
"length": 256
},
{
"name": "MajorSubdivisionType",
"type": "esriFieldTypeString",
"alias": "MajorSubdivisionType",
"length": 256
},
{
"name": "CountryAbbr",
"type": "esriFieldTypeString",
"alias": "CountryAbbr",
"length": 256
},
{
"name": "Score",
"type": "esriFieldTypeInteger",
"alias": "Score"
},
{
"name": "ObjectId",
"type": "esriFieldTypeOID",
"alias": "ObjectId"
}
],
"features": [
{
"attributes": {
"DatasetID": "USA_ESRI_2018",
"DataLayerID": "US.Tracts",
"AreaID": "06059099310",
"AreaName": "060590993.10",
"MajorSubdivisionName": "California",
"MajorSubdivisionAbbr": "CA",
"MajorSubdivisionType": "state",
"CountryAbbr": "US",
"Score": 100,
"ObjectId": 1
},
"geometry": {
"rings": [
[
[
-118.01157000010346,
33.673070000491876
],
[
-118.00392999964441,
33.66758000066483
],
[
-118.0099429987435,
33.66168900122195
],
[
-118.00208499912142,
33.65499100152194
],
[
-118.000897000073,
33.65440600153587
],
[
-118.00116099956207,
33.65415500114209
],
[
-118.00138504442575,
33.653943356999264
],
[
-118.00593000007501,
33.65332000137979
],
[
-118.00366999948062,
33.655540000928724
],
[
-118.01880316533122,
33.66808481277071
],
[
-118.01804768541136,
33.66833791077235
],
[
-118.01758000060691,
33.668090002135784
],
[
-118.01226000050359,
33.67338000111805
],
[
-118.01206000010119,
33.673360001497194
],
[
-118.01157000010346,
33.673070000491876
]
]
]
}
},
{
"attributes": {
"DatasetID": "USA_ESRI_2018",
"DataLayerID": "US.Tracts",
"AreaID": "06059099311",
"AreaName": "060590993.11",
"MajorSubdivisionName": "California",
"MajorSubdivisionAbbr": "CA",
"MajorSubdivisionType": "state",
"CountryAbbr": "US",
"Score": 100,
"ObjectId": 2
},
"geometry": {
"rings": [
[
[
-118.00392999964441,
33.66758000066483
],
[
-117.99894999878784,
33.66402000080634
],
[
-117.9978397395449,
33.664020003049394
],
[
-117.99780999972816,
33.66402000080634
],
[
-117.99779999961822,
33.66010000156095
],
[
-117.99852000034814,
33.65922000060584
],
[
-117.99719999841105,
33.657830000916334
],
[
-117.99961999896802,
33.65551000200368
],
[
-117.99970000074592,
33.655390000964545
],
[
-118.000897000073,
33.65440600153587
],
[
-118.00208499912142,
33.65499100152194
],
[
-118.0099429987435,
33.66168900122195
],
[
-118.00392999964441,
33.66758000066483
]
]
]
}
},
...
{
"attributes": {
"DatasetID": "USA_ESRI_2018",
"DataLayerID": "US.Tracts",
"AreaID": "06059099309",
"AreaName": "060590993.09",
"MajorSubdivisionName": "California",
"MajorSubdivisionAbbr": "CA",
"MajorSubdivisionType": "state",
"CountryAbbr": "US",
"Score": 89,
"ObjectId": 582
},
"geometry": {
"rings": [
[
[
-118.0018372269038,
33.686589496953204
],
[
-118.00182999991094,
33.68651000107848
],
[
-117.99795000036917,
33.686570000468215
],
[
-117.99882999926506,
33.685730002211386
],
[
-117.99757999989424,
33.682090000874574
],
[
-117.99794000025923,
33.67209000109816
],
[
-117.99790999992936,
33.66691000079227
],
[
-117.99782999904973,
33.665310000741016
],
[
-117.99780999972816,
33.66402000080634
],
[
-117.9978397395449,
33.664020003049394
],
[
-117.99894999878784,
33.66402000080634
],
[
-118.00392999964441,
33.66758000066483
],
[
-118.01157000010346,
33.673070000491876
],
[
-118.01206000010119,
33.673360001497194
],
[
-118.01226000050359,
33.67338000111805
],
[
-118.0064599996142,
33.67917000075992
],
[
-118.00619000023876,
33.680070000513545
],
[
-118.00627999943171,
33.68661000103468
],
[
-118.0018372269038,
33.686589496953204
]
]
]
}
}
]
}
}
],
"messages": []
}
Notes:
- The response has been abbreviated in the example where "..." is noted.
- Returns the Census Tracts that are within Orange County, California.
- Polygons are returned with the most generalized features.
JSON response rendered with ArcGIS for Desktop.

Notes:
- Transparency property have been adjusted for illustrative purposes.
Request example 7
Return all the U.S. counties that contain the term “Orange”.
https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/StandardGeographyQuery/execute?sourceCountry=US&geographylayers=["US.Counties"]&geographyQuery=orange&f=pjson
JSON response example 7
{
"results" : [ {
"paramName" : "RecordSet",
"dataType" : "GPFeatureRecordSetLayer",
"value" : {
"displayFieldName" : "",
"fieldAliases" : {
"DatasetID" : "DatasetID",
"DataLayerID" : "DataLayerID",
"AreaID" : "AreaID",
"AreaName" : "AreaName",
"MajorSubdivisionName" : "MajorSubdivisionName",
"MajorSubdivisionAbbr" : "MajorSubdivisionAbbr",
"MajorSubdivisionType" : "MajorSubdivisionType",
"CountryAbbr" : "CountryAbbr",
"Score" : "Score",
"ObjectId" : "ObjectId"
},
"geometryType" : "esriGeometryPolygon",
"fields" : [ {
"name" : "DatasetID",
"type" : "esriFieldTypeString",
"alias" : "DatasetID",
"length" : 256
}, {
"name" : "DataLayerID",
"type" : "esriFieldTypeString",
"alias" : "DataLayerID",
"length" : 256
}, {
"name" : "AreaID",
"type" : "esriFieldTypeString",
"alias" : "AreaID",
"length" : 256
}, {
"name" : "AreaName",
"type" : "esriFieldTypeString",
"alias" : "AreaName",
"length" : 256
}, {
"name" : "MajorSubdivisionName",
"type" : "esriFieldTypeString",
"alias" : "MajorSubdivisionName",
"length" : 256
}, {
"name" : "MajorSubdivisionAbbr",
"type" : "esriFieldTypeString",
"alias" : "MajorSubdivisionAbbr",
"length" : 256
}, {
"name" : "MajorSubdivisionType",
"type" : "esriFieldTypeString",
"alias" : "MajorSubdivisionType",
"length" : 256
}, {
"name" : "CountryAbbr",
"type" : "esriFieldTypeString",
"alias" : "CountryAbbr",
"length" : 256
}, {
"name" : "Score",
"type" : "esriFieldTypeInteger",
"alias" : "Score"
}, {
"name" : "ObjectId",
"type" : "esriFieldTypeOID",
"alias" : "ObjectId"
} ],
"features" : [ {
"attributes" : {
"DatasetID" : "USA_ESRI_2018",
"DataLayerID" : "US.Counties",
"AreaID" : "06059",
"AreaName" : "Orange County",
"MajorSubdivisionName" : "California",
"MajorSubdivisionAbbr" : "CA",
"MajorSubdivisionType" : "state",
"CountryAbbr" : "US",
"Score" : 100,
"ObjectId" : 1
}
}, {
"attributes" : {
"DatasetID" : "USA_ESRI_2018",
"DataLayerID" : "US.Counties",
"AreaID" : "12095",
"AreaName" : "Orange County",
"MajorSubdivisionName" : "Florida",
"MajorSubdivisionAbbr" : "FL",
"MajorSubdivisionType" : "state",
"CountryAbbr" : "US",
"Score" : 100,
"ObjectId" : 2
}
}, {
"attributes" : {
"DatasetID" : "USA_ESRI_2018",
"DataLayerID" : "US.Counties",
"AreaID" : "18117",
"AreaName" : "Orange County",
"MajorSubdivisionName" : "Indiana",
"MajorSubdivisionAbbr" : "IN",
"MajorSubdivisionType" : "state",
"CountryAbbr" : "US",
"Score" : 100,
"ObjectId" : 3
}
}, {
"attributes" : {
"DatasetID" : "USA_ESRI_2018",
"DataLayerID" : "US.Counties",
"AreaID" : "36071",
"AreaName" : "Orange County",
"MajorSubdivisionName" : "New York",
"MajorSubdivisionAbbr" : "NY",
"MajorSubdivisionType" : "state",
"CountryAbbr" : "US",
"Score" : 100,
"ObjectId" : 4
}
}, {
"attributes" : {
"DatasetID" : "USA_ESRI_2018",
"DataLayerID" : "US.Counties",
"AreaID" : "37135",
"AreaName" : "Orange County",
"MajorSubdivisionName" : "North Carolina",
"MajorSubdivisionAbbr" : "NC",
"MajorSubdivisionType" : "state",
"CountryAbbr" : "US",
"Score" : 100,
"ObjectId" : 5
}
}, {
"attributes" : {
"DatasetID" : "USA_ESRI_2018",
"DataLayerID" : "US.Counties",
"AreaID" : "48361",
"AreaName" : "Orange County",
"MajorSubdivisionName" : "Texas",
"MajorSubdivisionAbbr" : "TX",
"MajorSubdivisionType" : "state",
"CountryAbbr" : "US",
"Score" : 100,
"ObjectId" : 6
}
}, {
"attributes" : {
"DatasetID" : "USA_ESRI_2018",
"DataLayerID" : "US.Counties",
"AreaID" : "50017",
"AreaName" : "Orange County",
"MajorSubdivisionName" : "Vermont",
"MajorSubdivisionAbbr" : "VT",
"MajorSubdivisionType" : "state",
"CountryAbbr" : "US",
"Score" : 100,
"ObjectId" : 7
}
}, {
"attributes" : {
"DatasetID" : "USA_ESRI_2018",
"DataLayerID" : "US.Counties",
"AreaID" : "51137",
"AreaName" : "Orange County",
"MajorSubdivisionName" : "Virginia",
"MajorSubdivisionAbbr" : "VA",
"MajorSubdivisionType" : "state",
"CountryAbbr" : "US",
"Score" : 100,
"ObjectId" : 8
}
} ]
}
} ],
"messages" : [ ]
}
Notes:
- Returns any county with the term “Orange” in its name.
- The Score attribute indicates how close the search was. A score of 100 indicates an exact string match.
Request example 8
Return all the U.S. counties and U.S. cities and towns that contain the term “Orange”.
https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/StandardGeographyQuery/execute?sourceCountry=US&geographylayers=["US.Counties","US.Places"]&geographyQuery=orange&f=pjson
JSON response example 8
{
"results" : [ {
"paramName" : "RecordSet",
"dataType" : "GPFeatureRecordSetLayer",
"value" : {
"displayFieldName" : "",
"fieldAliases" : {
"DatasetID" : "DatasetID",
"DataLayerID" : "DataLayerID",
"AreaID" : "AreaID",
"AreaName" : "AreaName",
"MajorSubdivisionName" : "MajorSubdivisionName",
"MajorSubdivisionAbbr" : "MajorSubdivisionAbbr",
"MajorSubdivisionType" : "MajorSubdivisionType",
"CountryAbbr" : "CountryAbbr",
"Score" : "Score",
"ObjectId" : "ObjectId"
},
"geometryType" : "esriGeometryPolygon",
"fields" : [ {
"name" : "DatasetID",
"type" : "esriFieldTypeString",
"alias" : "DatasetID",
"length" : 256
}, {
"name" : "DataLayerID",
"type" : "esriFieldTypeString",
"alias" : "DataLayerID",
"length" : 256
}, {
"name" : "AreaID",
"type" : "esriFieldTypeString",
"alias" : "AreaID",
"length" : 256
}, {
"name" : "AreaName",
"type" : "esriFieldTypeString",
"alias" : "AreaName",
"length" : 256
}, {
"name" : "MajorSubdivisionName",
"type" : "esriFieldTypeString",
"alias" : "MajorSubdivisionName",
"length" : 256
}, {
"name" : "MajorSubdivisionAbbr",
"type" : "esriFieldTypeString",
"alias" : "MajorSubdivisionAbbr",
"length" : 256
}, {
"name" : "MajorSubdivisionType",
"type" : "esriFieldTypeString",
"alias" : "MajorSubdivisionType",
"length" : 256
}, {
"name" : "CountryAbbr",
"type" : "esriFieldTypeString",
"alias" : "CountryAbbr",
"length" : 256
}, {
"name" : "Score",
"type" : "esriFieldTypeInteger",
"alias" : "Score"
}, {
"name" : "ObjectId",
"type" : "esriFieldTypeOID",
"alias" : "ObjectId"
} ],
"features" : [ {
"attributes" : {
"DatasetID" : "USA_ESRI_2018",
"DataLayerID" : "US.Counties",
"AreaID" : "06059",
"AreaName" : "Orange County",
"MajorSubdivisionName" : "California",
"MajorSubdivisionAbbr" : "CA",
"MajorSubdivisionType" : "state",
"CountryAbbr" : "US",
"Score" : 100,
"ObjectId" : 1
}
}, {
"attributes" : {
"DatasetID" : "USA_ESRI_2018",
"DataLayerID" : "US.Counties",
"AreaID" : "12095",
"AreaName" : "Orange County",
"MajorSubdivisionName" : "Florida",
"MajorSubdivisionAbbr" : "FL",
"MajorSubdivisionType" : "state",
"CountryAbbr" : "US",
"Score" : 100,
"ObjectId" : 2
}
}, {
"attributes" : {
"DatasetID" : "USA_ESRI_2018",
"DataLayerID" : "US.Counties",
"AreaID" : "18117",
"AreaName" : "Orange County",
"MajorSubdivisionName" : "Indiana",
"MajorSubdivisionAbbr" : "IN",
"MajorSubdivisionType" : "state",
"CountryAbbr" : "US",
"Score" : 100,
"ObjectId" : 3
}
}, {
"attributes" : {
"DatasetID" : "USA_ESRI_2018",
"DataLayerID" : "US.Counties",
"AreaID" : "36071",
"AreaName" : "Orange County",
"MajorSubdivisionName" : "New York",
"MajorSubdivisionAbbr" : "NY",
"MajorSubdivisionType" : "state",
"CountryAbbr" : "US",
"Score" : 100,
"ObjectId" : 4
}
}, {
"attributes" : {
"DatasetID" : "USA_ESRI_2018",
"DataLayerID" : "US.Counties",
"AreaID" : "37135",
"AreaName" : "Orange County",
"MajorSubdivisionName" : "North Carolina",
"MajorSubdivisionAbbr" : "NC",
"MajorSubdivisionType" : "state",
"CountryAbbr" : "US",
"Score" : 100,
"ObjectId" : 5
}
}, {
"attributes" : {
"DatasetID" : "USA_ESRI_2018",
"DataLayerID" : "US.Counties",
"AreaID" : "48361",
"AreaName" : "Orange County",
"MajorSubdivisionName" : "Texas",
"MajorSubdivisionAbbr" : "TX",
"MajorSubdivisionType" : "state",
"CountryAbbr" : "US",
"Score" : 100,
"ObjectId" : 6
}
}, {
"attributes" : {
"DatasetID" : "USA_ESRI_2018",
"DataLayerID" : "US.Counties",
"AreaID" : "50017",
"AreaName" : "Orange County",
"MajorSubdivisionName" : "Vermont",
"MajorSubdivisionAbbr" : "VT",
"MajorSubdivisionType" : "state",
"CountryAbbr" : "US",
"Score" : 100,
"ObjectId" : 7
}
}, {
"attributes" : {
"DatasetID" : "USA_ESRI_2018",
"DataLayerID" : "US.Counties",
"AreaID" : "51137",
"AreaName" : "Orange County",
"MajorSubdivisionName" : "Virginia",
"MajorSubdivisionAbbr" : "VA",
"MajorSubdivisionType" : "state",
"CountryAbbr" : "US",
"Score" : 100,
"ObjectId" : 8
}
}, {
"attributes" : {
"DatasetID" : "USA_ESRI_2018",
"DataLayerID" : "US.Places",
"AreaID" : "0653980",
"AreaName" : "Orange city",
"MajorSubdivisionName" : "California",
"MajorSubdivisionAbbr" : "CA",
"MajorSubdivisionType" : "state",
"CountryAbbr" : "US",
"Score" : 75,
"ObjectId" : 9
}
}, {
"attributes" : {
"DatasetID" : "USA_ESRI_2018",
"DataLayerID" : "US.Places",
"AreaID" : "0654008",
"AreaName" : "Orange Cove city",
"MajorSubdivisionName" : "California",
"MajorSubdivisionAbbr" : "CA",
"MajorSubdivisionType" : "state",
"CountryAbbr" : "US",
"Score" : 75,
"ObjectId" : 10
}
}, {
"attributes" : {
"DatasetID" : "USA_ESRI_2018",
"DataLayerID" : "US.Places",
"AreaID" : "0957670",
"AreaName" : "Orange CDP",
"MajorSubdivisionName" : "Connecticut",
"MajorSubdivisionAbbr" : "CT",
"MajorSubdivisionType" : "state",
"CountryAbbr" : "US",
"Score" : 75,
"ObjectId" : 11
}
},
...
{
"attributes" : {
"DatasetID" : "USA_ESRI_2018",
"DataLayerID" : "US.Places",
"AreaID" : "0451465",
"AreaName" : "Orange Grove Mobile Manor CDP",
"MajorSubdivisionName" : "Arizona",
"MajorSubdivisionAbbr" : "AZ",
"MajorSubdivisionType" : "state",
"CountryAbbr" : "US",
"Score" : 70,
"ObjectId" : 25
}
} ]
}
} ],
"messages" : [ ]
}
Notes:
- The response has been abbreviated in the example where "..." is noted.
- Returns any county or census town or city with the term “Orange” in its name.
- Each output feature has a DataLayerID that will illustrate if the matching feature is a county or census place (city or town).
- The Score attribute indicates how close the search was. A score of 100 indicates an exact string match.
Request example 9
Return the U.S. counties that have the term “San”.
https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/StandardGeographyQuery/execute?sourceCountry=US&geographylayers=["US.Counties"]&geographyQuery=San*&f=pjson
JSON response example 9
{
"results" : [ {
"paramName" : "RecordSet",
"dataType" : "GPFeatureRecordSetLayer",
"value" : {
"displayFieldName" : "",
"fieldAliases" : {
"DatasetID" : "DatasetID",
"DataLayerID" : "DataLayerID",
"AreaID" : "AreaID",
"AreaName" : "AreaName",
"MajorSubdivisionName" : "MajorSubdivisionName",
"MajorSubdivisionAbbr" : "MajorSubdivisionAbbr",
"MajorSubdivisionType" : "MajorSubdivisionType",
"CountryAbbr" : "CountryAbbr",
"Score" : "Score",
"ObjectId" : "ObjectId"
},
"geometryType" : "esriGeometryPolygon",
"fields" : [ {
"name" : "DatasetID",
"type" : "esriFieldTypeString",
"alias" : "DatasetID",
"length" : 256
}, {
"name" : "DataLayerID",
"type" : "esriFieldTypeString",
"alias" : "DataLayerID",
"length" : 256
}, {
"name" : "AreaID",
"type" : "esriFieldTypeString",
"alias" : "AreaID",
"length" : 256
}, {
"name" : "AreaName",
"type" : "esriFieldTypeString",
"alias" : "AreaName",
"length" : 256
}, {
"name" : "MajorSubdivisionName",
"type" : "esriFieldTypeString",
"alias" : "MajorSubdivisionName",
"length" : 256
}, {
"name" : "MajorSubdivisionAbbr",
"type" : "esriFieldTypeString",
"alias" : "MajorSubdivisionAbbr",
"length" : 256
}, {
"name" : "MajorSubdivisionType",
"type" : "esriFieldTypeString",
"alias" : "MajorSubdivisionType",
"length" : 256
}, {
"name" : "CountryAbbr",
"type" : "esriFieldTypeString",
"alias" : "CountryAbbr",
"length" : 256
}, {
"name" : "Score",
"type" : "esriFieldTypeInteger",
"alias" : "Score"
}, {
"name" : "ObjectId",
"type" : "esriFieldTypeOID",
"alias" : "ObjectId"
} ],
"features" : [ {
"attributes" : {
"DatasetID" : "USA_ESRI_2018",
"DataLayerID" : "US.Counties",
"AreaID" : "04023",
"AreaName" : "Santa Cruz County",
"MajorSubdivisionName" : "Arizona",
"MajorSubdivisionAbbr" : "AZ",
"MajorSubdivisionType" : "state",
"CountryAbbr" : "US",
"Score" : 100,
"ObjectId" : 1
}
}, {
"attributes" : {
"DatasetID" : "USA_ESRI_2018",
"DataLayerID" : "US.Counties",
"AreaID" : "06069",
"AreaName" : "San Benito County",
"MajorSubdivisionName" : "California",
"MajorSubdivisionAbbr" : "CA",
"MajorSubdivisionType" : "state",
"CountryAbbr" : "US",
"Score" : 100,
"ObjectId" : 2
}
},
...
{
"attributes" : {
"DatasetID" : "USA_ESRI_2018",
"DataLayerID" : "US.Counties",
"AreaID" : "53055",
"AreaName" : "San Juan County",
"MajorSubdivisionName" : "Washington",
"MajorSubdivisionAbbr" : "WA",
"MajorSubdivisionType" : "state",
"CountryAbbr" : "US",
"Score" : 100,
"ObjectId" : 30
}
} ]
}
} ],
"messages" : [ ]
}
Notes:
- The response has been abbreviated in the example where "..." is noted.
- Returns any county where the feature name contains the term “San”.
- The Score attribute indicates how close the search was. A score of 100 indicates an exact string match.
Request example 10
Return all the U.S. counties that contain the term “Orange County” and “CA” using the query syntax.
https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/StandardGeographyQuery/execute?sourceCountry=US&geographylayers=["US.Counties"]&geographyQuery=Name:"Orange County" AND MajorSubdivisionAbbr:CA&f=pjson
JSON response example 10
{
"results" : [ {
"paramName" : "RecordSet",
"dataType" : "GPFeatureRecordSetLayer",
"value" : {
"displayFieldName" : "",
"fieldAliases" : {
"DatasetID" : "DatasetID",
"DataLayerID" : "DataLayerID",
"AreaID" : "AreaID",
"AreaName" : "AreaName",
"MajorSubdivisionName" : "MajorSubdivisionName",
"MajorSubdivisionAbbr" : "MajorSubdivisionAbbr",
"MajorSubdivisionType" : "MajorSubdivisionType",
"CountryAbbr" : "CountryAbbr",
"Score" : "Score",
"ObjectId" : "ObjectId"
},
"geometryType" : "esriGeometryPolygon",
"fields" : [ {
"name" : "DatasetID",
"type" : "esriFieldTypeString",
"alias" : "DatasetID",
"length" : 256
}, {
"name" : "DataLayerID",
"type" : "esriFieldTypeString",
"alias" : "DataLayerID",
"length" : 256
}, {
"name" : "AreaID",
"type" : "esriFieldTypeString",
"alias" : "AreaID",
"length" : 256
}, {
"name" : "AreaName",
"type" : "esriFieldTypeString",
"alias" : "AreaName",
"length" : 256
}, {
"name" : "MajorSubdivisionName",
"type" : "esriFieldTypeString",
"alias" : "MajorSubdivisionName",
"length" : 256
}, {
"name" : "MajorSubdivisionAbbr",
"type" : "esriFieldTypeString",
"alias" : "MajorSubdivisionAbbr",
"length" : 256
}, {
"name" : "MajorSubdivisionType",
"type" : "esriFieldTypeString",
"alias" : "MajorSubdivisionType",
"length" : 256
}, {
"name" : "CountryAbbr",
"type" : "esriFieldTypeString",
"alias" : "CountryAbbr",
"length" : 256
}, {
"name" : "Score",
"type" : "esriFieldTypeInteger",
"alias" : "Score"
}, {
"name" : "ObjectId",
"type" : "esriFieldTypeOID",
"alias" : "ObjectId"
} ],
"features" : [ {
"attributes" : {
"DatasetID" : "USA_ESRI_2018",
"DataLayerID" : "US.Counties",
"AreaID" : "06059",
"AreaName" : "Orange County",
"MajorSubdivisionName" : "California",
"MajorSubdivisionAbbr" : "CA",
"MajorSubdivisionType" : "state",
"CountryAbbr" : "US",
"Score" : 100,
"ObjectId" : 1
}
} ]
}
} ],
"messages" : [ ]
}
Notes:
- Returns any county where the feature name contains the term “Orange County” and the state abbreviation is equal to “CA”.
- The Score attribute indicates how close the search was. A score of 100 indicates an exact string match.
Request example 11
Demonstrate the fuzzy matching capabilities with a misspelled place name.
https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/StandardGeographyQuery/execute?sourceCountry=US&geographylayers=["US.Places"]&geographyQuery=twian hart&useFuzzySearch=true&f=pjson
JSON response example 11
{
"results" : [ {
"paramName" : "RecordSet",
"dataType" : "GPFeatureRecordSetLayer",
"value" : {
"displayFieldName" : "",
"fieldAliases" : {
"DatasetID" : "DatasetID",
"DataLayerID" : "DataLayerID",
"AreaID" : "AreaID",
"AreaName" : "AreaName",
"MajorSubdivisionName" : "MajorSubdivisionName",
"MajorSubdivisionAbbr" : "MajorSubdivisionAbbr",
"MajorSubdivisionType" : "MajorSubdivisionType",
"CountryAbbr" : "CountryAbbr",
"Score" : "Score",
"ObjectId" : "ObjectId"
},
"geometryType" : "esriGeometryPolygon",
"fields" : [ {
"name" : "DatasetID",
"type" : "esriFieldTypeString",
"alias" : "DatasetID",
"length" : 256
}, {
"name" : "DataLayerID",
"type" : "esriFieldTypeString",
"alias" : "DataLayerID",
"length" : 256
}, {
"name" : "AreaID",
"type" : "esriFieldTypeString",
"alias" : "AreaID",
"length" : 256
}, {
"name" : "AreaName",
"type" : "esriFieldTypeString",
"alias" : "AreaName",
"length" : 256
}, {
"name" : "MajorSubdivisionName",
"type" : "esriFieldTypeString",
"alias" : "MajorSubdivisionName",
"length" : 256
}, {
"name" : "MajorSubdivisionAbbr",
"type" : "esriFieldTypeString",
"alias" : "MajorSubdivisionAbbr",
"length" : 256
}, {
"name" : "MajorSubdivisionType",
"type" : "esriFieldTypeString",
"alias" : "MajorSubdivisionType",
"length" : 256
}, {
"name" : "CountryAbbr",
"type" : "esriFieldTypeString",
"alias" : "CountryAbbr",
"length" : 256
}, {
"name" : "Score",
"type" : "esriFieldTypeInteger",
"alias" : "Score"
}, {
"name" : "ObjectId",
"type" : "esriFieldTypeOID",
"alias" : "ObjectId"
} ],
"features" : [ {
"attributes" : {
"DatasetID" : "USA_ESRI_2018",
"DataLayerID" : "US.Places",
"AreaID" : "0680966",
"AreaName" : "Twain Harte CDP",
"MajorSubdivisionName" : "California",
"MajorSubdivisionAbbr" : "CA",
"MajorSubdivisionType" : "state",
"CountryAbbr" : "US",
"Score" : 87,
"ObjectId" : 1
}
} ]
}
} ],
"messages" : [ ]
}
Notes:
- Returns the place of Twain Harte even though the name was spelled incorrectly in the
geography
parameter.Query - You could also set the fuzzy search explicitly within the
geography
parameter using the tilde symbol “~” (for example,Query geography
).Query=rancho kukamonga~ - The Score attribute indicates how close the search was. A score of 100 indicates an exact string match.
Request example 12
Return a list of places in Orange County, Ca.
https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/StandardGeographyQuery/execute?sourceCountry=US&geographylayers=["US.Counties"]&geographyids=["06059"]&returnSubGeographyLayer=true&subGeographyLayer=US.Places&f=pjson
JSON response example 12
{
"results": [
{
"paramName": "RecordSet",
"dataType": "GPFeatureRecordSetLayer",
"value": {
"displayFieldName": "",
"fieldAliases": {
"DatasetID": "DatasetID",
"DataLayerID": "DataLayerID",
"AreaID": "AreaID",
"AreaName": "AreaName",
"MajorSubdivisionName": "MajorSubdivisionName",
"MajorSubdivisionAbbr": "MajorSubdivisionAbbr",
"MajorSubdivisionType": "MajorSubdivisionType",
"CountryAbbr": "CountryAbbr",
"Score": "Score",
"ObjectId": "ObjectId"
},
"fields": [
{
"name": "DatasetID",
"type": "esriFieldTypeString",
"alias": "DatasetID",
"length": 256
},
{
"name": "DataLayerID",
"type": "esriFieldTypeString",
"alias": "DataLayerID",
"length": 256
},
{
"name": "AreaID",
"type": "esriFieldTypeString",
"alias": "AreaID",
"length": 256
},
{
"name": "AreaName",
"type": "esriFieldTypeString",
"alias": "AreaName",
"length": 256
},
{
"name": "MajorSubdivisionName",
"type": "esriFieldTypeString",
"alias": "MajorSubdivisionName",
"length": 256
},
{
"name": "MajorSubdivisionAbbr",
"type": "esriFieldTypeString",
"alias": "MajorSubdivisionAbbr",
"length": 256
},
{
"name": "MajorSubdivisionType",
"type": "esriFieldTypeString",
"alias": "MajorSubdivisionType",
"length": 256
},
{
"name": "CountryAbbr",
"type": "esriFieldTypeString",
"alias": "CountryAbbr",
"length": 256
},
{
"name": "Score",
"type": "esriFieldTypeInteger",
"alias": "Score"
},
{
"name": "ObjectId",
"type": "esriFieldTypeOID",
"alias": "ObjectId"
}
],
"features": [
{
"attributes": {
"DatasetID": "USA_ESRI_2018",
"DataLayerID": "US.Places",
"AreaID": "0600947",
"AreaName": "Aliso Viejo city",
"MajorSubdivisionName": "California",
"MajorSubdivisionAbbr": "CA",
"MajorSubdivisionType": "State",
"CountryAbbr": "US",
"Score": 100,
"ObjectId": 1
}
},
{
"attributes": {
"DatasetID": "USA_ESRI_2018",
"DataLayerID": "US.Places",
"AreaID": "0602000",
"AreaName": "Anaheim city",
"MajorSubdivisionName": "California",
"MajorSubdivisionAbbr": "CA",
"MajorSubdivisionType": "State",
"CountryAbbr": "US",
"Score": 100,
"ObjectId": 2
}
},
...
{
"attributes": {
"DatasetID": "USA_ESRI_2018",
"DataLayerID": "US.Places",
"AreaID": "0608100",
"AreaName": "Brea city",
"MajorSubdivisionName": "California",
"MajorSubdivisionAbbr": "CA",
"MajorSubdivisionType": "State",
"CountryAbbr": "US",
"Score": 98,
"ObjectId": 40
}
}
]
}
}
],
"messages": []
}
Notes:
- The response has been abbreviated in the example where "..." is noted.
- The Score attribute indicates how close the search was. A score of 100 indicates an exact string match.
Request example 13
Return all the country names then begin with "Bel".
https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/StandardGeographyQuery/execute?geographylayers=countries&geographyquery=Bel*&f=pjson
JSON response example 13
{
"results" : [ {
"paramName" : "RecordSet",
"dataType" : "GPFeatureRecordSetLayer",
"value" : {
"displayFieldName" : "",
"fieldAliases" : {
"DatasetID" : "DatasetID",
"DataLayerID" : "DataLayerID",
"AreaID" : "AreaID",
"AreaName" : "AreaName",
"MajorSubdivisionName" : "MajorSubdivisionName",
"MajorSubdivisionAbbr" : "MajorSubdivisionAbbr",
"MajorSubdivisionType" : "MajorSubdivisionType",
"CountryAbbr" : "CountryAbbr",
"Score" : "Score",
"ObjectId" : "ObjectId"
},
"geometryType" : "esriGeometryPolygon",
"fields" : [ {
"name" : "DatasetID",
"type" : "esriFieldTypeString",
"alias" : "DatasetID",
"length" : 256
}, {
"name" : "DataLayerID",
"type" : "esriFieldTypeString",
"alias" : "DataLayerID",
"length" : 256
}, {
"name" : "AreaID",
"type" : "esriFieldTypeString",
"alias" : "AreaID",
"length" : 256
}, {
"name" : "AreaName",
"type" : "esriFieldTypeString",
"alias" : "AreaName",
"length" : 256
}, {
"name" : "MajorSubdivisionName",
"type" : "esriFieldTypeString",
"alias" : "MajorSubdivisionName",
"length" : 256
}, {
"name" : "MajorSubdivisionAbbr",
"type" : "esriFieldTypeString",
"alias" : "MajorSubdivisionAbbr",
"length" : 256
}, {
"name" : "MajorSubdivisionType",
"type" : "esriFieldTypeString",
"alias" : "MajorSubdivisionType",
"length" : 256
}, {
"name" : "CountryAbbr",
"type" : "esriFieldTypeString",
"alias" : "CountryAbbr",
"length" : 256
}, {
"name" : "Score",
"type" : "esriFieldTypeInteger",
"alias" : "Score"
}, {
"name" : "ObjectId",
"type" : "esriFieldTypeOID",
"alias" : "ObjectId"
} ],
"features" : [ {
"attributes" : {
"DatasetID" : "Global",
"DataLayerID" : "Countries",
"AreaID" : "BE",
"AreaName" : "Belgium",
"MajorSubdivisionName" : "Belgium",
"MajorSubdivisionAbbr" : "BE",
"MajorSubdivisionType" : "country",
"CountryAbbr" : "BE",
"Score" : 100,
"ObjectId" : 1
}
}, {
"attributes" : {
"DatasetID" : "Global",
"DataLayerID" : "Countries",
"AreaID" : "BY",
"AreaName" : "Belarus",
"MajorSubdivisionName" : "Belarus",
"MajorSubdivisionAbbr" : "BY",
"MajorSubdivisionType" : "country",
"CountryAbbr" : "BY",
"Score" : 100,
"ObjectId" : 2
}
}, {
"attributes" : {
"DatasetID" : "Global",
"DataLayerID" : "Countries",
"AreaID" : "BZ",
"AreaName" : "Belize",
"MajorSubdivisionName" : "Belize",
"MajorSubdivisionAbbr" : "BZ",
"MajorSubdivisionType" : "country",
"CountryAbbr" : "BZ",
"Score" : 100,
"ObjectId" : 3
}
} ]
}
} ],
"messages" : [ ]
}
Notes:
- The "countries" geography layer contains all countries and associated features throughout the globe.
- The Score attribute indicates how close the search was. A score of 100 indicates an exact string match.
Request example 14
Query all the cities in Canada for Victoria
and return the center point.
https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/StandardGeographyQuery/execute?sourceCountry=CA&geographylayers=cities&geographyquery=victoria&returnGeometry=true&returnCentroids=true&f=pjson
JSON response example 14
{
"results" : [ {
"paramName" : "RecordSet",
"dataType" : "GPFeatureRecordSetLayer",
"value" : {
"displayFieldName" : "",
"fieldAliases" : {
"DatasetID" : "DatasetID",
"DataLayerID" : "DataLayerID",
"AreaID" : "AreaID",
"AreaName" : "AreaName",
"MajorSubdivisionName" : "MajorSubdivisionName",
"MajorSubdivisionAbbr" : "MajorSubdivisionAbbr",
"MajorSubdivisionType" : "MajorSubdivisionType",
"CountryAbbr" : "CountryAbbr",
"Score" : "Score",
"ObjectId" : "ObjectId"
},
"geometryType" : "esriGeometryPolygon",
"spatialReference" : {
"wkid" : 4326,
"latestWkid" : 4326
},
"fields" : [ {
"name" : "DatasetID",
"type" : "esriFieldTypeString",
"alias" : "DatasetID",
"length" : 256
}, {
"name" : "DataLayerID",
"type" : "esriFieldTypeString",
"alias" : "DataLayerID",
"length" : 256
}, {
"name" : "AreaID",
"type" : "esriFieldTypeString",
"alias" : "AreaID",
"length" : 256
}, {
"name" : "AreaName",
"type" : "esriFieldTypeString",
"alias" : "AreaName",
"length" : 256
}, {
"name" : "MajorSubdivisionName",
"type" : "esriFieldTypeString",
"alias" : "MajorSubdivisionName",
"length" : 256
}, {
"name" : "MajorSubdivisionAbbr",
"type" : "esriFieldTypeString",
"alias" : "MajorSubdivisionAbbr",
"length" : 256
}, {
"name" : "MajorSubdivisionType",
"type" : "esriFieldTypeString",
"alias" : "MajorSubdivisionType",
"length" : 256
}, {
"name" : "CountryAbbr",
"type" : "esriFieldTypeString",
"alias" : "CountryAbbr",
"length" : 256
}, {
"name" : "Score",
"type" : "esriFieldTypeInteger",
"alias" : "Score"
}, {
"name" : "ObjectId",
"type" : "esriFieldTypeOID",
"alias" : "ObjectId"
} ],
"features" : [ {
"attributes" : {
"DatasetID" : "Global",
"DataLayerID" : "Cities",
"AreaID" : "187292",
"AreaName" : "Victoria",
"MajorSubdivisionName" : "Canada",
"MajorSubdivisionAbbr" : "CA",
"MajorSubdivisionType" : "country",
"CountryAbbr" : "CA",
"Score" : 100,
"ObjectId" : 1
},
"geometry" : {
"x" : -123.35799379791908,
"y" : 48.427909502450085
}
}, {
"attributes" : {
"DatasetID" : "Global",
"DataLayerID" : "Cities",
"AreaID" : "187293",
"AreaName" : "Victoria",
"MajorSubdivisionName" : "Canada",
"MajorSubdivisionAbbr" : "CA",
"MajorSubdivisionType" : "country",
"CountryAbbr" : "CA",
"Score" : 100,
"ObjectId" : 2
},
"geometry" : {
"x" : -98.93085560069397,
"y" : 49.6614367676908
}
}, {
"attributes" : {
"DatasetID" : "Global",
"DataLayerID" : "Cities",
"AreaID" : "187294",
"AreaName" : "Victoria",
"MajorSubdivisionName" : "Canada",
"MajorSubdivisionAbbr" : "CA",
"MajorSubdivisionType" : "country",
"CountryAbbr" : "CA",
"Score" : 100,
"ObjectId" : 3
},
"geometry" : {
"x" : -53.23963217819945,
"y" : 47.77042207341038
}
}, {
"attributes" : {
"DatasetID" : "Global",
"DataLayerID" : "Cities",
"AreaID" : "187295",
"AreaName" : "Victoria",
"MajorSubdivisionName" : "Canada",
"MajorSubdivisionAbbr" : "CA",
"MajorSubdivisionType" : "country",
"CountryAbbr" : "CA",
"Score" : 100,
"ObjectId" : 4
},
"geometry" : {
"x" : -60.634104798418036,
"y" : 46.482321753309165
}
}, {
"attributes" : {
"DatasetID" : "Global",
"DataLayerID" : "Cities",
"AreaID" : "187296",
"AreaName" : "Victoria",
"MajorSubdivisionName" : "Canada",
"MajorSubdivisionAbbr" : "CA",
"MajorSubdivisionType" : "country",
"CountryAbbr" : "CA",
"Score" : 100,
"ObjectId" : 5
},
"geometry" : {
"x" : -63.489217773692495,
"y" : 46.214684996863895
}
}, {
"attributes" : {
"DatasetID" : "Global",
"DataLayerID" : "Cities",
"AreaID" : "187280",
"AreaName" : "Victoria Beach",
"MajorSubdivisionName" : "Canada",
"MajorSubdivisionAbbr" : "CA",
"MajorSubdivisionType" : "country",
"CountryAbbr" : "CA",
"Score" : 81,
"ObjectId" : 6
},
"geometry" : {
"x" : -96.53794762316282,
"y" : 50.70470648157216
}
} ]
}
} ],
"messages" : [ ]
}
Notes:
- Returns the cities of Victoria in Canada.
- The "Cities" geography layer contains major cities throughout the entire globe.
- Only X, Y center points can be returned for cities.
- The Score attribute indicates how close the search was. A score of 100 indicates an exact string match.
JSON response rendered with ArcGIS for Desktop.
