Ctrip Looker Studio

Get Ctrip rates into Looker Studio.

One endpoint call, the Looker Studio setup steps, and a field-to-column map. Then keep it refreshing on a schedule.

50 free requests on signup No credit card

Trusted by hospitality teams at

The pieces

One source, one destination.

Ctrip Ctrip

Ctrip adds China-focused hotel inventory, Chinese-language guest reviews, and public advertised room pricing for portfolios that need stronger mainland coverage. On this page those prices feed Looker Studio, one row per date.

Looker Studio Looker Studio

Looker Studio reads best from a data source that refreshes itself. The reliable pattern is a Google Sheet in the middle: a script fills it on a schedule, Looker Studio treats it as a live table. Here it becomes the front end for live Ctrip rates.

The call

One endpoint returns Ctrip rates.

The Ctrip Hotel Rooms and Lowest Price endpoint returns clean JSON for one hotel. Send your key in the X-API-Key header. See the endpoint docs for every parameter.

Setup

Wire Looker Studio to the endpoint.

  1. 01

    Create a StayAPI account and copy your API key from the dashboard.

  2. 02

    Load the API response into a Google Sheet with the Apps Script below, on a time-driven trigger.

  3. 03

    In Looker Studio, add that sheet as a data source.

  4. 04

    Build your report; it re-reads the sheet on each refresh.

Config

Apps Script: fill the bridge sheet.

This uses the real endpoint URL with the example 杭州临平万丽酒店 id. Swap in your hotel id and your API key.

refresh.gs
function refreshData() {
  var url = "https://api.stayapi.com/v1/ctrip/hotel/rooms/18078321";
  var response = UrlFetchApp.fetch(url, {
    method: "get",
    headers: { "X-API-Key": "YOUR_API_KEY" },
    muteHttpExceptions: true
  });

  var body = JSON.parse(response.getContentText());
  var records = (body.data && body.data.reviews) || body.reviews || body.rooms || [];

  var sheet = SpreadsheetApp.getActiveSheet();
  sheet.clear();
  sheet.appendRow(["retrieved_at", "check_in", "check_out", "nights", "adults"]);

  var now = new Date();
  records.forEach(function (r) {
    sheet.appendRow([now, r.check_in, r.check_out, r.nights, r.adults]);
  });
}

50 free requests on signup, no card.

Field mapping

Response fields to columns.

Each field from the Ctrip Hotel Rooms and Lowest Price response, and a suggested column name.

Response field Column
hotel_id hotel_id
check_in check_in
check_out check_out
nights nights
adults adults
children_ages children_ages
rooms_requested rooms_requested
currency currency
available available
lowest_price lowest_price
amount amount
basis basis
room_prices_included room_prices_included
room_price_limitation room_price_limitation
room_types room_types
price_visibility price_visibility
total_room_types total_room_types
total_rate_plans total_rate_plans
Result

What it looks like in Looker Studio.

The fields from the mapping above land as columns: hotel_id, check_in, check_out, nights. Refreshed on the schedule you set.

The columns you get

Every row is one hotel record from the Ctrip Hotel Rooms and Lowest Price response. These fields become columns:

  • hotel_id
  • check_in
  • check_out
  • nights
  • adults
  • children_ages

Get your key.

Sign up, copy your key into the snippet above, and pull live Ctrip rates into Looker Studio.

01 · the fast path

Try it free

50 free requests on signup. Fastest way to see if the schema fits.

Start free
  • Live API key in 30 seconds
  • No credit card required
  • Same schema as paid
02 · talk to us

Talk through your pipeline

15 minutes. Volume, endpoint mix, and where the data lands. Walk out with a quote.

Book a demo
  • Quote on the call, not after
  • Engineering, not sales
  • No deck, no slides