0

ZIP code lookup

Hello All,

I am looking for ZIP code lookup functionality based on Street,City and State.Is there any way I can get it either using YQL or Yahoo BOSS search API?

Thanks, Naidu

by
2 Replies
  • Use YQL

    select * from geo.placefinder where text="sunnyvale, USA"
    

    This will return zip code

    {
     "query": {
      "count": 2,
      "created": "2012-12-28T12:30:07Z",
      "lang": "en-US",
      "diagnostics": {
       "publiclyCallable": "true",
       "url": {
        "execution-start-time": "1",
        "execution-stop-time": "248",
        "execution-time": "247",
        "content": "http://where.yahooapis.com/geocode?locale=en_US&flags=&offset=15&gflags=&q=sunnyvale%2c%20USA&start=0&count=100"
       },
       "user-time": "249",
       "service-time": "247",
       "build-version": "32943"
      },
      "results": {
       "Result": [
        {
         "quality": "40",
         "latitude": "37.371609",
         "longitude": "-122.038254",
         "offsetlat": "37.371609",
         "offsetlon": "-122.038254",
         "radius": "8200",
         "name": null,
         "line1": null,
         "line2": "Sunnyvale, CA",
         "line3": null,
         "line4": "United States",
         "house": null,
         "street": null,
         "xstreet": null,
         "unittype": null,
         "unit": null,
         "postal": null,
         "neighborhood": null,
         "city": "Sunnyvale",
         "county": "Santa Clara County",
         "state": "California",
         "country": "United States",
         "countrycode": "US",
         "statecode": "CA",
         "countycode": null,
         "uzip": "94086",
         "hash": null,
         "woeid": "2502265",
         "woetype": "7"
        },
        {
         "quality": "40",
         "latitude": "32.780331",
         "longitude": "-96.547401",
         "offsetlat": "32.780331",
         "offsetlon": "-96.547401",
         "radius": "5300",
         "name": null,
         "line1": null,
         "line2": "Sunnyvale, TX",
         "line3": null,
         "line4": "United States",
         "house": null,
         "street": null,
         "xstreet": null,
         "unittype": null,
         "unit": null,
         "postal": null,
         "neighborhood": null,
         "city": "Sunnyvale",
         "county": "Dallas County",
         "state": "Texas",
         "country": "United States",
         "countrycode": "US",
         "statecode": "TX",
         "countycode": null,
         "uzip": "75182",
         "hash": null,
         "woeid": "2502264",
         "woetype": "7"
        }
       ]
      }
     }
    }
    
    2
  • Thanks Markandey.I hope YQL can be used for commercial purpose.

    Thanks, Naidu

    0

Recent Posts

in YQL