Hi there,
When i tried the parameters below. There is some missing data if compare with Google Map (attached file), you will see M Village Vo Thi Sau and M Village Tu Xuong are missing. Please check
const axios = require(‘axios’);
const options = {
method: ‘GET’,
url: ‘https://local-business-data.p.rapidapi.com/search-in-area’,
params: {
query: ‘hotel’,
lat: ‘10.779289’,
lng: ‘106.687581’,
zoom: ‘17’,
limit: ‘500’,
language: ‘vi’,
region: ‘vn’
},
headers: {
‘X-User-Agent’: ‘desktop’,
‘X-RapidAPI-Key’: ‘xxx’,
‘X-RapidAPI-Host’: ‘local-business-data.p.rapidapi.com’
}
};
try {
const response = await axios.request(options);
console.log(response.data);
} catch (error) {
console.error(error);
}
Partecipa alla discussione - aggiungi un commento di seguito:
Hi,
We’ve looked further into the phenomenon and it seems like for cetrain hotels (which might have an “incomplete” profile in a way), Google Maps will deprioritize them and might even omit from results, at least for most of the “Search in Area” queries.
From what I am seeing, Google Maps and the API will return the two hotels (“M Village Tú Xương” and “M Village Võ Thị Sáu”) when using different endpoints like the main Search. Here’s a query to the Search endpoint that returns both hotels for me:
curl --request GET
–url ‘https://local-business-data.p.rapidapi.com/search?query=hotel m village&limit=200&lat=10.7793048&lng=106.6850061&zoom=17&language=en®ion=us’
–header ‘x-rapidapi-host: local-business-data.p.rapidapi.com’
–header ‘x-rapidapi-key: xxxxxx’
Is it working for you? Is it possible for you to use this approach instead relative to your use case?
Thank you,
Adam
Hi,
We will further look into it and get back to you.
So what is the conclusion of it, is it because of Google Map algorithm? or you will check and fix it. Cause i need to full data to compare with Google Map data
Yes, I also see the same thing opening the link directly. It shows on the map but not on the list…
Hi, thanks for your information
By the way, when i tried to click on the link https://www.google.com/maps/search/hotel/@10.779289,106.687581,17z?gl=vn&hl=vi . I can see both “M Village Vo Thi Sau” and “M Village Tu Xuong”. Please check the photo attached.
We looked into what you broguht up and it’s indeed an interesting phenomenon that is probably related to how the Google algorithm works.
To see the data the API pulls for the Search in Area endpoint for your query you can open the following page on a desktop browser resized to 1000x1000: https://www.google.com/maps/search/hotel/@10.779289,106.687581,17z?gl=vn&hl=vi, at this point I see “M Village Vo Thi Sau” but not “M Village Tu Xuong”. Now, make sure the “Update results when map moves” checkbox is checked at the bottom of the search results and move/drag the screen a few centimeters somewhere and back to the same position. The results that are now displayed should be similar to what the API returns. Here, I am not getting “M Village Vo Thi Sau” or “M Village Tu Xuong”.
I hope things are a bit clearer now, at least as compared to Google Maps. We wlll continue to experiment with this and see what we can come up with.
Hi there,
Thank you for your message.
We will look into it shortly.
Also can you please remove your API Key from the discussion (the X-RapidAPI-Key header) (it is private)?
Thank you,
Adam