@flatscout/source-schemaorg
v1.0.0
Published
Generic source plugin for agency websites that emit `schema.org/RealEstateListing` (or `Apartment` / `House` / `Residence`) JSON-LD on their detail pages.
Readme
@flatscout/source-schemaorg
Generic source plugin for agency websites that emit schema.org/RealEstateListing (or Apartment / House / Residence) JSON-LD on their detail pages.
This is Flatscout's workhorse adapter for the Swiss agency long tail — many CMSes and bespoke sites embed structured data for SEO; this plugin parses it without needing per-agency code.
When to use
The @flatscout/agency-fingerprint classifier returns schemaorg for a probed agency URL. Add the agency to your agencies.yaml:
agencies:
- id: walde
name: Walde Immobilien
website: https://walde.ch
canton: ZH
platform: schemaorgThe config preprocessor expands the row into a source-schemaorg plugin instance — no per-agency YAML needed.
How it works
- Fetches
<website><sitemap_path>(default/sitemap.xml) orfeed_urlif set. - Sorts entries by
lastmoddesc, caps atmax_details_per_scan. - For each detail URL: GET, extract first
application/ld+jsonblock whose@typeisRealEstateListing/Apartment/House/Residence, map into Flatscout'sListing. - Honors
pace_msbetween requests.
Tests
pnpm --filter @flatscout/source-schemaorg test
