Building a Universal Property Listing Scraper with Python and JSON-LD
Ever wanted to extract structured data from real estate listings across multiple sites without writing custom parsers for each one? I built a Property Listing Scraper that works with any property website — from Zillow to Rightmove to Imobiliare — using a combination of JSON-LD, OpenGraph metadata, and smart HTML pattern matching.
The Problem
Every real estate site structures its data differently. Zillow uses one schema, Rightmove uses another, and smaller sites like Imobiliare.ro have their own format entirely. Building separate scrapers for each is a maintenance nightmare.
The Solution: Multi-Layer Extraction
The scraper uses three extraction layers, falling back gracefully:
1. JSON-LD (Structured Data)
Many modern property sites embed structured data using Schema.org vocabulary. This is the gold standard — clean, machine-readable, and standardised.
for script in soup.find_all("script", type="application/ld+json"):
data = json.loads(script.string)
if "Product" in str(data.get("@type", "")):
# Extract price, address, coordinates, images
2. OpenGraph Meta Tags
When JSON-LD isn't available, we fall back to OpenGraph metadata that most sites provide for social sharing.
og_title = soup.find("meta", property="og:title")
og_image = soup.find("meta", property="og:image")
3. Regex Pattern Matching
As a final fallback, we scan the page text for common price and property patterns:
price_match = re.search(r"([$£€]\s*[\d,]+(?:\.\d+)?)", text)
bed_match = re.search(r"(\d+)\s*(?:bed|bedroom|camera)", text)
Extracted Data Fields
Each property listing yields:
- Price & Currency — parsed from any format (USD, EUR, GBP, RON)
- Property Type — apartment, house, studio, land, office
- Bedrooms & Bathrooms — multi-language support (English, Italian, Romanian)
- Area — square metres detection
- Address Components — street, city, region, postal code, country
- Coordinates — latitude/longitude from geo data
- Images — up to 20 high-quality images per listing
Search Page Support
The scraper automatically detects whether a URL is:
- An individual listing — extracts data directly
- A search results page — discovers listing links, then scrapes each one concurrently (5 parallel requests)
Try It
You can use the scraper right now:
Apify Store: Property Listing Scraper
GitHub: multi-tool-content-api
The Apify actor uses pay-per-event pricing at $0.01 per property extracted — you only pay for actual results.
Use Cases
- Market Analysis: Track property prices across multiple markets
- Lead Generation: Build databases of available properties
- Price Monitoring: Watch specific neighbourhoods for price changes
- Investment Research: Compare yields across countries and currencies
Conclusion
By combining JSON-LD extraction with meta tags and regex fallbacks, we achieve universal compatibility without sacrificing data quality. The scraper handles the messy reality of real estate websites so you can focus on analysing the data.
Built with Python, BeautifulSoup4, httpx, and the Apify platform.
More from me
- Romania's company registry, now callable from Claude and Cursor (MCP + REST)
- Romania's company registry has no free API — so I built one (4.2M firms, MCP + REST)
- Building a Romanian Business Registry API: 4.2M Companies as Queryable JSON
- Building a SEC EDGAR Filings Scraper: 10-K Risk Factors and 13F Holdings as Clean JSON
- Building a Price & Competitor Monitor That Diffs Shopify and AliExpress Prices
- Building a Vertical Corpus Builder: Clean JSONL Datasets for LLM Fine-Tuning
- Building a Change & Alert Engine That Webhooks Any Diff on Any URL
- Building a Romania Mall Store Directory: Every Store in 29 Malls, One Schema
- Scraping Romanian Public Contracts: A Native-Language Tender & Awarded Deals Scraper
- Building a 12-City US Building Permits Scraper With Python
- Building an EU Safety Gate (RAPEX) Product Recall Scraper With Python
- How I Built a Water Utility Risk Intelligence Tool With Python and MCP
- Building an Aviation Hub API: Airports, Airlines, Live Flights & Weather From Six Keyless Sources
- I Stopped Scraping Business Directories and Built an MCP Server on Official Registry Data
- I Built a Canada Product Recalls & Safety Alerts Scraper That Reads Open Government Data
- I Built a Telegram Members Scraper That Reads Public Chat Stats Without Login
- Building a WHOIS & DNS Lookup Tool: Domain Intelligence in One...
- Building an AI Web Crawler That Outputs LLM-Ready Content Chunks
- Building a Real-Time Press Release Monitor with Python and RSS...
- Tracking Tech Sentiment in Real-Time with VADER and Python
- How I Built a Product Hunt Scraper That Tracks Launches in Rea...
- 5 APIs Every Developer Needs for Content Processing (RSS, Extraction, Sitemaps, AI)
- How to Extract Clean Content From Any Website Sitemap (For SEO...
- Scraping 187,000 Romanian Businesses: Building a B2B Lead Gene...
- Make Any Website AI-Readable: Generating llms.txt Files with
- I Built an RSS Aggregator That Extracts Full Article Content (...
Top comments (0)