# Hepsiemlak Scraper - Property Listings, Prices & Contacts (`abotapi/hepsiemlak-com-scraper`) Actor

Scrape hepsiemlak.com sale and rental listings by city or district, or paste listing links. Every row carries price, area, rooms, seller and location. Detail enrichment adds specs, description and contact.

- **URL**: https://apify.com/abotapi/hepsiemlak-com-scraper.md
- **Developed by:** [Abot API](https://apify.com/abotapi) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.70 / 1,000 listing records

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## Hepsiemlak Scraper: Turkey Property Listings

Scrape [hepsiemlak.com](https://www.hepsiemlak.com) sale (`satilik`) and rental
(`kiralik`) listings by city or district, or read pasted listing links.

### What each row carries

Listing-card fields come from the search page itself: price in lira, gross
area, room plan, seller name, city, image and link. Turn on **Fetch details**
(one surcharge per record, at most) for the listing page: the full spec table
(listing no, floor, age, heating, deed status, furnishing), the description
and the seller contact.

### Input

- **Mode**: `search` walks one listing path per location; `urls` reads pasted links.
- **Locations**: city or district names (`Istanbul`, `Ankara Cankaya`). Turkish
  letters fold automatically. Empty means the nationwide listing path.
- **Filters**: min/max price (TRY) and min/max area (m2) narrow search walks.
- **Max items**: the single cap on a run (default 20, 0 means unlimited).
- **Resume and recurring updates**: continue an interrupted run by run ID, or
  track a setup across schedules with NEW / UPDATED / UNCHANGED / REAPPEARED /
  EXPIRED labels. The two cannot be combined on one run.

### Example output (illustrative placeholders, not live listings)

| title | price | grossSqm | rooms | city |
|---|---|---|---|---|
| Sample 2+1 apartment near Sample Square | 4250000 | 110 | 2+1 | Istanbul |
| Sample garden villa with pool | 18900000 | 320 | 4+2 | Izmir |

### Notes

- The portal challenges plain connections, so runs use residential exits in
  the home market first and a page-rendering serving tier only when those are
  refused. A run that cannot read any page fails loudly instead of returning
  an empty dataset.
- Seller names and phones shown on a listing are published by the lister as
  the contact channel; they are normal marketplace fields.

# Actor input Schema

## `mode` (type: `string`):

Search mode walks listing pages for each location. URL mode reads each pasted link.

## `listingType` (type: `string`):

sale reads satilik paths, rent reads kiralik paths.

## `propertyType` (type: `string`):

Narrow search walks to a property kind. Pasted listing links ignore this.

## `locations` (type: `array`):

City or district names, for example Istanbul, Ankara Cankaya, Izmir Karsiyaka. Turkish letters are folded automatically. Empty means the nationwide listing path.

## `minPrice` (type: `integer`):

Keep only listings at or above this price in lira.

## `maxPrice` (type: `integer`):

Keep only listings at or below this price in lira.

## `minArea` (type: `integer`):

Keep only listings with at least this gross area.

## `maxArea` (type: `integer`):

Keep only listings with at most this gross area.

## `urls` (type: `array`):

One or more hepsiemlak.com links. A listing page returns that listing; a catalogue page is walked like a search.

## `fetchDetails` (type: `boolean`):

Read each listing page for the spec table, description and contact. Adds one detail-enrichment charge per record, at most.

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

The single cap on this run: stop after collecting this many records across all locations and links. Set 0 for unlimited.

## `maxPages` (type: `integer`):

Safety bound on how many result pages to walk per location or link. Leave at 0 for no page limit: the run then stops at Max items, not here.

## `resumeFromRunId` (type: `string`):

Continue an interrupted crawl: records already collected by this run ID (or dataset ID) are skipped. Cannot be combined with recurring updates on one run.

## `incrementalMode` (type: `boolean`):

Remember this setup's listings between runs and label every row NEW, UPDATED, UNCHANGED, REAPPEARED or EXPIRED. Cannot be combined with resume on one run.

## `stateKey` (type: `string`):

Name this monitoring setup. Runs with the same key share one baseline; leave empty to derive it from the search setup.

## `emitUnchanged` (type: `boolean`):

Return UNCHANGED rows too (they still count as dataset items and are billed as such). Off by default: unchanged rows are suppressed.

## `emitExpired` (type: `boolean`):

Return EXPIRED rows for listings missing from a complete scan (they still count as dataset items and are billed as such). Only on complete scans.

## `proxyConfiguration` (type: `object`):

Leave the default for the cheapest run. The portal challenges plain connections, so residential exits in the home market are the default lane. Change it only if a run reports that it could not read any results.

## Actor input object example

```json
{
  "mode": "search",
  "listingType": "sale",
  "propertyType": "any",
  "locations": [
    "Istanbul"
  ],
  "urls": [
    "https://www.hepsiemlak.com/en/satilik"
  ],
  "fetchDetails": false,
  "maxItems": 20,
  "maxPages": 0,
  "incrementalMode": false,
  "emitUnchanged": false,
  "emitExpired": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "TR"
  }
}
```

# Actor output Schema

## `overview` (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 = {
    "mode": "search",
    "listingType": "sale",
    "propertyType": "any",
    "locations": [
        "Istanbul"
    ],
    "urls": [
        "https://www.hepsiemlak.com/en/satilik"
    ],
    "fetchDetails": false,
    "maxItems": 20,
    "incrementalMode": false,
    "emitUnchanged": false,
    "emitExpired": false,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "TR"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("abotapi/hepsiemlak-com-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 = {
    "mode": "search",
    "listingType": "sale",
    "propertyType": "any",
    "locations": ["Istanbul"],
    "urls": ["https://www.hepsiemlak.com/en/satilik"],
    "fetchDetails": False,
    "maxItems": 20,
    "incrementalMode": False,
    "emitUnchanged": False,
    "emitExpired": False,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "TR",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("abotapi/hepsiemlak-com-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 '{
  "mode": "search",
  "listingType": "sale",
  "propertyType": "any",
  "locations": [
    "Istanbul"
  ],
  "urls": [
    "https://www.hepsiemlak.com/en/satilik"
  ],
  "fetchDetails": false,
  "maxItems": 20,
  "incrementalMode": false,
  "emitUnchanged": false,
  "emitExpired": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "TR"
  }
}' |
apify call abotapi/hepsiemlak-com-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,abotapi/hepsiemlak-com-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/YzHXELEmYmwwcn84i/builds/sR6ZdO8wPv1ZsLs9D/openapi.json
