Idealista

ÜCRETSİZ PREMIUM
Verified
Taraf Api Dojo | Güncelleyen לפני 4 ימים | Business
Popülerlik

9.8 / 10

Gecikme

2,833ms

Hizmet Düzeyi

100%

Health Check

N/A

Tüm Tartışmalara Dön

Testing: Location doesn’t exist

Rapid account: Josemv
josemv
לפני שנתיים

hi, I ran an autocomplete search, and get the right string for Daimiel, in spain. Then ran following search but doesn’t works:

var axios = require(“axios”).default;

var options = {
method: ‘GET’,
url: ‘https://idealista2.p.rapidapi.com/properties/list’,
params: {
locationId: ‘0-EU-IT-RM-01-001-097-09-003’,
locationName: ‘Daimiel, Ciudad Real’,
operation: ‘sale’,
numPage: ‘1’,
maxItems: ‘40’,
sort: ‘asc’,
locale: ‘es’,
country: ‘es’
},
headers: {
‘x-rapidapi-host’: ‘idealista2.p.rapidapi.com’,
‘x-rapidapi-key’: ‘…’
}
};

axios.request(options).then(function (response) {
console.log(response.data);
}).catch(function (error) {
console.error(error);
});

Rapid account: Apidojo
apidojo Commented לפני שנתיים

Well,

You didn’t use the locationId returned in …/auto-complete endpoint, did you?

…/auto-complete?prefix=Daimiel&country=es
{
“locations”: [
{
“name”: “Daimiel, Ciudad Real”,
“locationId”: “0-EU-ES-13-02-001-039”,
“divisible”: false,
“type”: “location”,
“suggestedLocationId”: 23686,
“subTypeText”: “Municipio”
}
],
“total”: 1
}

‘0-EU-ES-13-02-001-039’ is locationId for ‘Daimiel, Ciudad Real’.

Then it must be …/properties/list?numPage=1&maxItems=40&locationId=0-EU-ES-13-02-001-039&order=price&locationName=Daimiel, Ciudad Real&sort=asc&locale=es&operation=sale&country=es

You should always review your requests, read parameter description carefully, fix your careless that should help.

Regards

Aşağıya yorum ekleyerek tartışmaya katılın:

Yeni yorumlar göndermek için giriş yapın / kaydolun