Booking

FREEMIUM
By Api Dojo | Updated 24 days ago | Travel
Popularity

9.9 / 10

Latency

2,721ms

Service Level

100%

Health Check

N/A

Back to All Discussions

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

Rapid account: Beebap 75
beebap75
2 months ago

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

Rapid account: Apidojo
apidojo Commented 2 months ago

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 2 months ago

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 2 months ago

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 2 months ago

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 2 months ago

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 2 months ago

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

Join in the discussion - add comment below:

Login / Signup to post new comments