pyfunda 3.0.0__tar.gz → 3.1.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. pyfunda-3.1.1/PKG-INFO +165 -0
  2. pyfunda-3.1.1/README.md +140 -0
  3. pyfunda-3.1.1/docs/API.md +528 -0
  4. pyfunda-3.1.1/docs/ARCHITECTURE.md +87 -0
  5. {pyfunda-3.0.0 → pyfunda-3.1.1}/docs/DEVELOPMENT.md +4 -2
  6. pyfunda-3.1.1/docs/EXAMPLES.md +223 -0
  7. pyfunda-3.1.1/docs/README.md +71 -0
  8. {pyfunda-3.0.0 → pyfunda-3.1.1}/funda/__init__.py +4 -0
  9. pyfunda-3.1.1/funda/_autocomplete.py +47 -0
  10. pyfunda-3.1.1/funda/_autocomplete_parser.py +64 -0
  11. {pyfunda-3.0.0 → pyfunda-3.1.1}/funda/_detail_parser.py +4 -9
  12. {pyfunda-3.0.0 → pyfunda-3.1.1}/funda/constants.py +15 -0
  13. {pyfunda-3.0.0 → pyfunda-3.1.1}/funda/funda.py +59 -10
  14. {pyfunda-3.0.0 → pyfunda-3.1.1}/funda/listing.py +55 -24
  15. {pyfunda-3.0.0 → pyfunda-3.1.1}/funda/models.py +5 -0
  16. {pyfunda-3.0.0 → pyfunda-3.1.1}/funda/parsing.py +2 -0
  17. {pyfunda-3.0.0 → pyfunda-3.1.1}/funda/search.py +102 -83
  18. {pyfunda-3.0.0 → pyfunda-3.1.1}/pyproject.toml +22 -3
  19. pyfunda-3.1.1/tests/test_autocomplete.py +99 -0
  20. {pyfunda-3.0.0 → pyfunda-3.1.1}/tests/test_client.py +41 -1
  21. {pyfunda-3.0.0 → pyfunda-3.1.1}/tests/test_models.py +24 -1
  22. {pyfunda-3.0.0 → pyfunda-3.1.1}/tests/test_search.py +16 -2
  23. pyfunda-3.0.0/PKG-INFO +0 -250
  24. pyfunda-3.0.0/README.md +0 -225
  25. pyfunda-3.0.0/docs/API.md +0 -211
  26. {pyfunda-3.0.0 → pyfunda-3.1.1}/.dockerignore +0 -0
  27. {pyfunda-3.0.0 → pyfunda-3.1.1}/.github/FUNDING.yml +0 -0
  28. {pyfunda-3.0.0 → pyfunda-3.1.1}/.github/workflows/publish.yml +0 -0
  29. {pyfunda-3.0.0 → pyfunda-3.1.1}/.gitignore +0 -0
  30. {pyfunda-3.0.0 → pyfunda-3.1.1}/Dockerfile +0 -0
  31. {pyfunda-3.0.0 → pyfunda-3.1.1}/LICENSE +0 -0
  32. {pyfunda-3.0.0 → pyfunda-3.1.1}/examples/almere_age_rank.py +0 -0
  33. {pyfunda-3.0.0 → pyfunda-3.1.1}/examples/analysis.ipynb +0 -0
  34. {pyfunda-3.0.0 → pyfunda-3.1.1}/examples/batch_details.py +0 -0
  35. {pyfunda-3.0.0 → pyfunda-3.1.1}/examples/broker_due_diligence.py +0 -0
  36. {pyfunda-3.0.0 → pyfunda-3.1.1}/examples/enrichment_export.py +0 -0
  37. {pyfunda-3.0.0 → pyfunda-3.1.1}/examples/export_to_csv.py +0 -0
  38. {pyfunda-3.0.0 → pyfunda-3.1.1}/examples/full_api_walkthrough.py +0 -0
  39. {pyfunda-3.0.0 → pyfunda-3.1.1}/examples/neighborhood_market_snapshot.py +0 -0
  40. {pyfunda-3.0.0 → pyfunda-3.1.1}/examples/new_listings_alert.py +0 -0
  41. {pyfunda-3.0.0 → pyfunda-3.1.1}/examples/poll_new_listings.py +0 -0
  42. {pyfunda-3.0.0 → pyfunda-3.1.1}/examples/price_history.py +0 -0
  43. {pyfunda-3.0.0 → pyfunda-3.1.1}/examples/price_tracker.py +0 -0
  44. {pyfunda-3.0.0 → pyfunda-3.1.1}/examples/search_sold.py +0 -0
  45. {pyfunda-3.0.0 → pyfunda-3.1.1}/examples/similar_sales_comp.py +0 -0
  46. {pyfunda-3.0.0 → pyfunda-3.1.1}/funda/_enrichment_parser.py +0 -0
  47. {pyfunda-3.0.0 → pyfunda-3.1.1}/funda/_parallel.py +0 -0
  48. {pyfunda-3.0.0 → pyfunda-3.1.1}/funda/_parse_helpers.py +0 -0
  49. {pyfunda-3.0.0 → pyfunda-3.1.1}/funda/_price_history_parser.py +0 -0
  50. {pyfunda-3.0.0 → pyfunda-3.1.1}/funda/_search_parser.py +0 -0
  51. {pyfunda-3.0.0 → pyfunda-3.1.1}/funda/_transport.py +0 -0
  52. {pyfunda-3.0.0 → pyfunda-3.1.1}/funda/exceptions.py +0 -0
  53. {pyfunda-3.0.0 → pyfunda-3.1.1}/funda/headers.py +0 -0
  54. {pyfunda-3.0.0 → pyfunda-3.1.1}/funda/py.typed +0 -0
  55. {pyfunda-3.0.0 → pyfunda-3.1.1}/tests/__init__.py +0 -0
  56. {pyfunda-3.0.0 → pyfunda-3.1.1}/tests/test_enrichment_parser.py +0 -0
  57. {pyfunda-3.0.0 → pyfunda-3.1.1}/tests/test_live.py +0 -0
  58. {pyfunda-3.0.0 → pyfunda-3.1.1}/tests/test_transport_parallel.py +0 -0
