Posted by Infoconnect | about 11 months ago

Infoconnect supports a huge number of ways to search for companies or people based on geography. There are straight forward searches that use a city or ZIP code, or multiple cities and ZIP codes, even an area around one or more ZIP codes or even latitude / longitude coordinates. Infoconnect even supports searching an area based on a collection of latitude/longitude coordinates that form the vertices of a polygon.

The easiest way to search for a record is to use the City and State/Province, or a ZIP code. So to find all the Infogroup offices in Massachusetts you could do a simple search like this with the StateProvince field:

{
   "CompanyName":"Infogroup",
   "StateProvince":"MA"
}

Or you can expand your search and include all the states in New England using the StatesProvinces field (notice the plural). This field is actually an array, where as the other one is a simple string.

{
   "CompanyName":"Infogroup",
   "StatesProvinces":["MA","CT","ME","VT","NH","RI"]
}

You can do the same with ZIP codes also:

{
   "CompanyName":"Infogroup",
   "PostalCode":["01803"]
}

The PostalCode field is already an array, so it's really easy to just start adding other ZIP codes to the array and get a wider search.

{
   "CompanyName":"Infogroup",
   "PostalCode":["01803","06831"]
}

Or if you prefer you can use the actual City and State names instead of the ZIP codes like so:

{
   "CompanyName":"Infogroup",
   "City":"Burlington",
   "StateProvince":"MA"
}

Or look in multiple cities using the CitiesByStateProvince field.:

{
  "CompanyName":"Infogroup",
  "CitiesByStateProvince":[
    {"City":"Burlington", "StateProvince":"MA"},
    {"City":"Papillion","StateProvince":"NE"}
   ]
}

This field is an array objects with City and StateProvince provided.

City, State, and ZIP are only the beginning though! It's hard to get really targeted results with just those fields, especially if you are looking for very common things like convenience stores, or gas stations. It also doesn't help if you want to send a mailing to just a neighborhood. To get even more specific results you can search a small area around a ZIP code or, even better, a latitude / longitude coordinate. For ZIP codes, use the RadiusPostalCodeList field like this:

{
  "CompanyName":"Infogroup",
  "RadiusPostalCodeList": [
    { "PostalCode" : "01803",
      "RadiusMiles" : "2" 
    },
    { "PostalCode" : "06831",
      "RadiusMiles" : "2" 
    }
   ]
}

This field is an array of objects that contain the ZIP code and a radius in miles that you want to search in. If that isn't specific enough for your needs you can get even closer using a latitude / longitude coordinate and search around that using the RadiusCenterPointList field:

{
  "CompanyName":"Infogroup",
  "RadiusCenterPointList": [
    { "Latitude": 42.485072,
      "Longitude": -71.211072,
      "RadiusMiles" : "2" 
    },
    { "Latitude": 41.02819,
      "Longitude": -73.662289,
      "RadiusMiles" : "2" 
    }
   ]
}

What? That isn't specific enough for you?? Well how about searching within a polygon represented by a collection of points? Well, the PolygonList can do just that!

{
    "CompanyName": "Infogroup", 
    "PolygonList": [
        {
            "Points": [
                {
                    "Latitude": "42.48931", 
                    "Longitude": "-71.22505"
                }, 
                {
                    "Latitude": "42.48931", 
                    "Longitude": "-71.18008"
                }, 
                {
                    "Latitude": "42.47311", 
                    "Longitude": "-71.22505"
                }, 
                {
                    "Latitude": "42.47311", 
                    "Longitude": "-71.18008"
                }
            ]
        }
    ]
}

This example is a square but you can essentially do any shape you want! Imagine the possibilities!


Remember, all of these searches are supported with both the /people API in addition to the /companies API. I hope that got you thinking about how you can start getting specific about who you are targeting, whether it be consumers or companies. If you have any questions or want to see more, head over to our forums, or drop us an email at support@infoconnect.com!

Happy Coding!

- The Infoconnect Team