# Complete Guide: How to Pull Jobindex Job Postings Using Python

[Jobindex.dk](http://Jobindex.dk) is the Danish employment marketplace. Its search pages list postings with the title, the employer, the place of work and the deadline, but a list on the screen is hard to filter, sort or join with other data. This guide shows how to read those search results into structured rows from Python. The rows keep each field in its own column, so the postings can be filtered, sorted and joined with other data without copying text by hand. The steps are the same whether you run one search or many.

**Jobindex Scraper** (`reventadata/jobindex-scraper`) is the Apify Actor for this site. You give it a keyword, a category path or a full search URL, and it returns one row per job listing, read from public pages with no login.

## TL;DR

Install `apify-client`, set your Apify API token, and call the Actor with a `searchQueries` list. Each returned row is a dictionary with the posting's title, employer, workplace, dates, remote flag and application link. The sample rows in this guide come from one platform run the Actor's README records on 2026-11-11, and no value in them was edited.

---

## Prerequisites and setup

You need:

1. Python 3.11 or newer with `pip`.
2. A free **Apify account**. You can sign up with an email address or a GitHub login.
3. Your **API token**, found in the Apify Console under the integrations settings.

Install the client. The code in this guide uses the 3.x line:

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

Set the token in your shell so that the script never contains it. A token written into a script ends up in version control and in shared copies, so keep it in the environment:

```bash
export APIFY_API_TOKEN="your-token-here"
```

---

## Understanding Jobindex Scraper

The Actor takes four inputs and returns one dataset item per posting.

| Input | What it does |
| --- | --- |
| `searchQueries` | Required. Keywords, category paths such as `/jobsoegning/it`, or full [jobindex.dk](http://jobindex.dk) search URLs. One search per entry. |
| `location` | Optional Danish region or city slug, for example `storkoebenhavn` or `aarhus`. It applies to keyword searches. |
| `maxItems` | The most postings to collect. The default is 100. |
| `maxPages` | Optional limit on result pages per query. Each page holds 20 postings, and the site maximum is 50 pages. |

A posting that the site shows under several categories or several queries is returned once. The `location` value is applied to keyword searches, so for a category path you should check the rows' `city` field to see where the postings are.

---

## Step-by-step walkthrough

### Step 1: Open the Actor

Open the [Jobindex Scraper page](https://apify.com/reventadata/jobindex-scraper) on Apify Store. The input form on that page matches the table above. You can also call the Actor from the Apify Console.

### Step 2: Choose the input

Start with a small search so that you can check the output quickly. The next block uses the keyword `python`, the Copenhagen region, ten postings and one page of results.

```python
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: Python jobs in Copenhagen, ten postings, one page
run_input = {
    "searchQueries": ["python"],
    "location": "storkoebenhavn",
    "maxItems": 10,
    "maxPages": 1,
}

# 3. Start the Actor and wait for it to finish
run = client.actor("reventadata/jobindex-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)} postings.\n")

# 5. Print one line per posting: title and employer, then deadline and remote flag
for item in items:
    print(f"{item.get('title')} | {item.get('companyName')} | {item.get('city')}")
    print(f"  posted: {item.get('datePosted')}, deadline: {item.get('deadlineDate')}, remote: {item.get('isRemote')}")
```

### Step 3: Run the Actor from Python

Save the block to a Python file in your project folder and run it:

```bash
python3 jobindex_search.py
```

The script waits for the run to end. If the status is not `SUCCEEDED`, it stops and prints the status, so a failed run never looks like an empty list.

### Step 4: Read one row

The sample row below comes from the README record of a run on 2026-11-11, with the keyword `python`. It is trimmed to the fields used in this guide. The `title` value is left out of the sample.

```json
{
  "id": "h1714761",
  "url": "https://www.jobindex.dk/vis-job/h1714761",
  "companyName": "Industriens Pension",
  "companyId": 12251,
  "location": "Nørre Farimagsgade 3, 1364 København K",
  "city": "København K",
  "zipcode": "1364",
  "street": "Nørre Farimagsgade 3",
  "latitude": 55.6804166,
  "longitude": 12.5638333,
  "datePosted": "2026-11-09",
  "deadlineDate": "2026-11-25",
  "applyUrl": "https://www.jobindex.dk/c?t=e6389802&ctx=w",
  "isRemote": false,
  "isPromoted": true,
  "isArchived": false,
  "searchQuery": "python"
}
```

---

## Working with the API

The Python client is one way in. Here is how the pieces fit together. You send a JSON object with the fields in the input table. The Actor runs, collects postings up to `maxItems`, and writes each one to its default dataset. When the run ends, its status tells you whether the list is complete, and the dataset holds the rows. Reading the status first keeps a failed run from looking like an empty list. The Apify API can start the same run with the same JSON input, and the results can be read from the dataset of the finished run. Use the client when your script is in Python, and the API when another tool, such as a spreadsheet macro or a workflow engine, starts the run.

Check the run's `status` before you read its dataset, as the script above does. Store the run identifier next to the rows, so a later question about a row can be traced back to the run that produced it. For a scheduled job, a status other than `SUCCEEDED` should raise an alert, and a `SUCCEEDED` run with zero items should be reported as a search with no matches. A run that ends as `SUCCEEDED` with zero items means the search matched nothing, not that the Actor broke.

---

## Advanced usage patterns

**Several searches in one run.** Add more entries to `searchQueries`. Every entry is one search, and the `searchQuery` field of each row tells you which search found it. A row that matches two entries is still returned once.

**Category paths for wide lists.** A path such as `/jobsoegning/it` returns the postings in that category. It often covers more postings than one keyword.

**Deadline-first sorting.** Parse `deadlineDate` as a date and sort the rows, so the postings that close soonest come first. Rows with `isApplyDeadlineAsap` set to true ask for applications as soon as possible, so group them apart from the dated rows.

**Filtering on flags.** Keep rows where `isArchived` is false. Filter on `isRemote` if you only want remote work. Keep `isPromoted` as a column rather than dropping it. It marks the listings the site flags as promoted.

---

## Understanding your data

| Field group | Fields | Notes |
| --- | --- | --- |
| Identity | `id`, `url` | `id` is the listing identifier. Use it as the key in your own store. |
| Employer | `companyName`, `companyId`, `companyHomeUrl`, `companyProfileUrl` | The employer as the posting names it. |
| Place | `location`, `city`, `zipcode`, `street`, `latitude`, `longitude` | Coordinates appear only when the posting gives an address. |
| Dates | `datePosted`, `deadlineDate`, `applyDeadline`, `isApplyDeadlineAsap` | `applyDeadline` is the same deadline as a timestamp. |
| Applying | `applyUrl`, `appApplyUrl` | The Jobindex application link, and the employer's own form where the posting has one. |
| Flags | `isRemote`, `isPromoted`, `isArchived` | Set by the site for each listing. |
| Search | `searchQuery`, `searchUrl` | The search that returned the posting. |

A field with no value is `null`. The `salary` field is `null` in the sample row, because that posting does not state one.

---

## Troubleshooting guide

**The run ends as** `FAILED`**.** The Actor ends the run with a status message when it cannot read the site or when the input is refused. The script prints the status. Open the run in the Apify Console and read its log for the message. A failed run writes no rows, so do not treat its missing output as a result. Run the same input again once the cause is fixed, because a single failed run is not a sign that the search is empty.

**The run succeeds with zero rows.** A search with no matching postings ends as `SUCCEEDED` with a status message saying nothing matched. Check the spelling of the keyword and the slug in `location`.

**Fewer rows than** `maxItems`**.** The site lists a limited number of pages for each search view, so a broad search can end first. If you need more postings, split the search by location or by category path, and run the pieces as separate entries. Each entry is then read in full, up to its own page limit, and the rows are merged by `id` in your own code.

---

## Best practices

- Keep `maxPages` small while you test, then raise it once the keyword returns the postings you expect.
- Store `id` with each row and skip ids you already hold, so repeated runs do not duplicate postings. A posting that stays open for weeks will appear in several runs, and the id is the only reliable way to recognise it. Keep the first `datePosted` you saw, so you know how long a posting has been listed.
- Read `status` and the item count on every run, and alert when a scheduled run returns zero rows. Write the run's date next to each saved batch of rows, so a later comparison knows which postings were new and which were already listed.
- Keep the token in an environment variable, never in the script. Pin the client to the 3.x line with `apify-client~=3.0`, so a future major release does not change the attributes your code reads from each run.
- Keep your own copy of the rows you need, because a dataset is a record of one run, and a later run of the same search can return a different set of postings. Give each scheduled task its own saved input, so that a change to one search does not alter another. When you change the keyword list, run a small test with `maxPages` set to 1 before the full run.

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

---

## Conclusion and next steps

You now have a script that starts Jobindex Scraper, checks the run status, and prints one line per posting. Next, change `location` to compare regions, add a second keyword to `searchQueries`, or save the input as an Apify task and attach a schedule to it. Then read each new dataset from Python in the same way.

What would you track first? Share it in the comments.
