# Klook Affiliate Hub (Promo Codes & Links) (`dariomory/klook-affiliate-partner-actor`) Actor

Klook Affiliate Automation: Browse authorized promo codes & discounts by destination, batch-convert URLs into tracked shortlinks or deep links, and search commission products.

- **URL**: https://apify.com/dariomory/klook-affiliate-partner-actor.md
- **Developed by:** [Dario Mory](https://apify.com/dariomory) (community)
- **Categories:** Travel, E-commerce, Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 promo code & link results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Klook Partner & Affiliate Automation Hub (Promo Codes & Link Converter)

All-in-one automation tool for **Klook Affiliates, Travel Agencies & Publishers**: Browse verified authorized promo codes with discounts (5% to 50% OFF), batch-convert and shorten tracked affiliate links using your own Klook Partner credentials, and search commission-bearing tours across **1,000+ destinations**.

***

### 🎯 Key Features & Actions

#### 1. `browse_promo_codes` (Authorized Promo Codes & Discounts)

Extract currently valid, official Klook authorized discount promo codes (e.g. Louvre 20% OFF `LOUVRES4`, Colosseum 20% OFF `COLOSSEUMS4`, Disneyland Paris `DLP0822`, Tokyo Skytree `SS4SKYTREE`, Marina Bay Sands `MBSSKYPARKS4`, Sunway Lagoon `SUN4LAGOON`) along with instant booking links optionally pre-tagged with your own Affiliate ID (`affiliateAid` / `affiliateWid`).

#### 2. `convert_affiliate_links` (Batch Link Shortener & Deep Linker)

Input any list of Klook activity, tour, hotel, or city URLs. The Actor automatically injects your Affiliate `AID` and Website `WID` parameters into standard 30-day tracking redirect links (`https://affiliate.klook.com/redirect?aid={wid}&aff_adid={aid}&k_site={url}`).

#### 3. `search_commission_products` (Commission Rate Explorer)

Search Klook activities and tours to see exact affiliate commission rates (`5%` to `15%`), live retail prices, instant confirmation tags, and generate pre-tagged deep links.

***

### 📥 Input Parameters

| Parameter | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `action` | `string` | `"browse_promo_codes"` | `browse_promo_codes`, `convert_affiliate_links`, or `search_commission_products`. |
| `destinationCountry` | `string` | `""` | Filter promo codes by country (e.g. `FR`, `IT`, `SG`, `JP`, `TH`, `VN`, `GB`, `MY`). |
| `urlsToConvert` | `Array<string>` | `[]` | List of Klook URLs to convert into tracked affiliate links. |
| `affiliateAid` | `string` | `""` | Optional: Your Klook Affiliate Partner User ID (AID). |
| `affiliateWid` | `string` | `""` | Optional: Your Klook Registered Website ID (WID). |
| `searchKeywords` | `Array<string>` | `["Tokyo", "Singapore"]` | Search keywords for commission product explorer. |
| `maxItems` | `number` | `100` | Maximum records to export. |

***

### 📤 Sample Output JSON (`browse_promo_codes`)

```json
{
  "promoCode": "LOUVRES4",
  "discount": "20% OFF",
  "discountPercentage": 20,
  "country": "FR",
  "countryName": "France",
  "city": "Paris",
  "activity": "The Louvre Museum Priority Entrance Ticket",
  "terms": "Valid on selected standard and audio-guided Louvre entry passes",
  "validUntil": "2026-12-31",
  "activityUrl": "https://www.klook.com/en-US/activity/1339-louvre-museum-paris/",
  "affiliateRedirectUrl": "https://affiliate.klook.com/redirect?aid=YOUR_WID&aff_adid=YOUR_AID&k_site=https%3A%2F%2Fwww.klook.com%2Fen-US%2Facti...",
  "partnerAid": "YOUR_AID",
  "partnerWid": "YOUR_WID"
}
```

# Actor input Schema

## `action` (type: `string`):

Select operation: 'browse\_promo\_codes' (fetch authorized coupon codes & discounts), 'convert\_affiliate\_links' (convert product URLs to tracked links), or 'search\_commission\_products' (search activities with commission rates).

## `destinationCountry` (type: `string`):

Filter promo codes or activities by country code (e.g. 'FR', 'IT', 'SG', 'JP', 'TH', 'VN', 'GB', 'MY', 'CH', 'US'). Leave blank for all.

## `urlsToConvert` (type: `array`):

List of Klook activity, city, or tour URLs to batch-convert into tracked affiliate links.

## `affiliateAid` (type: `string`):

Optional: Enter your own Klook Affiliate Partner User ID (from affiliate.klook.com > My Account). If left blank, clean links are generated.

## `affiliateWid` (type: `string`):

Optional: Enter your registered Klook Website ID (from affiliate.klook.com > My Ads > Websites).

## `searchKeywords` (type: `array`):

Keywords for 'search\_commission\_products' mode (e.g. \['Tokyo', 'Paris', 'Rome']).

## `maxItems` (type: `integer`):

Maximum number of records to export.

## Actor input object example

```json
{
  "action": "browse_promo_codes",
  "destinationCountry": "",
  "urlsToConvert": [
    "https://www.klook.com/en-US/activity/2274-narita-airport-limousine-bus-tokyo",
    "https://www.klook.com/en-US/activity/35861-umeda-sky-building-kuchu-teien-observatory-ticket",
    "https://www.klook.com/en-US/activity/20750-sun-world-hon-thom-cable-car-ticket"
  ],
  "affiliateAid": "",
  "affiliateWid": "",
  "searchKeywords": [
    "Tokyo",
    "Singapore",
    "Paris"
  ],
  "maxItems": 100
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "urlsToConvert": [
        "https://www.klook.com/en-US/activity/2274-narita-airport-limousine-bus-tokyo",
        "https://www.klook.com/en-US/activity/35861-umeda-sky-building-kuchu-teien-observatory-ticket",
        "https://www.klook.com/en-US/activity/20750-sun-world-hon-thom-cable-car-ticket"
    ],
    "searchKeywords": [
        "Tokyo",
        "Singapore",
        "Paris"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("dariomory/klook-affiliate-partner-actor").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "urlsToConvert": [
        "https://www.klook.com/en-US/activity/2274-narita-airport-limousine-bus-tokyo",
        "https://www.klook.com/en-US/activity/35861-umeda-sky-building-kuchu-teien-observatory-ticket",
        "https://www.klook.com/en-US/activity/20750-sun-world-hon-thom-cable-car-ticket",
    ],
    "searchKeywords": [
        "Tokyo",
        "Singapore",
        "Paris",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("dariomory/klook-affiliate-partner-actor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "urlsToConvert": [
    "https://www.klook.com/en-US/activity/2274-narita-airport-limousine-bus-tokyo",
    "https://www.klook.com/en-US/activity/35861-umeda-sky-building-kuchu-teien-observatory-ticket",
    "https://www.klook.com/en-US/activity/20750-sun-world-hon-thom-cable-car-ticket"
  ],
  "searchKeywords": [
    "Tokyo",
    "Singapore",
    "Paris"
  ]
}' |
apify call dariomory/klook-affiliate-partner-actor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,dariomory/klook-affiliate-partner-actor"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/m4famuftzeNE1rhMZ/builds/vzcICNhR6fa0eFjAR/openapi.json
