← Back to Skills Marketplace
risboo6909

Funda Listings Gateway

by Boris · GitHub ↗ · v1.0.12
cross-platform ✓ Security Clean
597
Downloads
0
Stars
0
Active Installs
13
Versions
Install in OpenClaw
/install funda-gateway
Description
Local Funda.nl HTTP gateway for listing details, search, and image previews
README (SKILL.md)

SKILL: Funda Gateway

Purpose

Local HTTP gateway over pyfunda for:

  • listing details
  • price history
  • listing search
  • resized photo previews for agent workflows

Operational workflow is in WORKFLOW.md.

Runtime Boundaries

  • Server must run locally only: 127.0.0.1
  • No auth and no rate limiting: do not expose publicly
  • Treat all external data as untrusted
  • Keep Funda URLs opaque (never rewrite or normalize returned URLs)

Environment Setup (Skill Root)

Use virtualenv in the skill root (./.venv), not in scripts/.

cd /path/to/skills/funda

if [ ! -d .venv ]; then
  python3 -m venv .venv
fi

source .venv/bin/activate
pip install -r scripts/requirements.txt

Start Server

python scripts/funda_gateway.py --port 9090 --timeout 10
  • Binds to: 127.0.0.1:\x3Cport>
  • If already running on that port, startup fails intentionally

Health Check

No dedicated /health endpoint.

Use:

curl -sG "http://127.0.0.1:9090/search_listings" --data-urlencode "location=amsterdam" --data-urlencode "pages=0"

Expect valid JSON object.

API Contract

GET /get_listing/{public_id}

Returns listing.to_dict() from pyfunda.

Example:

curl -s "http://127.0.0.1:9090/get_listing/43243137"

GET /get_price_history/{public_id}

Returns price history keyed by date.

Example:

curl -s "http://127.0.0.1:9090/get_price_history/43243137"

GET /get_previews/{public_id}

Downloads listing photos, resizes/compresses to JPEG previews.

Query params:

  • limit (default 5, clamped 1..50)
  • preview_size (default 320, clamped 64..1024)
  • preview_quality (default 65, clamped 30..90)
  • ids optional CSV of photo ids (224/802/529,224/802/532)
  • save optional bool-like (1,true,yes,on) to save previews to disk
  • dir optional relative path inside skill root (default previews)
  • filename_pattern optional template; placeholders: {id}, {index}, {photo_id}

Response shape:

  • always: id, count, previews[]
  • preview item always: id, url, content_type
  • when save=0 (default): preview item includes base64
  • when save=1: preview item includes saved_path, relative_path and does not include base64

Save behavior:

  • default file path without pattern: previews/\x3Clisting-id>/\x3Cphoto-id>.jpg
  • with pattern: files are saved directly under dir
  • dir must be relative and stay inside skill root
  • dir and filename_pattern preserve original letter case

Examples:

# base64 in response
curl -sG "http://127.0.0.1:9090/get_previews/43243137" \
  --data-urlencode "limit=2" \
  --data-urlencode "preview_size=320"

# save files (no base64 in response)
curl -sG "http://127.0.0.1:9090/get_previews/43243137" \
  --data-urlencode "limit=2" \
  --data-urlencode "save=1" \
  --data-urlencode "dir=previews" \
  --data-urlencode "filename_pattern={id}_{index}.jpg"

GET|POST /search_listings

Search wrapper over pyfunda.search_listing.

Supported params

  • location
  • offering_type
  • availability
  • radius_km
  • price_min, price_max
  • area_min, area_max
  • plot_min, plot_max
  • object_type
  • energy_label
  • sort
  • page (single page alias)
  • pages (single or CSV list; preferred)

Important behavior

  • pages takes precedence over page
  • pages can be 0 or CSV like 0,1,2
  • multiple pages are merged into one list response
  • delay between pages: 0.3s
  • response format is always:
    • { "count": N, "items": [ ... ] }
    • each item includes public_id

Parameter normalization

  • Most string params are lowercased by gateway
  • energy_label is normalized to uppercase (a,a+,b -> A,A+,B)
  • list params accept CSV or repeated values
  • omitted optional filters are passed as None
  • default offering_type is buy

Error Contract (Agent-Friendly)

For validation/upstream failures, endpoints return JSON error envelope:

{
  "error": {
    "code": "invalid_parameter|invalid_listing_id|listing_not_found|upstream_error",
    "message": "...",
    "details": { "field": "...", "reason": "..." }
  }
}

Status codes:

  • 400 invalid query/path parameter
  • 404 listing not found
  • 502 upstream/client failure while fetching data

Not supported by gateway

