Travel
Trip.com Scraper
trip.com
Trip.com covers flights, hotels and rail in a single catalogue, which makes it useful when you want several travel verticals without maintaining three separate scrapers.
What you can extract
- Flight and hotel search results
- Price, currency and fare class
- Property rating and review score
- Availability by date
- Deep links to the booking page
How to scrape it
curl -X POST \
-H "X-ScrapeUnblocker-Key: $SU_API_KEY" \
"https://api.scrapeunblocker.com/getPageSource?url=https%3A%2F%2Fwww.trip.com%2F&parsed_data=true"import requests
resp = requests.post(
"https://api.scrapeunblocker.com/getPageSource",
headers={"X-ScrapeUnblocker-Key": SU_API_KEY},
params={"url": "https://www.trip.com/", "parsed_data": True},
)
print(resp.text)import { ScrapeUnblockerClient } from 'scrapeunblocker';
const su = new ScrapeUnblockerClient({ apiKey: process.env.SU_API_KEY });
const results = await su.getPageSource({
url: 'https://www.trip.com/',
parsedData: true,
});
console.log(results); Requests are POST and take their parameters in the query string. Browser rendering always happens - there is no flag to enable.
Frequently asked questions
Is it legal to scrape Trip.com?
Collecting publicly available Trip.com data such as flight fares, hotel prices and ratings is lawful in many jurisdictions, but the rules depend on your country, the data you collect and how you use it. ScrapeUnblocker returns the public page; what you collect and how you use it is your responsibility.
How do I scrape Trip.com without getting blocked?
Trip.com uses bot detection and rate limiting. ScrapeUnblocker renders the page in a real browser, rotates residential and ISP exits and handles challenges, then returns the flight or hotel page as a traveller sees it. In ScrapeUnblocker's benchmark it returned real content on 100% of 1,000 calls, about 5.2s per call.
What Trip.com data can I get?
Flight and hotel search results, price, currency and fare class, property rating and review score, availability by date, and deep links to the booking page. Load a search results URL, or use steps to click, type and scroll through the search form before the page is returned. Add parsed_data=true for structured JSON.
Do I need a Trip.com API or account?
No. ScrapeUnblocker returns the public page as HTML, or structured JSON with parsed_data=true, so there is no Trip.com account, login or API key to set up. Send any Trip.com flight or hotel URL to /getPageSource with your ScrapeUnblocker key.
Can I scrape Trip.com from a specific country?
Yes. Add proxy_country with a two-letter code from the published country list, for example hk, sg or gb, and the request goes out through an exit in that country. Many sites show different prices or content by visitor country, so set it to the market you want to compare.
How much does it cost to scrape Trip.com?
Each /getPageSource call is one request, and 1 request = 1 credit: EUR 1.00 per 1,000 on pay as you go, down to about EUR 0.55 per 1,000 on the Ultimate plan. Blocks and timeouts are not billed. The free trial includes 500 requests with no card.
Related scrapers
Start scraping this site today
Free tier included. No credit card required to test it.