PAP is the French property site where private sellers and landlords publish their own listings, without an agency in between. Each listing has a price, a postcode, the rooms and the area, and often a description and photos. If you need those listings as rows, for a list of flats in one district or a comparison of prices across a city, a short Python script can collect them for you. This tutorial shows you how to call the PAP.fr Scraper Actor (reventadata/pap-scraper) with the official apify-client package, wait for the run to finish, and print one block per listing. Each listing comes back as a JSON row with its price, rooms, area and location.
You do not write any scraping code. The Actor reads the public result pages, so no login is needed.
Prerequisites
You need Python 3 and a free Apify account. Copy your Apify API token from your account, then install the client and set the token as an environment variable:
pip install -U "apify-client~=3.0"
export APIFY_API_TOKEN="your_apify_token_here"
Nothing else is required. The script below uses only the client and the standard library.
What you'll achieve
At the end of this tutorial you will have a script that asks PAP.fr Scraper for apartments for sale in Paris and prints each listing's price, area, rooms and location. The run also saves the same rows to an Apify dataset, so you can download them as JSON, CSV or Excel. A typical use is a list of listings in one area and one price band, with the same columns for every row. Each row keeps the search that produced it, so the dataset can hold several searches side by side. The example uses the same Paris page and ten listings as the rest of this tutorial.
Step 1: Find the Actor
Open the Actor's page in the Apify Store at reventadata/pap-scraper. The page lists the input fields and an example of the output. The Python client calls the same Actor by that name, so the script below works without any other setup.
Step 2: Set the input
The Actor takes these fields. Only searchUrls and maxItems are needed for a first run.
| Field | Type | What it does |
|---|---|---|
searchUrls |
array | pap.fr result pages, the plain address without a question mark. |
location |
string | A city or postcode, used when searchUrls is empty. The first match pap.fr suggests is searched. |
offerType, propertyType
|
string |
sale or rent, and apartment or house, used with location. |
priceMin, priceMax
|
integer | A price band in euros, given together, used with location. |
maxItems |
integer | Stop after this many listings are saved. |
maxPages |
integer | Result pages to read for each search. |
includeDetails |
boolean | Adds the detail fields to each row. Off by default. |
The script below asks for the Paris page for apartments for sale, ten listings from two result pages.
Step 3: Run the Actor
Save the script as a .py file and run it with python. The call waits until the run finishes, then reads the dataset.
import os
from apify_client import ApifyClient
# 1. Initialize ApifyClient with the token from the environment
client = ApifyClient(os.environ["APIFY_API_TOKEN"])
# 2. Define the input: Paris apartments for sale, ten listings from two result pages
run_input = {
"searchUrls": ["https://www.pap.fr/annonce/vente-appartement-paris-75-g439"],
"maxItems": 10,
"maxPages": 2,
}
# 3. Start the Actor run and wait for it to complete
run = client.actor("reventadata/pap-scraper").call(run_input=run_input)
if run is None or run.status != "SUCCEEDED":
status = run.status if run else "unknown"
raise SystemExit(f"Run did not succeed (status: {status}).")
# 4. Fetch the resulting dataset items
items = client.dataset(run.default_dataset_id).list_items().items
print(f"Retrieved {len(items)} listings.\n")
# 5. Print the fields you need
for item in items:
print(item.get("price"), item.get("currency"), item.get("areaM2"), "m2", item.get("rooms"), "rooms")
print(f" {item.get('location')}, {item.get('postalCode')}")
print(f" {item.get('url')}")
print("-" * 50)
While the run is active, the Actor saves each listing to the run's default dataset. If the script stops, the run keeps going on Apify's side, and its dataset stays available for later reads.
Step 4: Read the results
Each dataset item is one listing. This is the first row of the example run, with the photo fields left out:
{
"id": "465400462",
"url": "https://www.pap.fr/annonces/appartement-paris-10e-75010-r465400462",
"offerType": "sale",
"price": 799000,
"currency": "EUR",
"location": "Paris 10E (75010)",
"postalCode": "75010",
"rooms": 4,
"bedrooms": 2,
"areaM2": 96,
"energyClass": "E",
"badge": "exclusif",
"chips": ["Seulement sur PAP"],
"description": "Appartement 95 m² - 2/3 chambres - Rue d'Enghien, Paris 10ème. Appartement familial, situé au 2e étage avec ascenseur d'un immeuble ancien du XIXe siècle, rue d'Enghien, au cœur du 10e...",
"descriptionComplete": false,
"pricePeriod": null,
"detailFetched": false,
"searchUrl": "https://www.pap.fr/annonce/vente-appartement-paris-75-g439",
"scrapedAt": "2026-11-26T09:30:11.818712+00:00"
}
The script prints a shorter form of the same values. Export the full dataset from the Apify Console as JSON, CSV or Excel when you want every column.
Understanding your results
price is in euros for a sale, and pricePeriod is month for a rental. rooms and bedrooms count the rooms and the bedrooms, and areaM2 is the area. location and postalCode name the town, district and postcode as the listing prints them. energyClass is the energy label letter.
badge and chips hold the labels the listing shows, such as 'exclusif' and 'Seulement sur PAP', which is French for 'only on PAP'. url is the listing's own page, and searchUrl is the result page that produced the row. descriptionComplete is false when the saved description ends in an ellipsis. In the five saved rows of the example run, three carry the 'exclusif' badge, and the first row's description says 95 m² while its areaM2 value is 96. scrapedAt is the time the row was scraped, and detailFetched shows whether the listing's own page was read for the row. id is the listing's identifier on the site, so use it to match rows between runs.
Pro tips
Give each result page its own entry in searchUrls, so the Actor runs one search per entry, and each row carries the searchUrl that found it. Keep one kind of listing in each search, such as apartments for sale in one city, so the table stays easy to read.
For a long list, raise maxPages one step at a time. A result page holds about 15 listings, and the site shows at most 25 pages for any search. A search with more results needs a narrower price band or area, run as a separate search.
Turn on includeDetails when you need the full description, the street or the owner's phone number. The run takes longer, and a phone number appears only when the owner published one. Keep maxItems small on the first run, so you can check the prices and areas before you commit to a long list.
Troubleshooting common issues
If the run stops with an error about a search, check searchUrls. It takes a pap.fr result page address without a question mark. The run log shows the message that ended the run.
If the run succeeds with no rows, the search found no listings that match. Check the address of the page in a browser, then run again. Paste the same address into a browser to confirm that the page opens.
If a listing has no value for a field, the field holds null in the row, and the key is still there. Read the fields with item.get(...) so the script keeps running when a value is missing.
Next steps
Once the script works, put it on a schedule, load the rows into a spreadsheet or a database, and deduplicate by id between runs. Keep the searchUrl column to tell the lists for each search apart. The Apify documentation at https://docs.apify.com explains schedules and dataset exports.
For current pricing and details, see the Store page.
About the author: reventadata builds and maintains scrapers for public marketplace, job and property sites on the Apify Store.
Which city would you pull first? Tell us in the comments.
Top comments (0)