# Complete Guide: How to Scrape SeLoger Listings Using Python

SeLoger is a French real-estate portal for homes to buy and rent. For anyone who needs its listings in a spreadsheet or a database, such as an agency comparing asking prices, an analyst tracking prices per square metre, or a developer feeding a dashboard, the website alone is slow going. Each search page holds 30 listings, and nothing on the page exports them.

This guide shows how to run the **SeLoger Scraper** Apify Actor (`reventadata/seloger-scraper`) from Python with the official `apify-client` package. The script starts one search, waits for it to finish, and reads the rows back. The walkthrough follows one real run: a search for apartments to buy in Paris that returned 30 listings. Every number in the article comes from that run's rows, so you can check each claim against the sample row.

## TL;DR

Install the client, set a `location` and a `maxItems` cap, call the Actor, and read the rows from its default dataset. The script below does exactly that. Every field used in it appears in the sample row further down, and the Actor's input is described in the section on the Actor itself.

## Prerequisites and setup

You need Python 3.11 or newer, an Apify account, and its API token, which you copy from the Integrations page in Apify Console. The client package needs Python 3.11 or newer, so run `python3 --version` first to check yours. The Actor reads public pages, so there is no login to SeLoger and no browser to install. The Apify client for Python is one package:

```bash
pip install -U "apify-client~=3.0"
```

The `-U` flag matters if an older 2.x client is already installed: a plain install keeps it.

## Understanding SeLoger Scraper

SeLoger Scraper reads the listings of a SeLoger search and saves one row per listing. Its input decides which listings are read:

