Select businesses

The SelectBusinesses method returns business points matching a given search criteria. Business points can be selected using any combination of three search criteria: search string, spatial filter and business type. A business point will be selected if it matches all search criteria specified.

Request parameters

ParameterDetails

businessTypeFilters

List of business type filters restricting the search.

For USA, either the NAICS or SIC filter is useful as a business type filter. If both filters are specified in the businessTypeFilters parameter value, selected business points will match both of them.

featureLimit

The limit of returned business points.

Default value

1000.

Note:

This parameter supports pagination of SelectBusinesses results in combination with with the featureOffset parameter.

featureOffset

Start the results on the number of the record specified.

Default value

0.

This parameter supports pagination of SelectBusinesses results in combination with with the featureLimit parameter.

matchExactly

True value of the parameter means the exact match of the string to search.

Default value

false

searchString

A string of characters which is used in the search query.

The parameter value is searched in textual attribute fields of a business point record using the following rules:

  • For USA, the search is applied to the company name, North American Industry Classification System(NAICS) category name, and Standard Industrial Classification (SIC) category name of a business point.
  • A business point record is considered to match the search string criterion if any of its search fields contains the searchString parameter value as a word.
  • If the searchString parameter value contains a number of words delimited with spaces, a search field value is considered to match the search when all these words are found in it.
  • A sequence of symbols enclosed in double quotes is a phrase. It is searched in search fields as a whole.
  • The semicolon symbol ';' in the searchString parameter value means logical OR operation, e.g. term1;term2;term3 mean search for term1 OR term2 OR term3.
  • The symbol '*' in the searchString parameter value is the wildcard. It means any number of arbitrary symbols.
  • The wildcard should be a part of a word. It can be written in any place of word—at the beginning, at the end, or in the middle. A word can contain more than one wildcard.
  • Don't use words consisting of wildcards only. In this case, the search results will be empty.
  • Don't use uppercase AND / OR words in the search string. If you want to search for business points containing these words, use lowercase and / or.
  • The search is case insensitive.
  • If the matchExactly option is true, the search fields are tested to contain the whole value of the searchString parameter. This is the same as enclosing the whole search string in double quotes.
  • If the useSimpleSearch option is true, the search is restricted to the most important search field (the company name field for USA).

Examples

Search StringSearch Result

Fireproofing

Searches for a single "FIREPROOFING" word.

Burger King

Searches for both "BURGER" and "KING" words.

Burger;King

Searches for "BURGER" or "KING" word.

"Burger King"

Searches for "BURGER KING" phrase.

Don*

Searches for a word starting with "DON".

*Don

Searches for a word ending with "DON".

Don*ld

Searches for a word starting with "DON" and ending with "LD".

"Burger King";"Mc Donald"

Searches for "BURGER KING" or "MC DONALD" phrase.

spatialFilter

A spatial filter restricting the search.

Restricts the search in one of three possible ways:

  • If an analysis extent is specified, a business point located in this extent is considered to match the spatial filter.
  • If a boundary layer with polygon geometry is specified, a business point belonging to any of the polygons of this layer is considered to match the spatial filter.
  • If a list of business locations is specified, a business point, whose location fields are equal to one of the specified business locations, is considered to match the spatial filter. Business locations can be retrieved with the Select Locations endpoint.

useSimpleSearch

A spatial filter restricting the search. True value of the parameter means a simple search (e.g., in company names only).

Default value

false

activeDatasetID

Optional parameter to specify the active dataset.

ID of the active dataset. Type string.

Default value

ID of the first available dataset.

f

Optional parameter to specify the output response format.

Default value

html

The output response will be returned in HTML format.

Examples

Example 1 - Request the output geometries in JSON format:

f=json

Additional notes

  • Additional supported formats include JSON and XML.

isFullErrorMessage

Optional parameter for composing error messages. Type boolean.

Default value

false

outputSpatialReference

Optional parameter specifying the spatial reference to return the output feature layer. If this parameter is missing, the output record set will be returned in the default spatial reference.

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.

Examples

Example 1 - 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.

Example usage

Request example: Returns business points whose company name or NAICS/SIC category name contains the Fireproofing word. The search is restricted with the given list of address locations.

http://geoenrich.arcgis.com/arcgis/rest/services/World/GeoenrichmentServer/SelectBusinesses/execute?SearchString=Fireproofing&SpatialFilter={"Locations":["NY,TONAWANDA,14150","KY,LOUISVILLE,40204","WA,SEATTLE,98108"]}&f=PJSON

