AI Income LabJoin AI Income Lab ↗

Scrape Klook hotels with Apify Agent Skills in Claude Code

Jump to video chapters

Watch on YouTube ↗ Subscribe on YouTube ↗

By · · 14:23 · 1,083 views

Written guide: Apify Agent Skills: Scrape Klook Hotels With Claude Code

Install Apify Agent Skills into Claude Code and use them to scrape Klook for luxury hotels in Koh Samui for a travel website. The first run returned unrelated Walt Disney World results, and prices came back empty until check-in dates were added.

Video summary

The video covers 12 parts: Introduction: Why Scrape Klook for Travel Data?, Overview of the Apify Actor Store (19,000+ Tools), Project Goal: Building a Luxury Hotel Website in Koh Samui, Installing Apify Agent Skills in the Terminal, Running the Ultimate Scraper Skill inside Claude Code, Troubleshooting: Fixing Scraper Context & Target URLs, Reviewing Scraped JSON Data (140+ Hotels), Building a Website without Writing a Single Line of Code, Advanced: Claude Writing Custom Playwright Scripts, Monitizing Data with Affiliate Links & Travel Payouts, Rescraping for Real-Time Pricing & Check-in Dates, and Outro & Join the Community.

What this video covers

What you build

A JSON file of Koh Samui hotel listings scraped from Klook to update a hotel directory website built with AI coding tools.

Tools used

Compare pricing: Apify. Some ↗ links are affiliate links, so I may earn a commission or credit. See every tool I recommend →

Key steps

Not covered

Summary written from the video's transcript and chapters.

In this video

  1. 0:00 Introduction: Why Scrape Klook for Travel Data?
  2. 0:42 Overview of the Apify Actor Store (19,000+ Tools)
  3. 1:16 Project Goal: Building a Luxury Hotel Website in Koh Samui
  4. 1:52 Installing Apify Agent Skills in the Terminal
  5. 2:21 Running the Ultimate Scraper Skill inside Claude Code
  6. 4:46 Troubleshooting: Fixing Scraper Context & Target URLs
  7. 5:30 Reviewing Scraped JSON Data (140+ Hotels)
  8. 7:11 Building a Website without Writing a Single Line of Code
  9. 9:41 Advanced: Claude Writing Custom Playwright Scripts
  10. 10:43 Monitizing Data with Affiliate Links & Travel Payouts
  11. 12:43 Rescraping for Real-Time Pricing & Check-in Dates
  12. 14:10 Outro & Join the Community

Questions and answers

How do I install Apify Agent Skills for Claude Code?

Run the one-line npx skills add command shown on the Apify Agent Skills GitHub page in your terminal. The skills then appear inside Claude Code.

What if there is no Apify actor for the site I want to scrape?

Claude Code wrote its own Playwright scraper that intercepted Klook's API responses when no suitable actor worked.

Why were hotel prices missing from the Klook scrape?

The page returned empty price fields, which likely needs check-in dates. Claude Code offered to add dates to the URL and rescrape.

Transcript

Hey there, welcome to the channel. In this video, I'm going to be taking you through step by step how to use Apify agent skills, which you can easily install into Claude Code. And in this case, we're going to be scraping cluke.com using one of the available skills. The reason I want to do this is because I'm building a travel agency website and we need all of this data. So, Apify makes it really, really easy. They're actually a sponsor of this video.

So hopefully you enjoy the tutorial. Please subscribe to the channel if you haven't already. And let's get into it. I've got the website pulled up here. I'm also going to leave a link down below if you want to sign up. It's completely free to get started. And as you can see, there's about 19,000 different actors that you can choose from here. Everything from Google map scrapers, Tik Tok scraper, you can scrape transcripts from YouTube, Facebook post scraper, trip advisor. The list goes on and on.

Read the rest of the transcript

But in this particular case, I want to use it for scraping a website called cluke.com, which is for both hotels and also tours. And in this particular case, I want to scrape this listing for luxury hotels in Kosamui, which is the island where I live in Thailand. I'm actually building a complete fullyfledged website over here, which lists all of the luxury hotels, and I actually want to update this because a lot of the prices are not right.

And on Booking.com, they don't really make it easy to scrape the prices because you have to select how many days you're staying and it's just not not very easy. So, if I just type in Apify agent skills right here, we can pull up the GitHub. And in order to actually install this, all you have to do is run this oneline command right here. npx skills add Apify agent skills. Right? So, you're just going to run that in the terminal. We can search for Apify.

