Booking

免费增值
通过 Api Dojo | 已更新 7日前 | 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ヶ月前

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

Rapid account: Apidojo
apidojo Commented 2ヶ月前

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ヶ月前

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ヶ月前

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ヶ月前

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ヶ月前

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ヶ月前

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

加入讨论 - 在下面添加评论:

登录/注册以发布新的评论