pyfunda-3.1.1/PKG-INFO ADDED
@@ -0,0 +1,165 @@
1
+ Metadata-Version: 2.4
2
+ Name: pyfunda
3
+ Version: 3.1.1
4
+ Summary: Python API wrapper for Funda.nl, the Dutch real estate platform. Reverse-engineered mobile API client, no scraping, no Selenium, no CAPTCHA.
5
+ Project-URL: Homepage, https://github.com/0xMH/pyfunda
6
+ Project-URL: Repository, https://github.com/0xMH/pyfunda
7
+ Project-URL: Issues, https://github.com/0xMH/pyfunda/issues
8
+ Author: 0xMH
9
+ License-Expression: AGPL-3.0-or-later
10
+ License-File: LICENSE
11
+ Keywords: api,api-wrapper,client,dutch,funda,funda-api,funda-nl,funda-scraper,housing,housing-api,mobile-api,netherlands,real-estate,real-estate-api,rest-api,reverse-engineering,scraper,sdk
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Requires-Python: >=3.10
21
+ Requires-Dist: curl-cffi>=0.14.0
22
+ Requires-Dist: tls-client>=1.0.1
23
+ Requires-Dist: typing-extensions>=4.0.0
24
+ Description-Content-Type: text/markdown
25
+
26
+ # pyfunda
27
+
28
+ [![PyPI version](https://img.shields.io/pypi/v/pyfunda)](https://pypi.org/project/pyfunda/)
29
+ [![Python versions](https://img.shields.io/pypi/pyversions/pyfunda)](https://pypi.org/project/pyfunda/)
30
+ [![License](https://img.shields.io/pypi/l/pyfunda)](https://github.com/0xMH/pyfunda/blob/main/LICENSE)
31
+
32
+ **pyfunda** is a Python API wrapper for [Funda.nl](https://www.funda.nl), the Netherlands' largest Dutch real estate platform. It talks to Funda's reverse engineered mobile JSON API, so you get clean typed objects for listings, prices, media, brokers, and price history without HTML scraping, Selenium, a headless browser, or CAPTCHA solving.
33
+
34
+ Funda has no public developer API. pyfunda is the only working opensource Python client that hits Funda's app facing `*.funda.io` endpoints directly, the same ones the official Android app uses.
35
+
36
+ ```bash
37
+ pip install pyfunda
38
+ ```
39
+
40
+ Use pyfunda as a Funda API client or Funda Python SDK to fetch Dutch property listings, run search queries by city and price, pull listing detail and media, get broker info and reviews, read price history, and stream new listings. If you have been looking for a working fundascraper alternative or a Netherlands housing API, this is the only Python wrapper hitting the same `*.funda.io` endpoints the Funda Android app uses.
41
+
42
+ > If you find this useful, consider giving it a star, it helps others discover the project.
43
+
44
+ [![Star History Chart](https://api.star-history.com/svg?repos=0xMH/pyfunda&type=Date)](https://star-history.com/#0xMH/pyfunda&Date)
45
+
46
+ ## Why I'm open-sourcing this?
47
+
48
+ After pyfunda, I got messages asking why I'd give this away when aggregators will just take it and sell it. They're right, every week there's a new "revolutionary AI-powered housing finder" charging EUR40/month or a EUR250 "success fee." They all pull from the same one or two sources and wrap it in a fancy UI completely built with AI.
49
+
50
+ That's exactly why I'm open-sourcing it.
51
+
52
+ These services are selling air to people who are looking for any kind of hope. The data is public. The APIs aren't hard to figure out. You shouldn't have to pay someone to refresh a webpage for you. Funda could kill this entire market overnight by offering a public API. They don't, so here we are.
53
+
54
+ Here's the code, do it yourself. Send my library link to any AI service you use and ask it to build whatever tool you think will make your life easier while searching for your next home.
55
+
56
+ With pyfunda, I've already done all the heavy lifting for you.
57
+
58
+ ## Why pyfunda?
59
+
60
+ **Because it simply works.**
61
+
62
+ Funda has no public developer API. If you want Dutch real estate data programmatically, your options are limited:
63
+
64
+ | Library | Approach | Limitations |
65
+ |---------|----------|-------------|
66
+ | [whchien/funda-scraper](https://github.com/whchien/funda-scraper) | HTML scraping | Listing dates blocked since Q4 2023 (requires login). Breaks when Funda changes frontend. |
67
+ | [khpeek/funda-scraper](https://github.com/khpeek/funda-scraper) | Scrapy | Last updated 2016. No longer maintained. |
68
+ | [joostboon/Funda-Scraper](https://github.com/joostboon/Funda-Scraper) | Selenium | Requires manual CAPTCHA solving. Slow browser automation. |
69
+ | **Official API** | Broker API | Only available to registered brokers. Not accessible to regular developers. |
70
+
71
+ **pyfunda takes a different approach:** it uses Funda's app-facing JSON APIs instead of scraping browser HTML.
72
+
73
+ - Pure Python, no browser or Selenium needed
74
+ - No manual CAPTCHA solving
75
+ - Typed Python objects for listings, prices, media, brokers, coordinates, and history
76
+ - Search, listing detail, enrichment, broker, price-history, polling, and parallel batch workflows
77
+ - Raw Funda payloads are still available when you need fields that pyfunda does not model yet
78
+
79
+ ## Installation
80
+
81
+ ```bash
82
+ pip install pyfunda
83
+ ```
84
+
85
+ For local development:
86
+
87
+ ```bash
88
+ uv sync
89
+ uv run python -m unittest discover -s tests
90
+ ```
91
+
92
+ ## Quick Start
93
+
94
+ ```python
95
+ from funda import Funda
96
+
97
+ with Funda() as client:
98
+ # Get a listing by global id, tiny id, or Funda URL
99
+ listing = client.listing(43117443)
100
+ print(listing.title, listing.city, listing.price.amount)
101
+
102
+ # Search listings
103
+ results = client.search("amsterdam", max_price=500000)
104
+ for item in results:
105
+ print(item.title, item.price.amount, item.url)
106
+ ```
107
+
108
+ ## How It Works
109
+
110
+ This library uses Funda's undocumented app-facing APIs, which provide clean JSON responses unlike the website that embeds data in Nuxt.js/JavaScript bundles.
111
+
112
+ ### Discovery Process
113
+
114
+ The original API was reverse engineered by intercepting and analyzing HTTPS traffic from the official Funda Android app:
115
+
116
+ 1. Configured an Android device to route traffic through an intercepting proxy
117
+ 2. Used the Funda app normally - browsing listings, searching, opening shared URLs
118
+ 3. Identified the `*.funda.io` API infrastructure separate from the `www.funda.nl` website
119
+ 4. Analyzed request/response patterns to understand the query format and available filters
120
+ 5. Discovered how the app resolves URL-based IDs (`tinyId`) to internal IDs (`globalId`)
121
+
122
+ ### API Architecture
123
+
124
+ The app-facing APIs live across several `*.funda.io` services:
125
+
126
+ | Endpoint | Method | Purpose |
127
+ |----------|--------|---------|
128
+ | `listing-detail-page.funda.io/api/v4/listing/object/nl/{globalId}` | GET | Fetch listing by internal ID |
129
+ | `listing-detail-page.funda.io/api/v4/listing/object/nl/tinyId/{tinyId}` | GET | Fetch listing by URL ID |
130
+ | `listing-search-wonen.funda.io/_msearch/template` | POST | Search listings |
131
+ | `listing-search-wonen.funda.io/geo-wonen-alias-prod/_search/template` | POST | Autocomplete location/search-box text |
132
+ | `listing-detail-summary.funda.io/api/v1/listing/nl/{globalId}` | GET | Fetch lightweight listing summary |
133
+ | `contacts-flows-bff.funda.io/.../contact-block` | GET | Fetch realtor contact block |
134
+ | `contacts-bff.funda.io/.../contact-form` | GET | Fetch contact-form availability |
135
+ | `local-listings.funda.io/api/v1/similarlistings` | GET | Fetch similar and recently sold listing IDs |
136
+ | `marketinsights.funda.io/v2/localinsights/preview/...` | GET | Fetch neighbourhood market insights |
137
+ | `brokerpresentation-office-pages-bff.funda.io/.../office-page/...` | GET | Fetch broker profile and listings |
138
+ | `reviews-office-pages-bff.funda.io/.../reviews/nl` | GET | Fetch broker review aggregates |
139
+ | `api.walterliving.com/hunter/lookup` | POST | Fetch price history data |
140
+
141
+ The request transport, headers, retry profiles, and TLS fingerprint rotation are internal implementation details. Normal users only construct `Funda()` and call the public methods below.
142
+
143
+ ## Documentation
144
+
145
+ - [Start here](docs/README.md)
146
+ - [API reference](docs/API.md)
147
+ - [Architecture notes](docs/ARCHITECTURE.md)
148
+ - [Examples](docs/EXAMPLES.md)
149
+ - [Development and testing](docs/DEVELOPMENT.md)
150
+
151
+ ## Disclaimer
152
+
153
+ This is an unofficial library and is not affiliated with, authorized, maintained, sponsored, or endorsed by Funda or any of its affiliates. Use at your own risk.
154
+
155
+ This library only accesses publicly available listing data through Funda's undocumented internal APIs. Using this library may violate Funda's Terms of Service. The authors are not responsible for any consequences of using this software.
156
+
157
+ This project is intended for personal use, research, and educational purposes only.
158
+
159
+ - The APIs are undocumented and may change or break at any time without notice.
160
+ - Please use this library responsibly and avoid excessive requests that could burden Funda's infrastructure.
161
+ - Data may be subject to copyright and usage restrictions. Ensure your use complies with applicable laws.
162
+
163
+ ## License
164
+
165
+ AGPL-3.0
@@ -0,0 +1,140 @@
1
+ # pyfunda
2
+
3
+ [![PyPI version](https://img.shields.io/pypi/v/pyfunda)](https://pypi.org/project/pyfunda/)
4
+ [![Python versions](https://img.shields.io/pypi/pyversions/pyfunda)](https://pypi.org/project/pyfunda/)
5
+ [![License](https://img.shields.io/pypi/l/pyfunda)](https://github.com/0xMH/pyfunda/blob/main/LICENSE)
6
+
7
+ **pyfunda** is a Python API wrapper for [Funda.nl](https://www.funda.nl), the Netherlands' largest Dutch real estate platform. It talks to Funda's reverse engineered mobile JSON API, so you get clean typed objects for listings, prices, media, brokers, and price history without HTML scraping, Selenium, a headless browser, or CAPTCHA solving.
8
+
9
+ Funda has no public developer API. pyfunda is the only working opensource Python client that hits Funda's app facing `*.funda.io` endpoints directly, the same ones the official Android app uses.
10
+
11
+ ```bash
12
+ pip install pyfunda
13
+ ```
14
+
15
+ Use pyfunda as a Funda API client or Funda Python SDK to fetch Dutch property listings, run search queries by city and price, pull listing detail and media, get broker info and reviews, read price history, and stream new listings. If you have been looking for a working fundascraper alternative or a Netherlands housing API, this is the only Python wrapper hitting the same `*.funda.io` endpoints the Funda Android app uses.
16
+
17
+ > If you find this useful, consider giving it a star, it helps others discover the project.
18
+
19
+ [![Star History Chart](https://api.star-history.com/svg?repos=0xMH/pyfunda&type=Date)](https://star-history.com/#0xMH/pyfunda&Date)
20
+
21
+ ## Why I'm open-sourcing this?
22
+
23
+ After pyfunda, I got messages asking why I'd give this away when aggregators will just take it and sell it. They're right, every week there's a new "revolutionary AI-powered housing finder" charging EUR40/month or a EUR250 "success fee." They all pull from the same one or two sources and wrap it in a fancy UI completely built with AI.
24
+
25
+ That's exactly why I'm open-sourcing it.
26
+
27
+ These services are selling air to people who are looking for any kind of hope. The data is public. The APIs aren't hard to figure out. You shouldn't have to pay someone to refresh a webpage for you. Funda could kill this entire market overnight by offering a public API. They don't, so here we are.
28
+
29
+ Here's the code, do it yourself. Send my library link to any AI service you use and ask it to build whatever tool you think will make your life easier while searching for your next home.
30
+
31
+ With pyfunda, I've already done all the heavy lifting for you.
32
+
33
+ ## Why pyfunda?
34
+
35
+ **Because it simply works.**
36
+
37
+ Funda has no public developer API. If you want Dutch real estate data programmatically, your options are limited:
38
+
39
+ | Library | Approach | Limitations |
40
+ |---------|----------|-------------|
41
+ | [whchien/funda-scraper](https://github.com/whchien/funda-scraper) | HTML scraping | Listing dates blocked since Q4 2023 (requires login). Breaks when Funda changes frontend. |
42
+ | [khpeek/funda-scraper](https://github.com/khpeek/funda-scraper) | Scrapy | Last updated 2016. No longer maintained. |
43
+ | [joostboon/Funda-Scraper](https://github.com/joostboon/Funda-Scraper) | Selenium | Requires manual CAPTCHA solving. Slow browser automation. |
44
+ | **Official API** | Broker API | Only available to registered brokers. Not accessible to regular developers. |
45
+
46
+ **pyfunda takes a different approach:** it uses Funda's app-facing JSON APIs instead of scraping browser HTML.
47
+
48
+ - Pure Python, no browser or Selenium needed
49
+ - No manual CAPTCHA solving
50
+ - Typed Python objects for listings, prices, media, brokers, coordinates, and history
51
+ - Search, listing detail, enrichment, broker, price-history, polling, and parallel batch workflows
52
+ - Raw Funda payloads are still available when you need fields that pyfunda does not model yet
53
+
54
+ ## Installation
55
+
56
+ ```bash
57
+ pip install pyfunda
58
+ ```
59
+
60
+ For local development:
61
+
62
+ ```bash
63
+ uv sync
64
+ uv run python -m unittest discover -s tests
65
+ ```
66
+
67
+ ## Quick Start
68
+
69
+ ```python
70
+ from funda import Funda
71
+
72
+ with Funda() as client:
73
+ # Get a listing by global id, tiny id, or Funda URL
74
+ listing = client.listing(43117443)
75
+ print(listing.title, listing.city, listing.price.amount)
76
+
77
+ # Search listings
78
+ results = client.search("amsterdam", max_price=500000)
79
+ for item in results:
80
+ print(item.title, item.price.amount, item.url)
81
+ ```
82
+
83
+ ## How It Works
84
+
85
+ This library uses Funda's undocumented app-facing APIs, which provide clean JSON responses unlike the website that embeds data in Nuxt.js/JavaScript bundles.
86
+
87
+ ### Discovery Process
88
+
89
+ The original API was reverse engineered by intercepting and analyzing HTTPS traffic from the official Funda Android app:
90
+
91
+ 1. Configured an Android device to route traffic through an intercepting proxy
92
+ 2. Used the Funda app normally - browsing listings, searching, opening shared URLs
93
+ 3. Identified the `*.funda.io` API infrastructure separate from the `www.funda.nl` website
94
+ 4. Analyzed request/response patterns to understand the query format and available filters
95
+ 5. Discovered how the app resolves URL-based IDs (`tinyId`) to internal IDs (`globalId`)
96
+
97
+ ### API Architecture
98
+
99
+ The app-facing APIs live across several `*.funda.io` services:
100
+
101
+ | Endpoint | Method | Purpose |
102
+ |----------|--------|---------|
103
+ | `listing-detail-page.funda.io/api/v4/listing/object/nl/{globalId}` | GET | Fetch listing by internal ID |
104
+ | `listing-detail-page.funda.io/api/v4/listing/object/nl/tinyId/{tinyId}` | GET | Fetch listing by URL ID |
105
+ | `listing-search-wonen.funda.io/_msearch/template` | POST | Search listings |
106
+ | `listing-search-wonen.funda.io/geo-wonen-alias-prod/_search/template` | POST | Autocomplete location/search-box text |
107
+ | `listing-detail-summary.funda.io/api/v1/listing/nl/{globalId}` | GET | Fetch lightweight listing summary |
108
+ | `contacts-flows-bff.funda.io/.../contact-block` | GET | Fetch realtor contact block |
109
+ | `contacts-bff.funda.io/.../contact-form` | GET | Fetch contact-form availability |
110
+ | `local-listings.funda.io/api/v1/similarlistings` | GET | Fetch similar and recently sold listing IDs |
111
+ | `marketinsights.funda.io/v2/localinsights/preview/...` | GET | Fetch neighbourhood market insights |
112
+ | `brokerpresentation-office-pages-bff.funda.io/.../office-page/...` | GET | Fetch broker profile and listings |
113
+ | `reviews-office-pages-bff.funda.io/.../reviews/nl` | GET | Fetch broker review aggregates |
114
+ | `api.walterliving.com/hunter/lookup` | POST | Fetch price history data |
115
+
116
+ The request transport, headers, retry profiles, and TLS fingerprint rotation are internal implementation details. Normal users only construct `Funda()` and call the public methods below.
117
+
118
+ ## Documentation
119
+
120
+ - [Start here](docs/README.md)
121
+ - [API reference](docs/API.md)
122
+ - [Architecture notes](docs/ARCHITECTURE.md)
123
+ - [Examples](docs/EXAMPLES.md)
124
+ - [Development and testing](docs/DEVELOPMENT.md)
125
+
126
+ ## Disclaimer
127
+
128
+ This is an unofficial library and is not affiliated with, authorized, maintained, sponsored, or endorsed by Funda or any of its affiliates. Use at your own risk.
129
+
130
+ This library only accesses publicly available listing data through Funda's undocumented internal APIs. Using this library may violate Funda's Terms of Service. The authors are not responsible for any consequences of using this software.
131
+
132
+ This project is intended for personal use, research, and educational purposes only.
133
+
134
+ - The APIs are undocumented and may change or break at any time without notice.
135
+ - Please use this library responsibly and avoid excessive requests that could burden Funda's infrastructure.
136
+ - Data may be subject to copyright and usage restrictions. Ensure your use complies with applicable laws.
137
+
138
+ ## License
139
+
140
+ AGPL-3.0