And as you can see, here's all of the different skills that are now available. And it does a really good job of scraping different websites, including Booking.com. So, I've got uh Visual Studio Code running over here. And I just told it to scrape Cluke for luxury four and fivestar hotels in Kosamui, Thailand. And it, as you can see, it's spinning up the Apify Ultimate Scraper skill, which is one of the things that's included inside Amplify Agent Skills.

If I just go ahead and run this in the terminal, you can see it's going to start running the ultimate scraper. And I've also supplied it with the website that I want to scrape as well. So, we basically just have to approve these things and it will go ahead and start scraping all of this data. And as you can see, this is the key point. It includes the prices here as well.

And if we want to see more details, we can click here and it has all of the details on the page. Very, very similar to what I'm doing on my website over here. You can see this just opens up in its own popup modal right here with all of the information. It looks very, very similar to Booking.com in a lot of ways. And uh yeah, I built this completely for free using vibe coding tools like Claude Code and also Gemini 3.1.

So it looks really really good. And now I'm basically just optimizing the SEO. And I also want to fix up the hotel listings over here as well. And key point is I want all of these to be affiliate links so that anytime someone books a hotel on my website, I will get a a commission. uh which I'll talk more a little bit about later. Let's just go ahead and start scraping Cluke.

So you can see here the commands running in the background and the output is being written to this file which unfortunately it I'm in the wrong directory at the moment. So this is not going to work. I could also do the exact same thing over here in the terminal. So you can see it's asking what data would you like to scrape? So, I'm just going to say scrape cluke for luxury four and fivestar hotels.

And then from there, it's just a simple matter of entering that new data into my project over here. It's and it's pulling it in to the website over here. So, this one I think we're just going to exit out of that for now. And we can run it from the terminal over here. It says the user wants to scrape Cluke for luxury hotels in Simui. Cluke isn't in the default actor list. So, it needs to search the Apify store for a suitable actor.

It's passing in my Apify token, which I've already supplied to the agent. And now it's just going to start scraping Cluke. You can see here, search query, searching for that specific scraper. And it should find one relatively quickly here. I really think that the format over here is much better in terms of what I want. And they also have a lot of the hotels here that I want to include on my own website because these are all luxury four and fivestar hotels for the most part.

And another nice thing about the scraper is that it can just go through this and load all of the data. So even though it's not loading right away, it has a way to handle that as well. And now we're just going to hit run. And it will start scraping the website and it's going to put it into a nicely formatted JSON file. So, if we go ahead and open this up, you can see here's all of the information for the hotels.

I think it may be this one, actually. So, we'll just open this up here. And you can see, boom, there we go. So, there's all of the 140 plus hotels with all of the data that it was able to get from Booking.com. And I want to do something very, very similar for Cluke. Like I mentioned earlier, a lot of the prices are not correct um on the current listing. So I think it's going to get much better results using Cluke.

And again, this is available over here on GitHub. So all you have to do is come over here, get the direct link, and then clone it onto your local machine, and you can start running right away just with this simple command right here. So what we're going to do is we're just going to select the uh scraped Cluke Hotel data. So, in this case, I'm just going to use a JSON file. And we want to extract. Let's just do 150 hotels. Oops. Uh, cancel.

Well, we can start with 20 to 30 just for time sake. So, it's just going to go through this website over here. It's going to scrape 20 to 30 hotels. At the end, if I want to scrape more hotels, like let's say 100, 200, however many hotels, then I can go ahead and do so. on my website right now I have about 119 I think it's actually more like 140 hotels so if we scroll through this you can see really really nice interface still needs a

little bit of work but overall I think it's coming together quite nicely and yeah I didn't write a single line of code to build this website I just used AI tools to do it for me so very very powerful what you can do nowadays luckily Apify gave me some free credits so I've got about $55 $5 in credits over here just to kind of promote Apify a little bit more.

So, if you wouldn't mind, go ahead, sign up using my affiliate link in the description below and I'll just get a small commission on every sale. Really appreciate it. Just going to go ahead and click yes. And some of these things don't really look like what I want. So, it's showing like Walt Disney World Resort ticket. Not exactly sure what that is, but hopefully it's actually getting the right data here. says the search returned Disney World results. The actor didn't pick up the Kosamui context properly.

So, it's going to try with the Cluke accommodation URL for Kosamui directly. Maybe I should have provided that from the start. And you could also use something like Firebase, which is a Google product to scrape the websites as well, but I found this is a little bit more complicated to set up. And honestly, I've never really used it too much. I'd really just like the Apify skills which is built directly into Claude. Uh it looks like it's generated some data here.

