crawlora-klook — Klook API client for Python
Python client for Crawlora's hosted Klook API. It exposes 19 API endpoints covering public activity and attraction discovery, destinations, and reviews. Requests go to Crawlora; the package does not run a browser or scrape
Klook locally. A Crawlora account and CRAWLORA_API_KEY are required,
and API use is billed under your Crawlora account. Crawlora is independent from and not endorsed by
Klook or its owners.
Install
python -m pip install crawlora-klook
Get an API key
Create an account at crawlora.net, then open the Crawlora console for API-key setup. Set your key in the shell before running the client:
export CRAWLORA_API_KEY="your-crawlora-api-key"
Use
Save this example as example.py, then run python example.py after installing the package and setting your API key.
import os
from crawlora_klook import KlookClient
api_key = os.environ.get("CRAWLORA_API_KEY")
if not api_key:
raise RuntimeError("Set CRAWLORA_API_KEY before running this example.")
with KlookClient(api_key=api_key) as client:
result_1 = client.categories()
print(result_1)
result_2 = client.search(query='museum', city_id=28)
print(result_2)
The package also exports Client as an alias for KlookClient. Operation
methods are available directly in snake_case and through the klook
group. The async package client is AsyncKlookClient; see the online
endpoint and parameter reference and runnable example.
Async usage
The package also exports AsyncClient for asynchronous requests:
import asyncio
import os
from crawlora_klook import AsyncClient
async def main():
api_key = os.environ.get("CRAWLORA_API_KEY")
if not api_key:
raise RuntimeError("Set CRAWLORA_API_KEY before running this example.")
async with AsyncClient(api_key=api_key) as client:
result_1 = await client.categories()
print(result_1)
asyncio.run(main())
See the runnable example for a complete usage example.
Supported Klook API endpoints
This package exposes every route below through direct snake_case methods and the klook group. See the endpoint and parameter reference for complete input details.
| Method | Endpoint | API operation | Description |
|---|---|---|---|
GET |
/klook/activities/{activity_id} |
klook-activity |
Get a Klook activity card |
GET |
/klook/attractions/categories |
klook-attractions-categories |
List Klook attraction categories |
GET |
/klook/attractions/destinations |
klook-attractions-destinations |
Discover Klook attractions destinations |
GET |
/klook/attractions/highlights |
klook-attractions-highlights |
List curated Klook attraction highlight sections |
GET |
/klook/attractions/search |
klook-attractions-search |
Search Klook attractions by destination or category |
GET |
/klook/attractions/suggest |
klook-attractions-suggest |
Autocomplete Klook attractions, cities and countries |
GET |
/klook/categories |
klook-categories |
List Klook activity categories |
GET |
/klook/cities |
klook-cities |
List every Klook city or country destination |
GET |
/klook/destinations |
klook-destinations |
List Klook countries and destination areas |
GET |
/klook/hot |
klook-hot |
List Klook hot destinations and activities |
GET |
/klook/interests |
klook-interests |
List Klook interest topics |
GET |
/klook/recommendations |
klook-recommendations |
Get Klook curated category recommendations |
GET |
/klook/reviews |
klook-reviews |
List recent Klook reviews for a city |
GET |
/klook/search |
klook-search |
Search Klook travel activities |
GET |
/klook/search/filters |
klook-search-filters |
Get Klook search filter metadata |
GET |
/klook/search/hot-keywords |
klook-search-hot-keywords |
Get Klook hot search keywords and topic tabs |
GET |
/klook/search/unified |
klook-search-unified |
Search Klook across product verticals |
GET |
/klook/suggest |
klook-suggest |
Autocomplete Klook activities, cities and countries |
GET |
/klook/verticals |
klook-verticals |
List Klook product verticals |
Configuration
Pass your key through api_key or read CRAWLORA_API_KEY from the environment.
Keep credentials out of source control and logs. Requests go to Crawlora's
hosted API.
Metadata
Release files for crawlora-klook 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| crawlora_klook-0.2.0.tar.gz | 27.9 kB | Without provenance | Details for crawlora_klook-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| crawlora_klook-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for crawlora_klook-0.2.0-py3-none-any.whl |
Total release size: 56.2 kB
Release files / crawlora_klook-0.2.0.tar.gz
| Download URL | crawlora_klook-0.2.0.tar.gz |
|---|---|
| Size | 27.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
518005e61ae2e5ac647540439fc85a9bbceaa0e772a8e43d325793626f411a68
|
|
BLAKE2b-256 checksum How to use checksums |
45cfc7a327f5cd692106130ea4328601b05e284da1bdbb1a271c35c71d9769ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Release files / crawlora_klook-0.2.0-py3-none-any.whl
| Download URL | crawlora_klook-0.2.0-py3-none-any.whl |
|---|---|
| Size | 28.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cabe628b60263e7f9717596d25b77564ef44ac6a6599757f4244220d5ce8e971
|
|
BLAKE2b-256 checksum How to use checksums |
063ebf3c99936389cbc2d4d76f3262f6d64fcccda44af74c69367d4d602f2ae7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Security for crawlora-klook 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.