danludwig
danludwig

Reputation: 47375

Is this normal behavior for Yahoo PlaceFinder API? Seems odd to me

So I have this lat/lng pair, 39.905983/116.459373. Forever, the PlaceFinder API has been returning WOE ID 2151399 for this. Then suddenly it stopped, and started returning null (empty) instead.

I thought maybe the service was remembering that it had already done this for my API key, so I switched to another one. Still, null WOE ID. It makes sense because it is still processing other lat/lng pairs which I have also queried excessively during development.

I changed the values sent to the PlaceFinder query to 39.9059830001/116.4593730001 (just added 0001 to the end of each), and it started returning the WOE ID again.

My question: What gives?

Upvotes: 0

Views: 261

Answers (1)

BrianC
BrianC

Reputation: 10721

I tried the same query using PlaceFinder via the YQL Console:

select woeid from geo.placefinder where text="39.905983,116.459373" and gflags="R"

...and get the same WOEID result you mentioned:

<?xml version="1.0" encoding="UTF-8"?>
<query xmlns:yahoo="http://www.yahooapis.com/v1/base.rng"
    yahoo:count="1" yahoo:created="2012-03-20T16:24:40Z" yahoo:lang="en-US">
    <results>
        <Result>
            <woeid>2151399</woeid>
        </Result>
    </results>
</query>

I have not seen the behavior you mentioned, so I would consider it not normal. In the case where a null value is returned, do you have the normal HTTP status code? You might be running into a rate limit.

Upvotes: 1

Related Questions