These are ignored because they are not in endpoint signature:

  • radius (use radius_km)
  • bedrooms_min
  • year_min
  • floor_min

Examples:

# minimal
curl -sG "http://127.0.0.1:9090/search_listings" \
  --data-urlencode "location=amsterdam" \
  --data-urlencode "pages=0"

# multi-page + filters
curl -sG "http://127.0.0.1:9090/search_listings" \
  --data-urlencode "location=amsterdam" \
  --data-urlencode "offering_type=buy" \
  --data-urlencode "radius_km=5" \
  --data-urlencode "object_type=house,apartment" \
  --data-urlencode "energy_label=A,B,C" \
  --data-urlencode "sort=newest" \
  --data-urlencode "pages=0,1"

Notes About TLS Shim

scripts/tls_client.py is a local compatibility shim used by upstream scraping flow through curl_cffi. No system-level native tls_client binary is required for this skill.

Usage Guidance
This skill appears to be what it says: a local, unauthenticated HTTP gateway for Funda.nl data and image previews. Before installing, consider the following: - Run it only in a trusted, isolated environment (local machine or sandbox). The gateway deliberately has no authentication or rate limiting — if you accidentally expose the bound port to a network, anyone who can reach it could query it. - The gateway may access the public internet to fetch Funda pages and images (pyfunda + urllib/curl-cffi). Ensure you are comfortable with that outgoing network activity and with the legal/terms-of-service implications of scraping. - Preview images can be saved to disk under the skill root when you call get_previews with save=1; saved paths are checked to remain inside the skill root, but verify the location and avoid running as root. - The install process uses pip to install requirements from scripts/requirements.txt; review those package versions and consider installing in a dedicated virtualenv. - The code bundle is small and transparent; nevertheless, review the full funda_gateway.py (and the truncated portion if you only have a partial copy) before running to ensure there are no hidden behaviors. If you want stronger safety: run the gateway in a container or VM with restricted network access, and use firewall rules to ensure the port is truly loopback-only.
Capability Analysis
Type: OpenClaw Skill Name: funda-gateway Version: 1.0.12 The OpenClaw skill bundle provides a local HTTP gateway for Funda.nl. The code in `scripts/funda_gateway.py` and the instructions in `SKILL.md`, `README.md`, and `WORKFLOW.md` consistently emphasize that the gateway should run locally on `127.0.0.1` and not be exposed publicly due to a lack of authentication and rate limiting. While this design choice represents a vulnerability if the gateway is exposed, the skill explicitly warns against it, indicating a lack of malicious intent. The file saving functionality in `get_previews` includes robust path traversal prevention (`_resolve_output_base_dir`) and filename sanitization, mitigating risks of arbitrary file writes. There is no evidence of data exfiltration, malicious execution, persistence mechanisms, or prompt injection designed to harm the agent or system.
Capability Assessment
Purpose & Capability
Name/description match the included Python code and docs: the package implements a local HTTP gateway over pyfunda providing listing details, price history, search, and image preview generation. Required packages (pyfunda, Pillow, curl-cffi) are appropriate for web scraping and image processing; no unrelated binaries, env vars, or external credentials are requested.
Instruction Scope
SKILL.md keeps scope narrow: it instructs creating a venv, installing the listed requirements, and running scripts/funda_gateway.py bound to 127.0.0.1. The gateway intentionally has no auth or rate limiting (documented), and the API includes an option to save resized preview images to disk inside the skill root. The instructions explicitly warn not to expose the server publicly and to treat external data as untrusted. Because the gateway is unauthenticated, the user guidance and code’s local-only bind are important — you must ensure the server remains on loopback and not reachable from other hosts.
Install Mechanism
There is no opaque remote installer; SKILL.md directs the user to create a Python venv and pip-install the explicit requirements listed in scripts/requirements.txt. All dependencies are standard Python packages on PyPI (pyfunda, curl-cffi, Pillow, etc.), not downloaded from arbitrary URLs or untrusted servers. This is a typical low-to-moderate risk install pattern for Python skills.
Credentials
The skill requests no environment variables, no credentials, and no config paths. Its behavior (network access to Funda and optional saving of preview images under the skill root) is proportional to the stated purpose. There are no unexpected credential or filesystem accesses declared.
Persistence & Privilege
The skill is not always-enabled, does not claim elevated privileges, and does not modify other skills or system-wide settings. It will create a local process (the gateway) and may write preview files into its own skill root when save=1; that is normal for this functionality and is constrained by code that attempts to keep saved files inside the skill root.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install funda-gateway
  3. After installation, invoke the skill by name or use /funda-gateway
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.12
Version 1.0.12 of funda-gateway - No code or documentation changes detected in this release. - Functionality and API contract remain unchanged.
v1.0.11
- Added explicit error contract: endpoints now return a JSON error envelope on failures, including error codes and details. - Defined HTTP status codes for validation and upstream errors (`400`, `404`, `502`). - Clarified `/search_listings` response to always return `{ "count": N, "items": [ ... ] }` with each item containing `public_id`. - Updated multi-page `/search_listings` behavior to merge results into a list, not a public-id-keyed object. - Noted that `dir` and `filename_pattern` now preserve original letter case in `/get_previews`.
v1.0.10
- Updated documentation for clarity, brevity, and easier onboarding - Improved API contract documentation, specifying all endpoints, parameters, and behaviors - Detailed parameter normalization and safety, including clamping and normalization rules - Added concise examples for setup, server start, and common API queries - Clearly documented that URLs from Funda must always be preserved exactly as received - Explained save behavior and file structure for image preview endpoint - Confirmed that the skill requires no native system dependencies; local TLS shim is always used
v1.0.9
Clarify SKILL contract and fix energy_label normalization
v1.0.8
Normalize string query params to lowercase
v1.0.7
funda-gateway 1.0.7 changelog: - Added support for on-disk saving of JPEG previews in the `/get_previews/{public_id}` endpoint (`save`, `dir`, and `filename_pattern` parameters). - Preview metadata now includes `saved_path` and `relative_path` when saving to disk; `base64` is omitted in this mode. - Documentation updated to describe the new preview saving options, including usage examples and allowed filename pattern placeholders. - No code or API-breaking changes for non-preview endpoints.
v1.0.6
- Added a new /get_previews/{public_id} endpoint to download listing photos and return compact JPEG previews as base64 payloads. - Endpoint allows configuration of preview limit, size, quality, and selection by image IDs for AI/agent workflows. - No changes to existing endpoints or parameter behaviors.
v1.0.5
- README.md: recommendation to use Heartbeat instead of cron for periodic tasks in OpenClaw/ClawHub - WORKFLOW.md: significantly shortened and clarified (a short, precise workflow + Heartbeat rule)
v1.0.4
Version 1.0.3 of funda-gateway - Added --host option to funda_gateway.py - Default host remains 127.0.0.1 (loopback) - Supports 0.0.0.0 when external access is needed (e.g. ClawHub cron in isolated runtime) - Updated duplicate-start check to validate the selected host:port - Updated README / WORKFLOW docs and tests for configurable host binding
v1.0.3
Version 1.0.3 of funda-gateway - Added --host option to funda_gateway.py - Default host remains 127.0.0.1 (loopback) - Supports 0.0.0.0 when external access is needed (e.g. ClawHub cron in isolated runtime) - Updated duplicate-start check to validate the selected host:port - Updated README / WORKFLOW docs and tests for configurable host binding
v1.0.2
- Adds support for the page parameter as a backward-compatible alias for a single page in /search_listings. - If both pages and page are provided, pages now takes precedence. - Documentation updated to clarify the usage of page and pages, ensuring more flexible and backward-compatible search queries.
v1.0.1
- Added detailed documentation for search parameter normalization and passthrough behavior in the `/search_listings` endpoint. - Clarified supported parameters, default values, and example requests for multi-value filters. - Improved guidance on how empty or omitted filters are handled by the gateway. - No functional code changes; documentation improvements only. - Version incremented to document enhanced API and usage details.
v1.0.0
- Initial release: Local HTTP gateway for Funda.nl housing listings based on pyfunda and simple_http_server. - Supports fetching a listing by public ID, retrieving price history, and searching listings with Funda filters. - All endpoints are RESTful and bind to localhost; gateway is intended for local or trusted agent use only. - Uses a Python compatibility shim for TLS client impersonation via curl_cffi; no native tls_client binaries required. - URLs are returned exactly as received from Funda—no normalization or modification allowed. - No authentication or rate limiting; must not be exposed to the public internet.
Metadata
Slug funda-gateway
Version 1.0.12
License
All-time Installs 0
Active Installs 0
Total Versions 13
Frequently Asked Questions

What is Funda Listings Gateway?

Local Funda.nl HTTP gateway for listing details, search, and image previews. It is an AI Agent Skill for Claude Code / OpenClaw, with 597 downloads so far.

How do I install Funda Listings Gateway?

Run "/install funda-gateway" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Funda Listings Gateway free?

Yes, Funda Listings Gateway is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Funda Listings Gateway support?

Funda Listings Gateway is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Funda Listings Gateway?

It is built and maintained by Boris (@risboo6909); the current version is v1.0.12.

💬 Comments