JSON response example
{
  "results" : [ {
    "paramName" : "RecordSet",
    "dataType" : "GPFeatureRecordSetLayer",
    "value" : {
      "displayFieldName" : "",
      "fieldAliases" : {
        "OBJECTID" : "OBJECTID",
        "LOCNUM" : "LOCNUM",
        "CONAME" : "CONAME",
        "ADDR" : "ADDR",
        "STREET" : "STREET",
        "CITY" : "CITY",
        "STATE" : "STATE",
        "STATE_NAME" : "STATE_NAME",
        "ZIP" : "ZIP",
        "ZIP4" : "ZIP4",
        "NAICS" : "NAICS",
        "SIC" : "SIC",
        "SALESVOL" : "SALESVOL",
        "HDBRCH" : "HDBRCH",
        "EMPNUM" : "EMPNUM",
        "FRNCOD" : "FRNCOD",
        "ISCODE" : "ISCODE",
        "SQFTCODE" : "SQFTCODE",
        "LOC_NAME" : "LOC_NAME",
        "STATUS" : "STATUS",
        "SCORE" : "SCORE",
        "SOURCE" : "SOURCE"
      },
      "fields" : [ {
        "name" : "OBJECTID",
        "type" : "esriFieldTypeOID",
        "alias" : "OBJECTID"
      }, {
        "name" : "LOCNUM",
        "type" : "esriFieldTypeString",
        "alias" : "LOCNUM",
        "length" : 256
      }, {
        "name" : "CONAME",
        "type" : "esriFieldTypeString",
        "alias" : "CONAME",
        "length" : 256
      }, {
        "name" : "ADDR",
        "type" : "esriFieldTypeString",
        "alias" : "ADDR",
        "length" : 256
      }, {
        "name" : "STREET",
        "type" : "esriFieldTypeString",
        "alias" : "STREET",
        "length" : 256
      }, {
        "name" : "CITY",
        "type" : "esriFieldTypeString",
        "alias" : "CITY",
        "length" : 256
      }, {
        "name" : "STATE",
        "type" : "esriFieldTypeString",
        "alias" : "STATE",
        "length" : 256
      }, {
        "name" : "STATE_NAME",
        "type" : "esriFieldTypeString",
        "alias" : "STATE_NAME",
        "length" : 256
      }, {
        "name" : "ZIP",
        "type" : "esriFieldTypeString",
        "alias" : "ZIP",
        "length" : 256
      }, {
        "name" : "ZIP4",
        "type" : "esriFieldTypeString",
        "alias" : "ZIP4",
        "length" : 256
      }, {
        "name" : "NAICS",
        "type" : "esriFieldTypeString",
        "alias" : "NAICS",
        "length" : 256
      }, {
        "name" : "SIC",
        "type" : "esriFieldTypeString",
        "alias" : "SIC",
        "length" : 256
      }, {
        "name" : "SALESVOL",
        "type" : "esriFieldTypeInteger",
        "alias" : "SALESVOL"
      }, {
        "name" : "HDBRCH",
        "type" : "esriFieldTypeString",
        "alias" : "HDBRCH",
        "length" : 256
      }, {
        "name" : "EMPNUM",
        "type" : "esriFieldTypeInteger",
        "alias" : "EMPNUM"
      }, {
        "name" : "FRNCOD",
        "type" : "esriFieldTypeString",
        "alias" : "FRNCOD",
        "length" : 256
      }, {
        "name" : "ISCODE",
        "type" : "esriFieldTypeString",
        "alias" : "ISCODE",
        "length" : 256
      }, {
        "name" : "SQFTCODE",
        "type" : "esriFieldTypeString",
        "alias" : "SQFTCODE",
        "length" : 256
      }, {
        "name" : "LOC_NAME",
        "type" : "esriFieldTypeString",
        "alias" : "LOC_NAME",
        "length" : 256
      }, {
        "name" : "STATUS",
        "type" : "esriFieldTypeString",
        "alias" : "STATUS",
        "length" : 256
      }, {
        "name" : "SCORE",
        "type" : "esriFieldTypeInteger",
        "alias" : "SCORE"
      }, {
        "name" : "SOURCE",
        "type" : "esriFieldTypeString",
        "alias" : "SOURCE",
        "length" : 256
      } ],
      "features" : [ {
        "attributes" : {
          "SALESVOL" : 1538,
          "LOCNUM" : "136527660",
          "ZIP4" : "1841",
          "STATE" : "KY",
          "FRNCOD" : " ",
          "EMPNUM" : 10,
          "SCORE" : 100,
          "CONAME" : "FIREPROOF STORAGE & MOVING",
          "STATUS" : "M",
          "STREET" : "MASON AVE",
          "LOC_NAME" : "PointAddress",
          "SQFTCODE" : "B",
          "SOURCE" : "INFOGROUP",
          "SIC" : "421401",
          "ZIP" : "40204",
          "HDBRCH" : " ",
          "STATE_NAME" : "Kentucky",
          "ogc_fid" : 9005043,
          "CITY" : "LOUISVILLE",
          "ISCODE" : " ",
          "ADDR" : "908 MASON AVE",
          "NAICS" : "48411009",
          "OBJECTID" : 1
        }
      } ]
    }
  } ],
  "messages" : [ {
    "provider" : "InfoGroup"
  } ]
}

Notes:

  • Returns the variables that match the search criteria.