# Sahibinden Real Estate Scraper (`lightkong/sahibinden-real-estate-scraper`) Actor

Scrape real estate listings from Sahibinden.com easily. Extracts prices, locations, m², rooms, dates & photos. Built with advanced Cloudflare bypass and session cookie support to evade login walls. Supports pagination and detail pages.

- **URL**: https://apify.com/lightkong/sahibinden-real-estate-scraper.md
- **Developed by:** [Lightkong](https://apify.com/lightkong) (community)
- **Categories:** Real estate, Automation, Open source
- **Stats:** 152 total users, 16 monthly users, 94.1% runs succeeded, NaN bookmarks
- **User rating**: 1.00 out of 5 stars

## Pricing

from $10.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Sahibinden Real Estate Scraper 🏠

### 🤖 Copy to your AI assistant
Copy this block into ChatGPT, Claude, Cursor, or any LLM to start using this actor.

```text
tyegen/sahibinden-real-estate-scraper on Apify. Call: ApifyClient("TOKEN").actor("tyegen/sahibinden-real-estate-scraper").call(run_input={"startUrls": [{"url": "URL_HERE"}]}), then client.dataset(run["defaultDatasetId"]).list_items().items for results.
````

> **🚨 CRITICAL REQUIREMENT FOR USERS: SESSION COOKIES 🚨**
>
> Sahibinden.com has extremely aggressive anti-bot protection and frequently redirects new proxy IPs to a mandatory login page.
>
> **To prevent constant TIMEOUTS or empty results, you MUST inject your personal Session Cookie into the actor's input.**
> Use an extension like `EditThisCookie` to export your session from a real browser and paste it into the `sessionCookies` field before running.

A powerful Apify Actor that scrapes real estate listings from Sahibinden.com (Turkey's largest classified ads platform). Extracts property details including price, location, size, rooms, building age, and more.

### Features

- ✅ **Cloudflare Bypass** — Puppeteer + Stealth plugin
- ✅ **Mandatory Login Bypass** — Supports injecting personal Session Cookies to evade IP login walls
- ✅ **Residential Proxy** — Required for Sahibinden.com (TR country code)
- ✅ **Detail Pages** — Optional: scrape full property details, photos, and seller info
- ✅ **Pagination** — Automatically navigates through all result pages
- ✅ **BaseRow Integration** — Optional: store data directly in BaseRow
- ✅ **Human-like Behavior** — Random delays, user agents, and viewport sizes

#### Input

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `startUrls` | Array | `satilik-daire/istanbul` | Sahibinden.com category page URLs |
| `maxItems` | Integer | All | Maximum number of listings to scrape |
| `includeDetails` | Boolean | `false` | Scrape detail pages for full info |
| `maxConcurrency` | Integer | `3` | Max concurrent pages (3-5 recommended) |
| `proxyConfiguration` | Object | RESIDENTIAL/TR | Proxy settings |

#### Output (Basic - `includeDetails: false`)

```json
{
    "id": "1234567890",
    "url": "https://www.sahibinden.com/ilan/...",
    "title": "3+1 Satılık Daire Kadıköy",
    "price": 4500000,
    "price_currency": "TL",
    "location": "İstanbul / Kadıköy",
    "date": "21 Şubat 2026",
    "image": "https://...",
    "scrapedAt": "2026-02-21T12:00:00.000Z",
    "sourceUrl": "https://www.sahibinden.com/satilik-daire/istanbul"
}
```

#### Output (Detailed - `includeDetails: true`)

Additional fields when detail scraping is enabled:

```json
{
    "description": "Kadıköy merkezde...",
    "images": ["https://...", "https://..."],
    "seller": "Emlak Ofisi",
    "rooms": "3+1",
    "size": "140 / 120",
    "buildingAge": "5-10",
    "floor": "3",
    "totalFloors": "8",
    "heating": "Doğalgaz",
    "furnished": "Hayır",
    "usage": "Boş",
    "inSite": "Evet",
    "dues": "500 TL",
    "deedStatus": "Kat Mülkiyeti",
    "creditEligible": "Evet",
    "info": {
        "Oda Sayısı": "3+1",
        "Brüt / Net M2": "140 / 120",
        "...": "..."
    }
}
```

#### Supported URL Formats

```
## Category-based
https://www.sahibinden.com/satilik-daire/istanbul
https://www.sahibinden.com/kiralik-daire/aydin
https://www.sahibinden.com/satilik-arsa/izmir
https://www.sahibinden.com/satilik-villa/antalya

## With filters
https://www.sahibinden.com/satilik-daire/istanbul?sorting=date_desc&pagingSize=50
```

#### Usage Example (API)

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

const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });

const input = {
    startUrls: [
        { url: 'https://www.sahibinden.com/satilik-daire/istanbul?sorting=date_desc' }
    ],
    maxItems: 100,
    includeDetails: false,
    maxConcurrency: 3,
    proxyConfiguration: {
        useApifyProxy: true,
        apifyProxyGroups: ['RESIDENTIAL'],
        countryCode: 'TR'
    },
    sessionCookies: [
        // Paste your exported EditThisCookie JSON here
    ]
};

// Run the actor and wait for it to finish
const run = await client.actor('YOUR_USERNAME/sahibinden-real-estate-scraper').call(input);
```

#### ⚠️ Important Notes

- **Session Cookies are highly recommended** — Sahibinden.com frequently redirects scraper proxy IPs to the mandatory login page (`/giris`). You must provide your own exported Session Cookies to bypass this wall. **Do not save your cookies when publishing the actor publicly.** Provide them only when running your own tasks.
- **RESIDENTIAL proxy is required** — Sahibinden.com blocks datacenter IPs.
- **Keep `maxConcurrency` at 3-5** — Higher values increase the risk of your session cookies or proxy being banned.
- **Country code `TR`** — Turkish residential proxies work best for latency and stealth.
- **Selectors may change** — Sahibinden.com updates their HTML periodically to break automated extraction.

# Actor input Schema

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

URLs of Sahibinden.com real estate category pages. Example: https://www.sahibinden.com/satilik-daire/istanbul

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

Maximum number of listings to scrape. Leave empty to scrape all available listings.

## `maxConcurrency` (type: `integer`):

Maximum number of pages to open concurrently. High values increase the risk of getting banned. Recommended: 3-5.

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

Proxy settings. Sahibinden.com requires RESIDENTIAL proxies.

## `baseRowApiToken` (type: `string`):

Optional: BaseRow API token to save data directly to a BaseRow table.

## `baseRowTableId` (type: `string`):

Optional: BaseRow Table ID.

## `baseRowDatabaseId` (type: `string`):

Optional: BaseRow Database ID.

## `sessionCookies` (type: `array`):

Paste your active Session Cookies JSON (exported from your browser using EditThisCookie or similar) to bypass the mandatory Sahibinden.com login screen.

## `debugMode` (type: `boolean`):

Enable debug mode to save screenshots and HTML snapshots to the Key-Value store whenever the scraper is blocked or encounters a challenge. Useful for diagnosing Cloudflare/PerimeterX issues. Disable in production.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.sahibinden.com/satilik-daire/istanbul?sorting=date_desc"
    }
  ],
  "maxConcurrency": 3,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "countryCode": "TR"
  },
  "sessionCookies": [],
  "debugMode": false
}
```

# 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 = {
    "startUrls": [
        {
            "url": "https://www.sahibinden.com/satilik-daire/istanbul?sorting=date_desc"
        }
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "countryCode": "TR"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("lightkong/sahibinden-real-estate-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 = {
    "startUrls": [{ "url": "https://www.sahibinden.com/satilik-daire/istanbul?sorting=date_desc" }],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "countryCode": "TR",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("lightkong/sahibinden-real-estate-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "startUrls": [
    {
      "url": "https://www.sahibinden.com/satilik-daire/istanbul?sorting=date_desc"
    }
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "countryCode": "TR"
  }
}' |
apify call lightkong/sahibinden-real-estate-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=lightkong/sahibinden-real-estate-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Sahibinden Real Estate Scraper",
        "description": "Scrape real estate listings from Sahibinden.com easily. Extracts prices, locations, m², rooms, dates & photos. Built with advanced Cloudflare bypass and session cookie support to evade login walls. Supports pagination and detail pages.",
        "version": "0.0",
        "x-build-id": "UMJOSN9xwVtyp4H7V"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/lightkong~sahibinden-real-estate-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-lightkong-sahibinden-real-estate-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/lightkong~sahibinden-real-estate-scraper/runs": {
            "post": {
                "operationId": "runs-sync-lightkong-sahibinden-real-estate-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/lightkong~sahibinden-real-estate-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-lightkong-sahibinden-real-estate-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "startUrls"
                ],
                "properties": {
                    "startUrls": {
                        "title": "Start URLs",
                        "type": "array",
                        "description": "URLs of Sahibinden.com real estate category pages. Example: https://www.sahibinden.com/satilik-daire/istanbul",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "maxItems": {
                        "title": "Max Items",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of listings to scrape. Leave empty to scrape all available listings."
                    },
                    "maxConcurrency": {
                        "title": "Max Concurrency",
                        "minimum": 1,
                        "maximum": 10,
                        "type": "integer",
                        "description": "Maximum number of pages to open concurrently. High values increase the risk of getting banned. Recommended: 3-5.",
                        "default": 3
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Proxy settings. Sahibinden.com requires RESIDENTIAL proxies."
                    },
                    "baseRowApiToken": {
                        "title": "BaseRow API Token",
                        "type": "string",
                        "description": "Optional: BaseRow API token to save data directly to a BaseRow table."
                    },
                    "baseRowTableId": {
                        "title": "BaseRow Table ID",
                        "type": "string",
                        "description": "Optional: BaseRow Table ID."
                    },
                    "baseRowDatabaseId": {
                        "title": "BaseRow Database ID",
                        "type": "string",
                        "description": "Optional: BaseRow Database ID."
                    },
                    "sessionCookies": {
                        "title": "Session Cookies (JSON)",
                        "type": "array",
                        "description": "Paste your active Session Cookies JSON (exported from your browser using EditThisCookie or similar) to bypass the mandatory Sahibinden.com login screen.",
                        "default": []
                    },
                    "debugMode": {
                        "title": "Debug Mode",
                        "type": "boolean",
                        "description": "Enable debug mode to save screenshots and HTML snapshots to the Key-Value store whenever the scraper is blocked or encounters a challenge. Useful for diagnosing Cloudflare/PerimeterX issues. Disable in production.",
                        "default": false
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
