# Newhome Properties and Details Scraper (`realestateapi/newhome-properties-and-details-scraper`) Actor

Permission-gated Newhome property listings Actor. Current written authorization is required before source requests; the default run makes zero requests.

- **URL**: https://apify.com/realestateapi/newhome-properties-and-details-scraper.md
- **Developed by:** [Real Estate API](https://apify.com/realestateapi) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.99 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### What does Newhome Properties and Details Scraper do?

This Actor is designed to normalize public Swiss property listings from [newhome.ch](https://www.newhome.ch/) into dataset records. It can read supported schema.org JSON-LD and official listing links, then request a bounded number of detail pages when allowed. The public site rendered in Chrome during review, but its General Terms reserve platform-content rights and address unauthorized crawling or spidering of advertisements. **The Actor therefore makes zero source requests by default and requires current written permission before collection.** Live extraction is not currently qualified.

### Why use Newhome Properties and Details Scraper?

If you have permission that covers automated collection and use, the Actor can deduplicate listing URLs, keep provenance, group related fields into nested location, pricing, property, and media objects, and emit explicit diagnostics instead of fabricating records. Search results and detail-page enrichment have separate request accounting and limits. Apify provides run history, scheduling, dataset export, API access, and integrations. This Actor does not log in, use proxies, solve challenges, or follow redirects.

### What data can Newhome Properties and Details Scraper extract?

The parser only emits values present in supported page structured data or listing-link text. Optional fields are omitted when absent.

| Group | Fields |
| --- | --- |
| Identity | Stable record ID, property ID when present, title, description, listing and canonical URLs |
| Price | Amount, currency, unit, availability, offer validity |
| Property | Type, rooms, bedrooms, bathrooms, floor and lot area, parking, year built, features |
| Location | Street, locality, region, postal code, country, latitude, longitude |
| Media | HTTPS image URLs, primary image, image count |
| Provenance | Source/search page, detail page, source domain, extraction method, timestamp |
| Run diagnostics | Policy, robots, empty-page, request, and access-boundary details in the `OUTPUT` key-value summary |

### How to scrape Newhome

1. Obtain current written permission for automated collection and use of Newhome property content.
2. Set **Current written permission confirmed** only after that permission is in place. The checkbox is your attestation; it does not grant permission.
3. Add explicit official HTTPS search or detail URLs that are covered by the permission.
4. Choose the maximum number of records, detail requests, delay, and timeout within your permission.
5. Run the Actor and inspect the dataset and `OUTPUT` summary. A successful process status does not prove that live records were returned.

### How much will it cost to scrape Newhome?

Apify resource costs depend on your account and the actual run usage shown in Console; this Actor does not promise a fixed price. The default run makes zero Newhome requests. After authorization is confirmed, each run checks robots.txt, requests the supplied search pages, and may request detail pages up to `maxDetailRequests`. More pages and detail requests take more network time and compute. `requestDelayMs` applies before each search and detail request. There is no proxy usage or automatic retry loop.

### Input

See the input tab for the complete configuration. The public input schema rejects unknown properties, fixture data, and debug controls.

| Property | Type | Default | Range or behavior |
| --- | --- | --- | --- |
| `authorizationConfirmed` | boolean | `false` | Operator attestation for current written permission. |
| `startUrls` | array of `{ "url": "..." }` | `[]` | Up to 10 explicit official HTTPS URLs; no default URL is configured. |
| `maxItems` | integer | `25` | 1–500 unique property rows across all start URLs. |
| `includeDetails` | boolean | `true` | Request discovered detail pages when authorized and allowed by robots.txt. |
| `maxDetailRequests` | integer | `10` | 0–250 detail requests across the run. |
| `requestDelayMs` | integer | `1000` | 0–10,000 ms before each search or detail request. |
| `timeoutSecs` | integer | `30` | 5–120 seconds per request. |

Default input is safe and returns `SUCCEEDED` / `SKIPPED_POLICY` with an `AUTHORIZATION_REQUIRED` summary detail and no source requests:

```json
{}
```

Permissioned input example (use only when current written permission specifically covers the URL and data use):

```json
{
  "authorizationConfirmed": true,
  "startUrls": [
    { "url": "https://www.newhome.ch/en/renting/search/apartment/city-zuerich/list" }
  ],
  "maxItems": 25,
  "includeDetails": true,
  "maxDetailRequests": 10,
  "requestDelayMs": 1000,
  "timeoutSecs": 30
}
```

### Output

You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

This abbreviated normal row is synthetic and illustrates the schema only; it is not current Newhome data:

```json
{
  "recordType": "property-listing",
  "recordId": "newhome:illustrative-id",
  "actorName": "Newhome Properties and Details Scraper",
  "dataAvailable": true,
  "status": "succeeded",
  "propertyId": "illustrative-id",
  "title": "Illustrative apartment",
  "listingUrl": "https://www.newhome.ch/en/property/illustrative-id",
  "price": 2250,
  "currency": "CHF",
  "priceUnit": "MONTH",
  "propertyType": "Apartment",
  "numberOfRooms": 2.5,
  "floorAreaSqm": 70,
  "addressDetails": { "locality": "Illustrative locality", "country": "Switzerland" },
  "pricing": { "amount": 2250, "currency": "CHF", "unit": "MONTH" },
  "propertyDetails": { "numberOfRooms": 2.5, "floorAreaSqm": 70 },
  "media": { "imageUrls": [], "imageCount": 0 },
  "sourceUrl": "https://www.newhome.ch/en/renting/search/apartment/city-zuerich/list",
  "sourceWebsite": "newhome.ch",
  "sourceBlocked": false,
  "scrapedAt": "2026-09-25T00:00:00.000Z"
}
```

A run that is not authorized keeps the diagnostic in the aggregate `OUTPUT` key-value summary. It does not add a dataset row:

```json
{
  "recordType": "newhome-summary",
  "status": "SUCCEEDED",
  "runStatus": "SKIPPED_POLICY",
  "exitCode": 0,
  "nativeExitCode": 0,
  "nativeExitCodeKnown": true,
  "authorizationStatus": "AUTHORIZATION_REQUIRED",
  "authorizationConfirmed": false,
  "dataAvailable": false,
  "sourceUrls": [],
  "recordCount": 0,
  "listingCount": 0,
  "itemCount": 0,
  "diagnosticCount": 1,
  "diagnosticDetails": [{
    "code": "AUTHORIZATION_REQUIRED",
    "message": "Current written permission is required; no source requests were made.",
    "sourceUrl": "https://www.newhome.ch/"
  }],
  "failureCount": 0,
  "failureDetails": [],
  "uniqueRecordCount": 0,
  "requestCount": 0,
  "detailRequestCount": 0,
  "responseBytes": 0,
  "robotsBlocked": 0,
  "cloudOperations": 0,
  "finishedAt": "2026-09-25T00:00:00.000Z"
}
```

The `OUTPUT` key-value record reports canonical status, permission state, source URLs, requests, bytes, saved listings, aggregate diagnostics and failures, robots blocks, and completion time. Diagnostics do not count toward `maxItems` and are not dataset items. Clean bounded or empty runs are `SUCCEEDED` / `COMPLETED`; later failures after a real property row is saved are `SUCCEEDED` / `PARTIAL`; zero-row failures are `FAILED` / `FAILED`; and the default permission gate is `SUCCEEDED` / `SKIPPED_POLICY`.

### Tips and advanced options

`maxItems` is global across input URLs. Duplicate listing URLs are emitted once per run. Detail enrichment is globally limited by `maxDetailRequests`; turn off `includeDetails` or set that limit to zero to avoid detail requests. The Actor checks robots.txt before search or detail requests and refuses redirects. A failed detail request leaves the discovered property row in the dataset and records its failure in `OUTPUT`. Pagination is not generated automatically; provide each authorized search URL explicitly. Empty, blocked, and unavailable pages produce aggregate diagnostics rather than placeholder properties.

### FAQ, support, and responsible use

The reviewed [General Terms and Conditions](https://www.newhome.ch/blog/en/legal-info/) reserve rights in platform content and do not grant a general data-extraction license. They also describe protection against unauthorized crawling or spidering of advertisements. The public [robots.txt](https://www.newhome.ch/robots.txt) disallows selected paths and does not itself grant permission for other paths. Do not use the Actor without a separate written authorization covering the activity and reuse. The Actor is not affiliated with Newhome. Respect the site's terms, robots instructions, privacy requirements, rate limits, and applicable law; do not collect personal data without a legitimate reason. Report issues in the Actor's Issues tab with a run ID and diagnostic summary when possible.

For offline checks, run `npm test`, `npm run check`, `npm run validate`, and `apify validate-schema`. Local saved rows are historical and do not qualify the current Actor build as a live source scraper.

### Dependency security and HTTP caching

The locked dependencies require Node.js 20.18.1 or later. Implemented Actor Cloud builds use Node.js 22.

HTTP response caching is disabled throughout the SDK dependency graph by a project-owned, tested non-caching policy replacement. Responses are always fetched afresh; stale cached responses and serialized cache headers cannot be reused. This replaces the vulnerable package rather than suppressing its advisory. The locked FTP client is 6.2.1; the SDK keeps its supported interface.

The original unpatched-cache advisory is [GHSA-ch52-4w7c-c8xp](https://github.com/advisories/GHSA-ch52-4w7c-c8xp). The FTP patch is documented in [GHSA-c475-qrg2-pj4r](https://github.com/advisories/GHSA-c475-qrg2-pj4r). Project tests include actual localhost HTTP requests with a shared cache and distinct user headers. These tests make no target-site requests and do not qualify extraction.

# Actor input Schema

## `authorizationConfirmed` (type: `boolean`):

Set true only when current written permission covers automated collection and use. This operator attestation does not grant permission. Defaults to false.

## `startUrls` (type: `array`):

Explicit public search or property-detail HTTPS URLs on newhome.ch that are covered by current written permission. No URL is configured by default.

## `maxItems` (type: `integer`):

Maximum unique property rows across all supplied URLs.

## `includeDetails` (type: `boolean`):

Request each discovered official detail page when current permission and robots.txt allow it.

## `maxDetailRequests` (type: `integer`):

Upper bound on property detail requests across all start URLs.

## `requestDelayMs` (type: `integer`):

Fixed wait before each search or detail request after robots.txt is checked.

## `timeoutSecs` (type: `integer`):

Timeout for each authorized request.

## Actor input object example

```json
{
  "authorizationConfirmed": false,
  "maxItems": 25,
  "includeDetails": true,
  "maxDetailRequests": 10,
  "requestDelayMs": 1000,
  "timeoutSecs": 30
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `runSummary` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("realestateapi/newhome-properties-and-details-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("realestateapi/newhome-properties-and-details-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call realestateapi/newhome-properties-and-details-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,realestateapi/newhome-properties-and-details-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/RxV21sEMFsbBNKanQ/builds/5cjWVMnHPN3WP7g1L/openapi.json