So if we go ahead and pull this up, you can see that it's actually not getting the right URLs. Has something to do with Walt Disney World, which is definitely not what I want. And this one as well. That's the wrong data. This is also the wrong data. I'm just going to pass in the direct URL that I want to scrape. So, we're just going to say scrape this Cluke URL. Just going to paste in that direct URL.

So, it knows what it should be scraping because currently it doesn't seem to be on the right track. It's searching for Disney World tickets or something like that, which is definitely not what I want. But you can see that you just have to kind of play around with these things and and uh you know fix it up as you go along. So, now it says, "Let me try the Cluke actor with this specific URL. If it doesn't work, I'll use a generic web scraper.

And there's 4,700 actors available to choose from. So quite an extensive list. Pretty much any website for the most part you can scrape. And if there isn't an actor, um, Claude Code can actually build one for you as well. So there's really no excuses not to be using a tool like this for your scraping needs. Now, it's going to craft a playright scraper with a custom page function that intercepts Cluk's API calls to extract hotel data directly from their JSON responses.

So, in this case, it's not even going to use one of the pre-built actors. It's going to create its own Playright script and scrape all the data that way, which is pretty cool. It uses Playright Library to programmatically control a headless Chromium or Firefox browser and it can make it do almost anything. So in this case, it's actually just going to open up a browser and it's going to go through and just start scraping everything from a Chrome browser.

So looks like it now created the scraper, the Playright scraper. It says API interception worked and it captured Cluke's hotel search API. returning 459 hotels in Kosamui. And then it's going to extract and flatten all the hotel data. How cool is that? And another thing that I want to do on the website is make sure to use affiliate links for all of these.

So, instead of just going over to Booking.com, which isn't an affiliate link, I want to integrate it in with something like travel payouts, which allows you to join different affiliate programs. And then you can get your affiliate links through here as well. So, first of all, I just want to make sure that we get all of the hotels. Says they got 20 hotels from one API page, and it's going to pageionate through the Cluke hotel API directly to get all of the properties.

So, like I was talking about earlier, it could basically just go through and pageionate so that it can get all of the properties here. I don't necessarily need some of these because I'm not that interested in them unless they're for fivestar hotel. This one, for example, is definitely a five-star hotel. It's located in Bootut near Changangoi Beach, and it's about $600 a night to stay here. I can just copy and paste this.

We're going to come back over to our tool here and then we're just going to generate that cluke link. And you can see here the direct API is blocked. So it's going to write a smarter playwright script that scrolls to trigger the load more and it's going to capture all the API responses. So we'll see if it can write a smarter script. Shouldn't take too long. And again, this these scraper tools are very powerful. They don't use a lot of credits.

Like this particular one you can try for free. And I'm not exactly sure how many credits it uses, but if I come back over here, you can see my number of credits has gone up by like four cents or something like that. So, it's really not using that many credits. So, it looks like now it is fetching the correct data. We can see it's pulling in some hotels.

So, it just pulled in the Sala Simui Chuang Beach Resort, Centara Reserve, which is a five-star hotel, Vanabel, and quite a few other ones. And it says prices were not included in results as the page returned empty price fields. So that likely requires checkin dates unfortunately. Would you like me to add dates to the URL and rescrape to get pricing? Yes. So we're just going to go ahead and add the dates. But it looks like it was able to save about 49 hotels.

This is looking great so far. It even includes the reviews, the score, the rating, uh the location, which we're going to need for the maps. So, if I go ahead and open this up, you can see here's the map to the exact location and we can also show the map directly from here as well. And you can see where all the hotels are. So, yeah, very very cool how this works. So, it's getting the location data.

It's also getting it's not getting the price, which we definitely need to fix. and it's getting the URL to display more details which we're going to want for this particular page or once we actually open up the details. [snorts] And then once this is finished, we can go ahead and pull in that latest data and instead of 119 hotels, it should show about 450 hotels, which is the total number of hotels that it's going to get from the scrape.

And yeah, we're just waiting on those prices. Let's see if it can actually add all of the prices here. Hopefully, you've enjoyed this tutorial. Please subscribe to the channel if you haven't already. And I look forward to sharing more helpful tutorials like this. And also, go ahead, check out my Skool community. We've got about 2400 members in here at the time of recording. It's completely free to join and it's growing fast. So, would love to see you inside the Skool community.

And with that being said, thanks for watching. Signing off. Peace from Thailand. I will see you in the next one.

Not ready to join? Get the weekly build notes: new guides and tested builds in one short email.

You may also like