Booking

FREEMIUM
(Ким) Api Dojo | Оновлено 7 giorni fa | Travel
Популярність

9.9 / 10

Затримки

2,634ms

Рівень обслуговування

100%

Health Check

N/A

Повернутися до всіх обговорень

When I use the API I always receive : search_id:""

Rapid account: Beebap 75
beebap75
3 mesi fa

How can I receive the right search_id to use it with the offset then?
thanks!

Rapid account: Apidojo
apidojo Commented 2 mesi fa

Hello,

The search_id parameter has already deprecated. You can simply ignore it and use only the “offset” parameter to load the next page. The items per response is fixed at 20 records.

Regards.

Rapid account: Apidojo
apidojo Commented 3 mesi fa

Hello,

It seems like the official developer of Booking did change something to the official system. I will forward your issue to the IT team for review.

Regards.

Rapid account: Beebap 75
beebap75 Commented 3 mesi fa

Sure! Thanks.
This is the entire request:

  string baseURL = $"https://apidojo-booking-v1.p.rapidapi.com/";
  var client = new RestClient(baseURL);
  client.AddDefaultQueryParameter("offset","0");
  client.AddDefaultQueryParameter("arrival_date", "2024-03-06");
  client.AddDefaultQueryParameter("departure_date", "2024-03-09");
  client.AddDefaultQueryParameter("guest_qty", "2");
  client.AddDefaultQueryParameter("dest_ids", "900040973"); 
  client.AddDefaultQueryParameter("room_qty", "1");
  client.AddDefaultQueryParameter("search_type", "city");
  client.AddDefaultQueryParameter("price_filter_currencycode", "EUR");
  client.AddDefaultQueryParameter("order_by", "popularity");
  client.AddDefaultQueryParameter("languagecode", "it");
  client.AddDefaultQueryParameter("search_id",  "none");


  var request = new RestRequest("properties/list", Method.Get);
  request.AddHeader("X-RapidAPI-Key", XRapidAPIKey);
  request.AddHeader("X-RapidAPI-Host", XRapidAPIHost);

  RestResponse response = client.Execute(request);


  if (response.IsSuccessful)
  {
		 
		 // response here is successful, I got the forst 20 results. However Search_ID  is "" ( null ) in response.content !
		
		}
Rapid account: Apidojo
apidojo Commented 3 mesi fa

Please send along with your request so I can reproduce it. Otherwise, I can’t help. In addition, you should recheck required parameters, you may miss it.

Regards.

Rapid account: Beebap 75
beebap75 Commented 3 mesi fa

Thanks!
I’m using RestSharp, I tested the endpont : “properties/list”

i.e.:
var request = new RestRequest(“properties/list”, Method.Get);
request.AddHeader(“X-RapidAPI-Key”, XRapidAPIKey);
request.AddHeader(“X-RapidAPI-Host”, XRapidAPIHost);
RestResponse response = client.Execute(request);

I receive successfully the first 20 results , but the property search_id  is aways null (search_id=""). 

what I miss here? 
Thanks!! 
Rapid account: Apidojo
apidojo Commented 3 mesi fa

The first init call always returns the right search_id to use with next queries with offset.

Приєднуйтесь до обговорення — додайте повідомлення нижче:

Вхід / Реєстрація, щоб публікувати нові повідомлення