By the end of this tutorial you will have a short Python script that pulls job listings from Rekrute, the Moroccan job board, into structured rows. Each row holds the job title, the company, the location, the posting date and the link to the listing. You do not need to write any scraping code yourself.
Rekrute Scraper (reventadata/rekrute-scraper) is the Apify Actor built for this site. You give it a search phrase, such as informatique, and it returns one row per job. This guide calls it from Python with the Apify client. The Actor is not affiliated with Rekrute. It reads public search pages without a login.
Prerequisites
You need three things:
- Python 3, with the Apify client installed.
- A free Apify account. You can sign up on the Apify site.
- Your Apify API token, from your Apify account.
Install the client and export the token:
pip install -U "apify-client~=3.0"
export APIFY_API_TOKEN="your_apify_token_here"
No browser automation is needed on your side. The Actor reads the public pages for you.
What you'll achieve
You will search Rekrute for informatique, read the rows in Python and print two lines per job. The first line holds the title, the company and the location. The second line holds the posting date and the link to the listing. Because every row has the same fields, you can sort the output by company or location afterwards, or paste it into a spreadsheet.
To search for another phrase, change one value in the script and nothing else. A short snippet in Step 5 saves the rows to a CSV file, so the list can leave Python and go into a spreadsheet.
Step 1: Open Rekrute Scraper
Open the Rekrute Scraper page on Apify Store. This tutorial calls the Actor from Python, so the name reventadata/rekrute-scraper is all you need from that page.
Step 2: Choose the search
The Actor takes two input fields:
-
query: the search phrase. Required. The site is in French, so use a French keyword such asinformatique. Extra spaces between words are collapsed, and a phrase longer than 120 characters is rejected. -
maxItems: the most rows to store. Left unset, it defaults to 100. The minimum is 1.
One search returns one page of up to 10 results, so a maxItems above 10 does not add rows. The sample input below is the one the Actor's input form pre-fills:
{"query": "informatique", "maxItems": 10}
Step 3: Run it from Python
This script starts the Actor, waits for it to finish, reads the dataset and prints two lines per job:
import os
from apify_client import ApifyClient
# 1. Initialise the client with your token from the environment
client = ApifyClient(os.environ["APIFY_API_TOKEN"])
# 2. Describe the search: informatique jobs, at most 10 rows
run_input = {"query": "informatique", "maxItems": 10}
# 3. Start the Actor and wait for it to finish
run = client.actor("reventadata/rekrute-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. Read the rows from the run's default dataset
items = client.dataset(run.default_dataset_id).list_items().items
print(f"Retrieved {len(items)} jobs.\n")
# 5. Print two lines per job
for item in items:
print(f"{item['title']} at {item['company']}, {item['location']}")
print(f" posted: {item['date']} {item['url']}")
To search for something else, change the phrase in query.
Here is what the script does, in order. It builds the client from your token, so the token never sits in the file. It describes the search as a small dictionary. It starts the Actor with call(), which waits until the run finishes and returns the finished run. If the run did not succeed, the script stops and prints the status, so it never reads a dataset that was not filled. Otherwise it reads the rows from the run's default dataset and prints two lines per job.
Step 4: Read the output
Each row is a JSON object. The example run of 27 November 2026 used exactly this input (informatique, maxItems 10) and stored 10 rows. This is the first of them, whole:
{
"id": "189018",
"title": "Commercial (H/F)",
"location": "Casablanca (Maroc)",
"company": "Devink",
"date": "27/11/2026",
"url": "https://www.rekrute.com/offre-emploi-commercial-hf-recrutement-devink-casablanca-189018.html",
"matchedQuery": "informatique",
"scrapedAt": "2026-11-27T14:34:51.409029+00:00"
}
Step 5: Save the rows to a CSV file
This snippet continues the script from Step 3 and writes the rows to a CSV file:
import csv
# Save the rows from Step 3 to a CSV file
fields = ["id", "title", "company", "location", "date", "url", "matchedQuery", "scrapedAt"]
with open("rekrute_jobs.csv", "w", newline="", encoding="utf-8") as f:
writer = csv.DictWriter(f, fieldnames=fields)
writer.writeheader()
writer.writerows(items)
Understanding your results
These are the fields you will use most:
-
id: the job identifier on the site. Rows in one run are not repeated: a job whoseidwas already stored is skipped. -
title: the job title. -
company: the employer name. It can benullwhen the site shows none. -
location: the place published with the job, for exampleCasablanca (Maroc). It can benullwhen the site shows none. -
date: the posting date as the site shows it, for example27/11/2026. It is text, and it can benull. -
url: the public link to the job on Rekrute. -
matchedQuery: the search phrase that produced the row. -
scrapedAt: the time the row was read, in ISO 8601.
Every row in the sample has all eight fields, and the same eight names apply to every phrase, so one script reads every search.
Pro tips and advanced usage
-
Start small. Keep
maxItemsat 10 while you check the output. One search returns at most 10 rows anyway. -
Search by phrase, then filter yourself. The Actor has no location or company filter, so filter the rows in Python by
location. -
Use a French keyword. The site is in French, so a French phrase such as
informatiqueis the safe choice. -
Keep the link. The
urlfield links straight to the job, so store it with your own notes. -
Run several phrases. The Actor takes one phrase per run. Call it once per phrase in a loop, and use the
matchedQueryfield to see which phrase produced each row. -
Compare two runs. Run the same phrase on two days and compare the two lists by
urlto see which jobs are new.
Troubleshooting common issues
The run did not succeed. Open the run in the Apify Console and read its log. The script prints the run status and stops.
Fewer rows than maxItems. One search returns one page of up to 10 results, so a larger maxItems cannot return more. A phrase with no public results stores no rows at all.
A field is null. company, location and date are null when the site shows no value for that job. Handle that in your code, for example with item.get("company").
The run ended at once with an input error. query is required, it must be 120 characters or fewer, and maxItems must be at least 1.
Next steps
Once the rows look right, open the CSV file in a spreadsheet, or load it into a database with your own code. Then try a second phrase and compare the two result lists by url.
For current pricing and details, see the Store page. Which phrase will you search on Rekrute? Drop a comment below.
About the author: reventadata builds and publishes data extraction Actors on the Apify Store.
Top comments (0)