GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
findNearbyPostalCodesJSON - Getting two different result sets from same API call  XML
Forum Index -> General
Author Message
fundraisn



Joined: 11/01/2021 22:09:21
Messages: 2
Offline

Hey everyone!

I've been building a new web application using GeoNames for the past few months. It's been great and gives me exactly what I need. I've been using the free version for now, but with intention for premium once we scale.

The past couple weeks I've had some weird issues, though. Was hoping it was just a blip at the time.

My API call of getting nearby postal codes is actually randomly returning different result sets with the exact same endpoint and parameters. It's causing our soft-launch to have a lot of bumps due to it. Can someone help me out here? Below is the endpoint and params being used, and attached is screenshots of when I get different results. I just sit and refresh the page and eventually it gives different results.

The endpoint isn't changing, but is there something I'm doing wrong? It seems like every so often the endpoint is changing where it's getting results from.

http://api.geonames.org/findNearbyPostalCodesJSON?country=CA&radius=30&username=<insertUserName>&maxRows=100&postalcode=S4X4B1
[Thumb - Screen Shot 2021-01-11 at 3.12.09 PM.png]
 Description Result set 2... Based on the description of the API, this is the result I'm expecting to get. Postal codes are 3 characters for Canada and it's within the true 30km radius. [Disk] Download
 Filesize 150 Kbytes
 Downloaded:  9295 time(s)

[Thumb - Screen Shot 2021-01-11 at 3.12.19 PM.png]
 Description Result set 1... This is the result set I am NOT expecting to get. The postal code is 7 characters and all distances are under 1.0 radius. [Disk] Download
 Filesize 813 Kbytes
 Downloaded:  9288 time(s)

marc



Joined: 08/12/2005 07:39:47
Messages: 4266
Offline

we are deploying new data for Canada which covers all letters of the code and not only the first part. Depending on which server is answering your request you may already get the full result.
If you only want the first letters you can add isReduced=true to your search params.

Best Regards

Marc

[WWW]
fundraisn



Joined: 11/01/2021 22:09:21
Messages: 2
Offline

Thanks for the reply, Marc.

I figured the isReduced param may be a fix but when I use it I get the exact same problem. Sometimes it returns a single result and sometimes it returns the result set I expect.

I assume this is also related to the other issue where it's depending on which server is replying with the answer.

These very different results are causing some problems in our production environment. Is there an ETA of when the servers will be done loading Canada data and there won't be a 50/50 on which result set I'm getting?
marc



Joined: 08/12/2005 07:39:47
Messages: 4266
Offline

The rollout is finished, you should now get the same result on all free servers.

Note: on the premium servers the rollout did not yet happen, we first check the experiences on the free servers.

Best Regards

Marc

[WWW]
 
Forum Index -> General
Go to:   
Powered by JForum 2.1.5 © JForum Team