Skip To Content
ArcGIS Developer
Dashboard

Standard geography query

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

ParameterDescription

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.

Example

Set source country to the United States:

sourceCountry=US

optionalCountryDataset

Optional parameter to specify a specific dataset within a defined country.

Example

optionalCountryDataset=USA_ESRI_2021

optionalCountryHierarchy

Optional parameter to specify a specific hierarchy within a defined country.

Default value

optionalCountryHierarchy=census2020

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)

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.

Default value

(null or empty)

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.

Default value

(null or empty)

returnSubGeographyLayer

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

false

subGeographyLayer

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

(null or empty)

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.

Default value

(null or empty)

outSR

Optional parameter to request the output geometries in a specified spatial reference system.

Default value

4326

returnGeometry

Optional parameter to request the output geometries in the response.

Default value

false

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.

Default value

false

generalizationLevel

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

0

useFuzzySearch

Optional parameter to define if text provided in the geographyQuery parameter should utilize fuzzy search logic. Fuzzy searches are based on the Levenshtein Distance or Edit Distance algorithm.

Default value

false

featureLimit

Optional parameter that limits the number of features that are returned from the geographyQuery parameter.

Default value

1000

featureOffset

Optional parameter that starts the results on the number of the records specified.

Default value

0

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

outFields

Returns only requested fields.

Default value

(null or empty)

Example 1

["AreaID","AreaName"]

returnCountOnly

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

Notes:

  • This parameter can be used together with thereturnSubGeographyLayer and the subGeographyLayer parameters.

f

Optional parameter to specify the output response format.

Default value

json

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:

sourceCountry=US

Example 2 – Set the source country to Canada:

sourceCountry=CA

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://geoenrich.arcgis.com/arcgis/rest/services/World/GeoEnrichmentServer/StandardGeographyQuery?geographyIDs=['47']&geographyLayers=JP.Prefectures&optionalCountryDataset=JPN_EsriJapan_2020&f=pjson&returnGeometry=True&sourceCountry=JP

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 optionalCountryHIerarchy parameter to specify a non-default data source. For example, in the U.S. the census2020 hierarchy is the default and indicates the latest data based on the Census 2020 boundaries. If this parameter is blank, the census2020 hierarchy will be used. The census hierarchy is based on the 2010 census boundaries and can be passed to override the default hierarchy.

Example

Return a state boundary from the census hierarchy based on boundaries from the 2010 decennial census.

https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/StandardGeographyQuery?sourcecountry=US&optionalcountryhierarchy=census&geographylayers=["US.States"]&geographyids=["06"]&returnGeometry=true&f=json

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:

geographyLayers=["CAN.PR"]

Example 2 – Limit the search and query to all U.S. counties and census places (Cities and Towns):

geographyLayers=["US.Counties", "US.Places"]

Example 3 – Search and query all global city names:

geographyLayers=cities

Example 4 – Search and query all country names:

geographyLayers=countries

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 sourceCountry parameter is blank, at least one layer must be defined in this parameter

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 geographyLayers parameter is set to geographyLayers=[“US.States”]:

geographyIDs=["06"]

Example 2 – Return two US ZIP Codes where the geographyLayers parameter is set to geographyLayers=[“US.ZIP5”]:

geographyIDs=["92129","92126"]

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 geographyLayers parameter if you use this parameter to query features by ID.
  • Only matched features will be returned from the layers defined in the geographyLayers parameter.

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 geographyQuery 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”]:

geographyQuery=orange

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:"Orange County" AND MajorSubdivisionAbbr:CA

or

Name:"Orange County" AND MajorSubdivisionID:06

or

"Orange County" AND MajorSubdivisionName:California

The following fields are supported in geographySearch:

FieldDescription

ID

Geography ID—for example, 06069 or 59025.

NAME

Geography NAM—for example, Orange County or Skeena - Bulkley Valley.

MajorSubdivisionName

Major subdivision name—for example, California or British Columbia.

MajorSubdivisionAbbr

Major subdivision abbreviation—for example, CA or BC.

MajorSubdivisionID

Major subdivision ID—for example, 06 or 59

MajorSubdivision

Major subdivision ID, name and abbreviation—for example, 06, California, CA or 59, British, Columbia, BC.

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 useFuzzySearch parameter to true. You can also explicitly set a fuzzy search with the geographyQuery 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 useFuzzySearch 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 geographyQuery, 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:

"Orange" AND "County"

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" OR orange

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:

+Orange OR County

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" NOT "county"

Note:

The NOT operator cannot be used with just one term. For example, the following search will return no results:

NOT "orange county"

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:

(Orange OR Riverside) AND CA

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:(+Orange +County)

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 geographyLayers parameter to define which layers are being searched.
  • You can search more than one layer if the geographyLayers parameter is provided with multiple layers.
  • To achieve optimal performance, it is strongly recommended that at least one layer is defined in the geographyLayers parameter.
  • If sourceCountry is blank, at least one layer must be defined in the geographyLayers parameter.
  • If no geographyLayers are provided, all standard geography layers will be searched within sourceCountry. This will adversely affect performance.
  • If the useFuzzySearch parameter is set to false, a standard text search is performed for all text submitted with the geographyQuery parameter.
  • If the useFuzzySearch parameter is set to true, all words submitted with geographyQuery will be searched with fuzzy logic.
  • 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 subGeographyLayer. The output geometries will be in the spatial reference system defined by outSR.

Default value

false

The output geometries will not be returned with each feature in the response.

Example

Request the output geometries in the response:

returnSubGeographyLayer=true

Additional notes

  • If returnSubGeographyLayer is set to true, you must define a subGeographyLayer

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”]:

subGeographyLayer=US.Counties

Example 2 - Request Canadian FSAs features (postal areas) to be returned within the defined metropolitan areas geographyLayers=[“ CAN.CMACA”]:

subGeographyLayer=CAN.FSA

Additional notes

  • You can only set this parameter if returnSubGeographyLayer is set to true.
  • The list of available standard geography levels and their associated IDs is listed in the coverage section.
  • If returnSubGeographyLayer is set to true, this parameter is no longer optional; you must define a subGeographyLayer.

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”:

subGeographyQuery=921*

Additional notes

  • The syntax and supported operations for subGeographyLayer are the same as geographyLayer.
  • Consult the geographyQuery parameter documentation to get information on supported search operators.
  • The subGeographyLayer can only be defined if returnSubGeographyLayer is set to true and a subGeographyLayer is defined.
  • If the useFuzzySearch parameter is set to false, a standard text search is performed for all text submitted with the subGeographyQuery parameter.
  • If the returnSubGeographyLayer parameter is set to true, all words submitted with subGeographyQuery will be searched with fuzzy logic.
  • Searches within the geography query are not case sensitive.

outSR

Optional parameter to request the output geometries in a specified spatial reference system.

When returnGeometry 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:

outSR=3857

Additional notes

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 outSR.

Default value

false

The output geometries will not be returned with each feature in the response.

Example

Request the output geometries in the response:

returnGeometry=true

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 outSR.

Default value

false

Example

Request the output point geometries in the response:

returnCentroids=true

Additional notes

  • The center of each point will be returned for standard geographic areas.
  • This parameter can only be set to true if the returnGeometry parameter is also set to true.

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:

generalizationLevel=0

Example 2 - Request the most generalized output geometry:

generalizationLevel=2

Additional notes

  • A generalizationLevel of 0 will return the most detailed and precise polygon area features.
    Note:

    When the returned response is too large to display, a more generalized level of detail will be used with the following warning message:

    Generalization level <value> was returned because the generalization
    level specified was too detailed at this scale.

  • 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 generalizationLevel of 2 will produce a smaller and less detailed polygon.
  • Less detailed features may not look as precise or match the shoreline of basemaps.

useFuzzySearch

Optional parameter to define if text provided in the geographyQuery 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

useFuzzySearch=true

Additional notes

  • If this parameter is set to false, a standard text search is performed for all text submitted with the geographyQuery parameter.
  • If this parameter is set to true, all words submitted with geographyQuery will be searched with fuzzy logic.
  • More discussion about the fuzzy search capabilities are found in the geographyQuery parameter documentation.

featureLimit

Optional integer value where you can limit the number of features that are returned from the geographyQuery parameter.

Default value

1000

Example

Request the output geometries in the response:

featureLimit=50

Additional notes

  • The Standard Geography Query service has a maximum of 5000 features.
  • The featureLimit parameter cannot exceed this maximum.
  • The featureLimit used with the featureOffset parameter supports pagination of StandardGeographyQuery results.

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:

langCode=pt

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 thereturnSubGeographyLayer and the subGeographyLayer parameters.

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.

Two ZIP codes returned

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.

Two ZIP codes returned - more generalized

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.

Two ZIP code centroids

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.

Orange County, CA census tracts

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 geographyQuery parameter.
  • You could also set the fuzzy search explicitly within the geographyQuery parameter using the tilde symbol “~” (for example, geographyQuery=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.

Victoria, Canada points