- `location`: a French city or area name such as `Paris` or `Lyon`, or a SeLoger place id such as `AD08FR31096`. A name is matched to a place, the first match is used, and the run log names it.
- `transaction`: `buy` (the default) or `rent`.
- `estateType`: `apartment` (the default) or `house`. Other SeLoger categories are not offered.
- `priceMin`, `priceMax`, `roomsMin`, `roomsMax`, `spaceMin`, `spaceMax`: optional limits on price, rooms and living area in square metres. A value of 0 is a real limit.
- `sortBy`: `relevance` (the site's own order, the default) or `priceAsc`, cheapest first.
- `maxItems`: a hard cap on the rows pushed. The default is 1000.
- `maxPages`: an optional cap on result pages, 30 listings each.

The site serves at most 9,990 results for one search, so a search that matches more needs price, rooms or surface limits to reach the rest. The run logs a warning in that case. A listing that repeats across a page boundary is saved once.

What a row contains is covered in the Understanding your data section below.

## Step-by-step walkthrough

The run in this guide used this input, quoted exactly as it was sent:

```json
{
    "location": "Paris",
    "maxItems": 30,
    "maxPages": 1
}
```

`transaction` and `estateType` were not sent, so the defaults applied: buy and apartment. Those are the values of every row in the run.

Save the following as `seloger_listings.py` in a new folder. Put your own token in the `TOKEN` line and run `python seloger_listings.py`.

```python
from apify_client import ApifyClient

TOKEN = "<YOUR_APIFY_TOKEN>"
client = ApifyClient(TOKEN)

run_input = {
    "location": "Paris",
    "maxItems": 30,
    "maxPages": 1,
}

run = client.actor("reventadata/seloger-scraper").call(run_input=run_input)
if run is None:
    raise SystemExit("The Actor run did not finish.")

rows = list(client.dataset(run.default_dataset_id).iterate_items())
print(f"{len(rows)} listings")

for row in rows:
    print(row["priceText"], row["areaM2"], row["rooms"], row["zipCode"], row["agencyName"])
```

`call()` starts the Actor and returns the finished run, or `None` when there is no run to read. `run.default_dataset_id` names the dataset that holds the rows, and `iterate_items()` yields each row as a dictionary. Each row is a Python dictionary, so a value is read by its key, such as `row["price"]`. If `run` is `None`, the script stops before it reads any rows. In the run behind this guide the Actor finished in 65.9 seconds and saved 30 rows, which the script prints as `30 listings`.

Read the script from the top. The import brings in the client, and `TOKEN` is the only value you change. `run_input` is a plain dictionary, so you can add any input from the list above to it, with the same name and type. The last loop prints five fields for each row. Add or remove keys as you need, using the names in the sample row below.

The first row of the run, shown as the script receives it, is below. Two changes are made for the article: `imageUrls` is cut to one entry, and `searchUrl` is left out. No value is edited.

```json
{
    "id": "26NT1GYSIXDE",
    "url": "https://www.bellesdemeures.com/285979427/detail.htm",
    "portal": "bellesdemeures",
    "legacyId": "285979427",
    "title": "Appartement à vendre",
    "transaction": "BUY",
    "propertyType": "APARTMENT",
    "propertySubType": null,
    "price": 950000,
    "currency": "EUR",
    "priceText": "950 000 €",
    "pricePeriod": null,
    "chargesLabel": null,
    "priceDetail": "10 722 €/m²",
    "pricePerSquareMeter": 10722,
    "areaM2": 88.6,
    "plotAreaM2": null,
    "rooms": 4,
    "bedrooms": 3,
    "floorText": "Étage 2/6",
    "availability": null,
    "energyClass": "D",
    "yearBuilt": null,
    "city": "Paris 17ème arrondissement",
    "zipCode": "75017",
    "district": "Ternes-Maillot",
    "isAddressPublished": true,
    "headline": "PMC TRAVERSANT / BALCON 8 m² / TERNES",
    "description": "Au pied de la promenade Pereire, dans un environnement calme et verdoyant du 17 € arrondissement, à seulement 5 minutes à pied du métro Porte-Maillot (ligne 1) et à proximité immédiate des commerces et des écoles, le Cabinet BR Immobilier vous propose ce bel appartement de 86 m². TRAVERSANT et bénéficiant de beaux VOLUMES grâce à sa HAUTEUR SOUS PLAFOND de 3,05 m, ce 4-pièces est situé au 2 € étage avec ASCENSEUR d'un immeuble ANCIEN de bonne facture, sécurisé, avec gardien et accès contrôlé pa...",
    "publisherType": "AGENCY",
    "isPrivateOwner": false,
    "agencyName": "BR IMMOBILIER",
    "contactName": "Elyes Zammit",
    "agencyProfileUrl": "https://www.seloger.com/professionnels-immobilier/XhQ9iPouVtsLw3Pu9VYLYL",
    "agencyWebsite": "http://www.br-immo.fr/",
    "agencyAddress": "7 avenue de l'Opéra, 75001 Paris",
    "phoneNumbers": [
        "+33744220498"
    ],
    "agencyCompany": "SAS, société par actions simplifiée BR IMMOBILIER",
    "agencyHeadOffice": "7 avenue de l'Opéra, 75001 PARIS",
    "agencyRcs": "833370000",
    "agencySiret": "83337000000022",
    "isExclusive": true,
    "isNew": true,
    "has3DVisit": true,
    "hasBrokerageFee": false,
    "newBuildProgramTitle": null,
    "newBuildProgramUrl": null,
    "imageUrls": [
        "https://cdnihddipa.cloudimg.io/5/c/a/0/5ca0a21b-a7df-424f-ba11-1f038831dc9d.jpg?ci_seal=883965e57ea0e0b68501b4dec85f1b5e4ca06c83"
    ],
    "floorplanUrls": [
        "https://cdnihddipa.cloudimg.io/9/4/c/a/94cad4b2-486f-4c73-a765-c98f88ff420d.jpg?ci_seal=1ca3eb57f15d405dc31e1bd403ea3759d78db9ac",
        "https://cdnihddipa.cloudimg.io/e/6/2/e/e62e0bce-699d-42be-a5a2-5085eaf99f55.jpg?ci_seal=2dd9b9ae2fb85d66337143581c4816c18c8089e0",
        "https://cdnihddipa.cloudimg.io/8/6/8/0/8680e624-9bfc-45ec-95fe-164ffe8dc616.jpg?ci_seal=bb22173b40066a808f9c46190119f41fef75f58f"
    ],
    "createdAt": "2026-11-13T15:34:00Z",
    "updatedAt": "2026-11-18T08:06:12.019Z"
}
```

## Working with the API

The client makes two calls. The first call waits for the run, so the rows are complete when the script reads them. The first starts the Actor with `run_input` and waits for the run. The second reads the run's default dataset through `iterate_items()`, which yields one row at a time. The script above collects the rows in a list with `list(...)`. When you only need to process each row once, loop over the iterator directly with `for row in client.dataset(run.default_dataset_id).iterate_items():` and handle each row in the loop body. The rows themselves do not change between the two forms: both return the dictionaries listed in the sample row above.

Numbers arrive as numbers, such as `price` and `areaM2`, and text arrives as strings. A `null` value arrives as `None` in Python. The script does not round or reformat any value.

If you need the rows later, store the `run.default_dataset_id` with them, so you can find that run's dataset again.

## Advanced usage patterns

**Narrow the search before you read it.** Price, rooms and surface limits go to the site with the search, so only matching listings are read. Only listings that match are read, so the rows match what you asked for.

**Sort for the cheapest listings.** Set `sortBy` to `priceAsc` when you want the least expensive listings first. Pair it with `maxItems` to cap the run at the cheapest rows.

**Split large searches.** When a search matches more than 9,990 listings, the run reads the first 9,990 only. Split it by price band or by number of rooms, run each part, and merge the rows on `id`, the key the Actor removes repeats on.

**Read the portal field.** SeLoger's sister portals can return listings in the same search. Each row carries a `portal` value, and its `url` points to that portal's domain. In this run all 30 rows have `portal` set to `bellesdemeures`.

**Read the timing.** The run in this guide finished in 65.9 seconds for 30 rows, so a search of this size is a short wait.

**Keep the run small while you build.** `maxItems` stops the run at that many rows, and `maxPages` stops it after that many result pages. Start with 30 rows and one page, check the output, and raise the caps when the script works.

## Understanding your data

Each row has the same keys, and the sample row above shows them all. In this run:

**Price and area.** Prices run from 900000 to 5550000, with a median of 1770000. `areaM2` runs from 59.09 to 281.51, and `pricePerSquareMeter` from 9887 to 38276.

**Rooms and energy.** `rooms` is 4 on 12 rows, 3 on 6, 5 on 6, 6 on 3, 7 on 1, 8 on 1, and empty on 1. `energyClass` is D on 17 rows and E on 6, with C, F, G and B on the rest.

**Location and publisher.** All 30 rows are in Paris, across 10 postcodes. `publisherType` is AGENCY on 28 rows and REAL_ESTATE_AGENT on 2, and `isPrivateOwner` is false on all 30. `phoneNumbers` is present on 26 rows.

**Empty in this run.** `availability`, `chargesLabel`, `pricePeriod`, `propertySubType`, `plotAreaM2`, `newBuildProgramTitle` and `newBuildProgramUrl` are `null` on all 30 rows. A missing value is `null`, never `0`.

## Troubleshooting guide

**FAILED with a message.** The run ends FAILED when the site refuses the run or when an input is wrong. The message in the log says which. Check the message, correct the input if it names one, and start the run again later if the site refused it.

**Unknown location.** A `location` with no match stops the run with an error that says the location has no place. Use the name as you would type it on [seloger.com](http://seloger.com), or a place id such as `AD08FR31096`.

**SUCCEEDED with no rows.** A search that matches no listings ends SUCCEEDED with a message saying so. Widen the price or room limits, or check the transaction and the property type.

**A value rejected before the run starts.** A `transaction` or `estateType` outside its list is refused before the run starts.

**A field is null.** Most nulls are fields the listing does not publish. The table in the previous section lists which fields are empty in this run. To find the rows that lack a value, test for `None`, for example `[row['id'] for row in rows if row['yearBuilt'] is None]`, which lists the ids of the rows with no construction year.

## Best practices

- Keep the Apify token in an environment variable, not in the script you share.
- Save `run.default_dataset_id` next to the rows, so you can trace where each row came from.
- Use `maxPages` with `maxItems` on a test run, so the run reads one page first.
- Read `null` as missing, not as zero, in every calculation.
- Compare prices per square metre rather than raw prices when the areas differ.
- Check `portal` before you mix rows from different sources.
- Set `maxItems` for every run, so a mistyped search cannot read more rows than you expected.

## Conclusion and next steps

You now have a script that runs SeLoger Scraper, waits for it, and prints the main columns of each row. Each field it reads is in the sample row above. Next, change `location` to another French city, try `transaction` set to `rent`, and save the rows to a CSV file or a database.

For current pricing and details, see the [Store page](https://apify.com/reventadata/seloger-scraper).

Tell me in the comments which city you tried and which fields you found most useful.

*About the author: reventadata builds and publishes data extraction Actors on the Apify Store.*
