You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

16 KiB

valid search query

Generated: Wed Sep 17 2014 17:51:29 GMT-0400 (EDT)

Request

{
  "protocol": "http:",
  "host": "localhost",
  "method": "GET",
  "port": 3100,
  "path": "/search?input=lake&lat=29.49136&lon=-82.50622"
}

Response

Status: 200
{
  "x-powered-by": "mapzen",
  "charset": "utf8",
  "cache-control": "public,max-age=60",
  "server": "Pelias/0.0.0",
  "access-control-allow-origin": "*",
  "access-control-allow-methods": "GET",
  "access-control-allow-headers": "X-Requested-With,content-type",
  "access-control-allow-credentials": "true",
  "content-type": "application/json; charset=utf-8",
  "content-length": "9257",
  "etag": "W/\"OND3fubDpKm+gxn7v+gcfQ==\"",
  "date": "Wed, 17 Sep 2014 21:51:29 GMT",
  "connection": "close"
}
{
  "date": 1410990689582,
  "body": [
    {
      "name": {
        "default": "Bluff Lake"
      },
      "admin0": "United States",
      "admin1": "Georgia",
      "admin2": "Charlton County",
      "center_point": {
        "lat": "30.87884",
        "lon": "-82.1479"
      },
      "suggest": {
        "input": [
          "bluff lake"
        ],
        "payload": {
          "id": "geoname/4047948",
          "geo": "-82.1479,30.87884"
        },
        "output": "Bluff Lake, Charlton County, United States"
      }
    },
    {
      "name": {
        "default": "Lake Midget"
      },
      "admin0": "United States",
      "admin1": "Florida",
      "admin2": "Polk County",
      "center_point": {
        "lat": "28.04302",
        "lon": "-81.57802"
      },
      "suggest": {
        "input": [
          "lake midget"
        ],
        "payload": {
          "id": "geoname/4047858",
          "geo": "-81.57802,28.04302"
        },
        "output": "Lake Midget, Polk County, United States"
      }
    },
    {
      "name": {
        "default": "Seagrove Lake"
      },
      "admin0": "United States",
      "admin1": "Georgia",
      "admin2": "Ware County",
      "center_point": {
        "lat": "30.70884",
        "lon": "-82.17151"
      },
      "suggest": {
        "input": [
          "seagrove lake"
        ],
        "payload": {
          "id": "geoname/4221821",
          "geo": "-82.17151,30.70884"
        },
        "output": "Seagrove Lake, Ware County, United States"
      }
    },
    {
      "name": {
        "default": "Wilkerson Lake"
      },
      "admin0": "United States",
      "admin1": "Georgia",
      "admin2": "Clinch County",
      "center_point": {
        "lat": "30.76827",
        "lon": "-82.80764"
      },
      "suggest": {
        "input": [
          "wilkerson lake"
        ],
        "payload": {
          "id": "geoname/4231020",
          "geo": "-82.80764,30.76827"
        },
        "output": "Wilkerson Lake, Clinch County, United States"
      }
    },
    {
      "name": {
        "default": "Sunset Lake"
      },
      "admin0": "United States",
      "admin1": "Georgia",
      "admin2": "Lowndes County",
      "center_point": {
        "lat": "30.65978",
        "lon": "-83.25091"
      },
      "suggest": {
        "input": [
          "sunset lake"
        ],
        "payload": {
          "id": "geoname/4225258",
          "geo": "-83.25091,30.65978"
        },
        "output": "Sunset Lake, Lowndes County, United States"
      }
    },
    {
      "name": {
        "default": "Lake Wilson"
      },
      "admin0": "United States",
      "admin1": "Florida",
      "admin2": "Osceola County",
      "center_point": {
        "lat": "28.3353",
        "lon": "-81.59836"
      },
      "suggest": {
        "input": [
          "lake wilson"
        ],
        "payload": {
          "id": "geoname/4178484",
          "geo": "-81.59836,28.3353"
        },
        "output": "Lake Wilson, Osceola County, United States"
      }
    },
    {
      "name": {
        "default": "Lake Willisara"
      },
      "admin0": "United States",
      "admin1": "Florida",
      "admin2": "Orange County",
      "center_point": {
        "lat": "28.50804",
        "lon": "-81.3612"
      },
      "suggest": {
        "input": [
          "lake willisara"
        ],
        "payload": {
          "id": "geoname/4178413",
          "geo": "-81.3612,28.50804"
        },
        "output": "Lake Willisara, Orange County, United States"
      }
    },
    {
      "name": {
        "default": "Church Lake"
      },
      "admin0": "United States",
      "admin1": "Florida",
      "admin2": "Putnam County",
      "center_point": {
        "lat": "29.65132",
        "lon": "-81.86765"
      },
      "suggest": {
        "input": [
          "church lake"
        ],
        "payload": {
          "id": "geoname/4150918",
          "geo": "-81.86765,29.65132"
        },
        "output": "Church Lake, Putnam County, United States"
      }
    },
    {
      "name": {
        "default": "Lake Citrus"
      },
      "admin0": "United States",
      "admin1": "Florida",
      "admin2": "Pinellas County",
      "center_point": {
        "lat": "27.99792",
        "lon": "-82.75207"
      },
      "suggest": {
        "input": [
          "lake citrus"
        ],
        "payload": {
          "id": "geoname/4151171",
          "geo": "-82.75207,27.99792"
        },
        "output": "Lake Citrus, Pinellas County, United States"
      }
    },
    {
      "name": {
        "default": "Clear Lake"
      },
      "admin0": "United States",
      "admin1": "Florida",
      "admin2": "Lake County",
      "center_point": {
        "lat": "28.60427",
        "lon": "-81.78748"
      },
      "suggest": {
        "input": [
          "clear lake"
        ],
        "payload": {
          "id": "geoname/4151287",
          "geo": "-81.78748,28.60427"
        },
        "output": "Clear Lake, Lake County, United States"
      }
    },
    {
      "name": {
        "default": "Clear Lake"
      },
      "admin0": "United States",
      "admin1": "Florida",
      "admin2": "Putnam County",
      "center_point": {
        "lat": "29.62033",
        "lon": "-81.96045"
      },
      "suggest": {
        "input": [
          "clear lake"
        ],
        "payload": {
          "id": "geoname/4151296",
          "geo": "-81.96045,29.62033"
        },
        "output": "Clear Lake, Putnam County, United States"
      }
    },
    {
      "name": {
        "default": "Clearview Lake"
      },
      "admin0": "United States",
      "admin1": "Florida",
      "admin2": "Lake County",
      "center_point": {
        "lat": "28.93511",
        "lon": "-81.88448"
      },
      "suggest": {
        "input": [
          "clearview lake"
        ],
        "payload": {
          "id": "geoname/4151315",
          "geo": "-81.88448,28.93511"
        },
        "output": "Clearview Lake, Lake County, United States"
      }
    },
    {
      "name": {
        "default": "Clear Lake"
      },
      "admin0": "United States",
      "admin1": "Florida",
      "admin2": "Alachua County",
      "center_point": {
        "lat": "29.65102",
        "lon": "-82.39114"
      },
      "suggest": {
        "input": [
          "clear lake"
        ],
        "payload": {
          "id": "geoname/4151324",
          "geo": "-82.39114,29.65102"
        },
        "output": "Clear Lake, Alachua County, United States"
      }
    },
    {
      "name": {
        "default": "Clearwater Lake"
      },
      "admin0": "United States",
      "admin1": "Florida",
      "admin2": "Marion County",
      "center_point": {
        "lat": "29.07267",
        "lon": "-82.504"
      },
      "suggest": {
        "input": [
          "clearwater lake"
        ],
        "payload": {
          "id": "geoname/4151333",
          "geo": "-82.504,29.07267"
        },
        "output": "Clearwater Lake, Marion County, United States"
      }
    },
    {
      "name": {
        "default": "Lake Clifton"
      },
      "admin0": "United States",
      "admin1": "Florida",
      "admin2": "Volusia County",
      "center_point": {
        "lat": "29.1606",
        "lon": "-81.34513"
      },
      "suggest": {
        "input": [
          "lake clifton"
        ],
        "payload": {
          "id": "geoname/4151377",
          "geo": "-81.34513,29.1606"
        },
        "output": "Lake Clifton, Volusia County, United States"
      }
    },
    {
      "name": {
        "default": "Lake Clough"
      },
      "admin0": "United States",
      "admin1": "Florida",
      "admin2": "Volusia County",
      "center_point": {
        "lat": "28.99362",
        "lon": "-81.23336"
      },
      "suggest": {
        "input": [
          "lake clough"
        ],
        "payload": {
          "id": "geoname/4151386",
          "geo": "-81.23336,28.99362"
        },
        "output": "Lake Clough, Volusia County, United States"
      }
    },
    {
      "name": {
        "default": "Connell Lake"
      },
      "admin0": "United States",
      "admin1": "Florida",
      "admin2": "Citrus County",
      "center_point": {
        "lat": "28.86965",
        "lon": "-82.3506"
      },
      "suggest": {
        "input": [
          "connell lake"
        ],
        "payload": {
          "id": "geoname/4151719",
          "geo": "-82.3506,28.86965"
        },
        "output": "Connell Lake, Citrus County, United States"
      }
    },
    {
      "name": {
        "default": "Cook Lake"
      },
      "admin0": "United States",
      "admin1": "Florida",
      "admin2": "Lake County",
      "center_point": {
        "lat": "28.83482",
        "lon": "-81.78047"
      },
      "suggest": {
        "input": [
          "cook lake"
        ],
        "payload": {
          "id": "geoname/4151764",
          "geo": "-81.78047,28.83482"
        },
        "output": "Cook Lake, Lake County, United States"
      }
    },
    {
      "name": {
        "default": "Cooper Lake"
      },
      "admin0": "United States",
      "admin1": "Florida",
      "admin2": "Putnam County",
      "center_point": {
        "lat": "29.62934",
        "lon": "-81.94266"
      },
      "suggest": {
        "input": [
          "cooper lake"
        ],
        "payload": {
          "id": "geoname/4151827",
          "geo": "-81.94266,29.62934"
        },
        "output": "Cooper Lake, Putnam County, United States"
      }
    },
    {
      "name": {
        "default": "Lake Corrine"
      },
      "admin0": "United States",
      "admin1": "Florida",
      "admin2": "Orange County",
      "center_point": {
        "lat": "28.57264",
        "lon": "-81.32241"
      },
      "suggest": {
        "input": [
          "lake corrine"
        ],
        "payload": {
          "id": "geoname/4152000",
          "geo": "-81.32241,28.57264"
        },
        "output": "Lake Corrine, Orange County, United States"
      }
    },
    {
      "name": {
        "default": "Cove Lake"
      },
      "admin0": "United States",
      "admin1": "Florida",
      "admin2": "Dixie County",
      "center_point": {
        "lat": "29.81069",
        "lon": "-83.00354"
      },
      "suggest": {
        "input": [
          "cove lake"
        ],
        "payload": {
          "id": "geoname/4152097",
          "geo": "-83.00354,29.81069"
        },
        "output": "Cove Lake, Dixie County, United States"
      }
    },
    {
      "name": {
        "default": "Crooked Lake"
      },
      "admin0": "United States",
      "admin1": "Florida",
      "admin2": "Orange County",
      "center_point": {
        "lat": "28.5929",
        "lon": "-81.48204"
      },
      "suggest": {
        "input": [
          "crooked lake"
        ],
        "payload": {
          "id": "geoname/4152358",
          "geo": "-81.48204,28.5929"
        },
        "output": "Crooked Lake, Orange County, United States"
      }
    },
    {
      "name": {
        "default": "Lake Crosby"
      },
      "admin0": "United States",
      "admin1": "Florida",
      "admin2": "Bradford County",
      "center_point": {
        "lat": "29.94273",
        "lon": "-82.15715"
      },
      "suggest": {
        "input": [
          "lake crosby"
        ],
        "payload": {
          "id": "geoname/4152376",
          "geo": "-82.15715,29.94273"
        },
        "output": "Lake Crosby, Bradford County, United States"
      }
    },
    {
      "name": {
        "default": "Lake Crowell"
      },
      "admin0": "United States",
      "admin1": "Florida",
      "admin2": "Orange County",
      "center_point": {
        "lat": "28.41965",
        "lon": "-81.49589"
      },
      "suggest": {
        "input": [
          "lake crowell"
        ],
        "payload": {
          "id": "geoname/4152440",
          "geo": "-81.49589,28.41965"
        },
        "output": "Lake Crowell, Orange County, United States"
      }
    },
    {
      "name": {
        "default": "Crystal Lake"
      },
      "admin0": "United States",
      "admin1": "Florida",
      "admin2": "Polk County",
      "center_point": {
        "lat": "27.86861",
        "lon": "-81.71079"
      },
      "suggest": {
        "input": [
          "crystal lake"
        ],
        "payload": {
          "id": "geoname/4152466",
          "geo": "-81.71079,27.86861"
        },
        "output": "Crystal Lake, Polk County, United States"
      }
    },
    {
      "name": {
        "default": "Crystal Lake"
      },
      "admin0": "United States",
      "admin1": "Florida",
      "admin2": "Seminole County",
      "center_point": {
        "lat": "28.77055",
        "lon": "-81.31479"
      },
      "suggest": {
        "input": [
          "crystal lake"
        ],
        "payload": {
          "id": "geoname/4152475",
          "geo": "-81.31479,28.77055"
        },
        "output": "Crystal Lake, Seminole County, United States"
      }
    },
    {
      "name": {
        "default": "Cypress Lake"
      },
      "admin0": "United States",
      "admin1": "Florida",
      "admin2": "Lake County",
      "center_point": {
        "lat": "28.43075",
        "lon": "-81.76247"
      },
      "suggest": {
        "input": [
          "cypress lake"
        ],
        "payload": {
          "id": "geoname/4152637",
          "geo": "-81.76247,28.43075"
        },
        "output": "Cypress Lake, Lake County, United States"
      }
    },
    {
      "name": {
        "default": "Deer Lake"
      },
      "admin0": "United States",
      "admin1": "Florida",
      "admin2": "Marion County",
      "center_point": {
        "lat": "29.20003",
        "lon": "-81.83805"
      },
      "suggest": {
        "input": [
          "deer lake"
        ],
        "payload": {
          "id": "geoname/4153052",
          "geo": "-81.83805,29.20003"
        },
        "output": "Deer Lake, Marion County, United States"
      }
    },
    {
      "name": {
        "default": "Lake Deer"
      },
      "admin0": "United States",
      "admin1": "Florida",
      "admin2": "Polk County",
      "center_point": {
        "lat": "28.02571",
        "lon": "-81.76317"
      },
      "suggest": {
        "input": [
          "lake deer"
        ],
        "payload": {
          "id": "geoname/4153070",
          "geo": "-81.76317,28.02571"
        },
        "output": "Lake Deer, Polk County, United States"
      }
    },
    {
      "name": {
        "default": "Dempsey Lake"
      },
      "admin0": "United States",
      "admin1": "Florida",
      "admin2": "Suwannee County",
      "center_point": {
        "lat": "30.37031",
        "lon": "-83.18977"
      },
      "suggest": {
        "input": [
          "dempsey lake"
        ],
        "payload": {
          "id": "geoname/4153160",
          "geo": "-83.18977,30.37031"
        },
        "output": "Dempsey Lake, Suwannee County, United States"
      }
    }
  ]
}

Tests

✓ 200 ok

response.statusCode.should.equal 200

✓ valid response

now = new Date().getTime()
should.exist json
should.not.exist json.error
should.exist json.date
json.date.should.be.within now-2000, now+2000
should.exist json.body
json.body.should.be.instanceof Array