Best We Hotel BigQuery

Get Best We Hotel rates into BigQuery.

One endpoint call, the BigQuery 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.

Best We Hotel Best We Hotel

Best We Hotel adds Jin Jiang's China-focused hotel catalogue, bilingual property content, guest reviews, and direct CNY room rates for teams that need stronger mainland coverage. Below, those nightly rates land in BigQuery as sortable rows.

BigQuery BigQuery

BigQuery wants rows, not API calls. A small scheduled job fetches the JSON, flattens the fields you care about, and appends them to a table, so history accumulates and SQL does the rest. In this guide it reads Best We Hotel rates straight from the StayAPI endpoint.

The call

One endpoint returns Best We Hotel rates.

The Best We Hotel Rooms 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 BigQuery to the endpoint.

  1. 01

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

  2. 02

    Create a dataset and table with the schema below.

  3. 03

    Run the Python script below on a schedule (Cloud Run jobs and Cloud Scheduler work well).

  4. 04

    Query the table or point your BI layer at it.

Config

Python: fetch and insert.

This uses the real endpoint URL with the example Jin Jiang Tower Shanghai id. Swap in your hotel id and your API key.

load.py
import requests, psycopg2

URL = "https://api.stayapi.com/v1/bestwe/hotel/rooms?property_id=JJ1089&check_in=2026-05-01&check_out=2026-05-03"
HEADERS = {"X-API-Key": "YOUR_API_KEY"}

resp = requests.get(URL, headers=HEADERS, timeout=30)
resp.raise_for_status()
body = resp.json()
records = body.get("data", {}).get("reviews") or body.get("reviews") or body.get("rooms") or []

conn = psycopg2.connect(dsn="YOUR_CONNECTION_STRING")
cur = conn.cursor()
for r in records:
    cur.execute(
        "INSERT INTO stay_data (check_in, check_out, nights, currency) VALUES (%s, %s, %s, %s)",
        (r.get("check_in"), r.get("check_out"), r.get("nights"), r.get("currency")),
    )
conn.commit()
cur.close()
conn.close()

50 free requests on signup, no card.

Field mapping

Response fields to columns.

Each field from the Best We Hotel Rooms response, and a suggested column name.

Response field Column
property_id property_id
check_in check_in
check_out check_out
nights nights
currency currency
code code
name name
available_rooms available_rooms
per_night per_night
stay_total stay_total
bookable bookable
breakfast_included breakfast_included
cancellation_policy cancellation_policy
member_rate member_rate
total total
Result

What it looks like in BigQuery.

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

The columns you get

Every row is one hotel record from the Best We Hotel Rooms response. These fields become columns:

  • property_id
  • check_in
  • check_out
  • nights
  • currency
  • code

Get your key.

Sign up, copy your key into the snippet above, and pull live Best We Hotel rates into BigQuery.

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