By default /people and /companies APIs sort results alphabetically usually by the StateProvince field first, but falls back to ID if it has to. However, there is another option for sorting results by distance from a geographic point. This is handy, especially when searching companies, to get just the closest results from a particular point, like where you are right now. To sort by distance from a point, simply supply the SortCenter parameter in a search. So, for example, lets say you want to find all the Infogroup offices, you might have a search like this:

POST  https://api.infoconnect.com/v1/companies

POST data: 

{
  "ResourceType":"Basic",
  "CompanyName":"Infogroup",
  "Limit":2
}

This will return the first two Infogroup records because we are using the limit parameter.

[
    {
        "ETag": "a420429c",
        "Id": "401967102",
        "Links": [
            {
                "Href": "/v1/companies/401967102",
                "Rel": "self"
            },
            {
                "Href": "/v1/companies/637824467",
                "Rel": "parent"
            }
        ],
        "Address": "2101 Rosecrans Ave # 4260",
        "AddressParsed": {
            "Name": "Rosecrans",
            "Number": "2101",
            "Suffix": "Ave",
            "UnitNumber": "4260"
        },
        "City": "El Segundo",
        "CompanyName": "Infogroup/Yesmail Interactive",
        "FirstName": "Nathan",
        "LastName": "Henson",
        "Location": {
            "Latitude": 33.902696,
            "Longitude": -118.387511
        },
        "PostalCode": "90245",
        "StateProvince": "CA",
        "ParentCompany": "637824467"
    },
    {
        "ETag": "6e5beb2f",
        "Id": "553530973",
        "Links": [
            {
                "Href": "/v1/companies/553530973",
                "Rel": "self"
            },
            {
                "Href": "/v1/companies/637824467",
                "Rel": "parent"
            }
        ],
        "Address": "222 Kearny St # 1000",
        "AddressParsed": {
            "Name": "Kearny",
            "Number": "222",
            "Suffix": "St",
            "UnitNumber": "1000"
        },
        "City": "San Francisco",
        "CompanyName": "Infogroup/Yesmail Interactive",
        "FirstName": "Adam",
        "LastName": "Strong",
        "Location": {
            "Latitude": 37.790196,
            "Longitude": -122.403663
        },
        "Phone": "4153430176",
        "PostalCode": "94108",
        "StateProvince": "CA",
        "ParentCompany": "637824467"
    }
]

The problem is that Infogroup has offices all over the United States, and these two records are for offices in California. Adding the SortCenter parameter to the search request and providing latitude/longitude coordinates lets you sort the results by how close they are to where you are!
Here is the updated example using the geographic coordinates for Burlington,MA:

POST  https://api.infoconnect.com/v1/companies

POST data: 

{
  "ResourceType":"Basic",
  "CompanyName":"Infogroup",
  "Limit":2,
  "SortCenter":{"latitude":"42.5047","longitude":"71.1961"}
}

This will still return the first two Infogroup records, but this time, we get the 2 records that are closest to Burlington, MA:

[
    {
        "ETag": "9065ddaf",
        "Id": "424202142",
        "Links": [
            {
                "Href": "/v1/companies/424202142",
                "Rel": "self"
            },
            {
                "Href": "/v1/companies/637824467",
                "Rel": "parent"
            }
        ],
        "Address": "24 New England Exec Park # 320",
        "AddressParsed": {
            "Name": "New England Executive",
            "Number": "24",
            "Suffix": "Park",
            "UnitNumber": "320"
        },
        "City": "Burlington",
        "CompanyName": "Infogroup/Enterprise Solutions",
        "FirstName": "Rajesh",
        "LastName": "Chakravarthy",
        "Location": {
            "Latitude": 42.485072,
            "Longitude": -71.211072
        },
        "Phone": "9783184558",
        "PostalCode": "01803",
        "StateProvince": "MA",
        "ParentCompany": "637824467"
    },
    {
        "ETag": "33f7b75",
        "Id": "413710965",
        "Links": [
            {
                "Href": "/v1/companies/413710965",
                "Rel": "self"
            },
            {
                "Href": "/v1/companies/637824467",
                "Rel": "parent"
            }
        ],
        "Address": "10 Vose Farm Rd",
        "AddressParsed": {
            "Name": "Vose Farm",
            "Number": "10",
            "Suffix": "Rd"
        },
        "City": "Peterborough",
        "CompanyName": "Infogroup/Direct Media Millard",
        "FirstName": "Judy",
        "LastName": "Gessner",
        "Location": {
            "Latitude": 42.914321,
            "Longitude": -71.935492
        },
        "PostalCode": "03458",
        "StateProvince": "NH",
        "ParentCompany": "637824467"
    }
]
This same technique is available for the /people API as well, which makes it easy to find consumers in a particular neighborhood or around the brand new Pizza place you just opened!