1. Select Location

Number - The latitude of the requested location (North). Also supported: latitude, y
Number - The longitude of the requested location (East). Also supported: longitude, x
String - The 5-digit zip code of the location. Note that USPS zip code areas do not align precisely with Census geographies, so when high accuracy is required it is recommended to use latitude and longitude. Specified as a string because certain zip codes begin with zeroes.

String - The 2-letter USPS state code. It will be converted into the latitude and longitude of that state's capital.

Object - Represents the address of the requested location.

Some common co-ordinates:
Name Lat (N) Lng (E)
Washington DC 38.9047 -77.0164
Seattle 47.6097 -122.3331
Honolulu 21.3000 -157.8167
Miami 25.7753 -80.2089
Houston 29.7604 -95.3698

2. Submit


Get the Data

The Returned Data



                                var sdk = new CitySDK();
                                var farmersMarkets = sdk.modules.farmersMarket;

                                var request = {};

                                farmersMarkets.APIRequest(request, function (response) {

                                if (response.results[0]['id'] != "Error") {

                                for (var i = 0; i < response.results.length; i++) {
                                jQuery('#output table tbody').append("<tr><td>" +
                                response.results[i].marketname + '</td><td class="centeredCellButton
                                details-link"><input type="submit" class="btn btn-xs
                                btn-primary" value="View Details" onclick="details(' +
                                response.results[i].id + ',\'' +
                                String(response.results[i].marketname).replace(/(['"])/g, "\\$1") +

                                } else {

                                jQuery('#output').append('<br/><div class="alert alert-warning"
                                role="alert"><strong>No Data.</strong> There are no farmers
                                markets matching the requested location.</div>');