# CKAN Open Data Portals: Government Datasets (`plain-build/ckan-open-data-scraper`) Actor

Dataset catalogs of Italy's dati.gov.it and South Australia's data.sa.gov.au CKAN portals by keyword; turn on Only new datasets for daily runs. Lists 10 datasets by default: title, publisher, groups, tags, license, dates, formats, link. No files, metadata only. No login, no key.

- **URL**: https://apify.com/plain-build/ckan-open-data-scraper.md
- **Developed by:** [Plain Build](https://apify.com/plain-build) (community)
- **Categories:** Automation, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 50.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.28 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## CKAN Open Data Portals: Government Datasets

This CKAN open data scraper returns the dataset catalog of two public CKAN portals - Italy's dati.gov.it and Data.SA in South Australia. Search by words and portal; each row is one dataset with its title, publisher, groups, tags, licence, dates, number of files, file formats and link. No login, no key. USD 1.50 per 1,000 results (USD 1.28 on Silver and above); errors and empty runs are not charged.

### What it does

The dataset catalog of public CKAN open data portals (Italy's dati.gov.it, South Australia) by keyword: title, publisher, groups, tags, licence, dates, file formats, link. Metadata only, not the files. No key.

The data comes from CKAN action API through their official APIs (https://docs.ckan.org/en/2.11/api/index.html). This Actor is not affiliated with, endorsed by or sponsored by CKAN action API. It reads only those APIs, at most 2 requests at a time, and it checks robots.txt before the first request to each host.

### Who it is for

- Data journalists and researchers: find every dataset an Italian authority or an Australian state publishes on a topic, with its update date, file formats and a link.
- Civic tech and GovTech teams: monitor new datasets on transport, health, budgets or the environment, on a schedule.
- Data engineers: build an index of open datasets by portal, publisher, tag and format to pick sources for a pipeline.

### Key features

- One search across two CKAN portals: about 75,000 datasets on dati.gov.it and 1,900 on Data.SA
- Columns include title, description, portal, publisher, groups, tags, licence, created and changed dates, number of files, file formats and link
- Only-new-datasets option: with new_since_last_run on, only datasets not delivered before for the same search are delivered and charged
- Most recently changed first, 100 datasets a request
- No login, no key; the official CKAN API only, at most 2 requests at a time
- No author, maintainer, contact person or email in the output

### How it works

The Actor calls the official CKAN action API (package_search) of two public CKAN portals: dati.gov.it (Italy's national portal) and data.sa.gov.au (South Australia). It sends your search words as plain words, sorts by last change, newest first, and reads 100 datasets a page from each chosen portal, two requests at a time. It returns the catalog record of each dataset, not its files. Authors, maintainers, contact fields and portal-specific extra fields are never read into the output, and the free-text fields are cleaned the same way as all free text. A run reads at most 10,000 datasets of one portal; past that the Actor writes an uncharged error item that says to narrow the search.

### How to try it

1. Open the Input tab. The prefilled input returns 25 datasets about transport from South Australia, most recently changed first.
2. Click Start. A run usually finishes in under a minute.
3. Open the Output tab to see the results as a table, or export them as JSON, CSV or Excel.

Each portal is read most recently changed first, and the portals are read side by side; the rows alternate portal by portal. To follow new datasets, schedule a daily run with `new_since_last_run` on. A dataset you got before is not delivered again when it is updated; turn the option off to get the current metadata of all.

- Each combination of `query` and `portals` has its own memory.
- With several portals, Maximum results is shared between them: rows alternate portal by portal, so each portal gets its turn.
- The memory is a key-value store named `ckan-open-data-scraper-state` in your account. Delete it to start again.
- Two runs at the same time can deliver and charge the same dataset, so leave a gap between scheduled runs.

A run reads at most 10,000 datasets of one portal. A search with more ends with a `result_cap` item in the errors dataset: add search words. dati.gov.it alone holds about 75,000 datasets, so an empty search there stops at the 10,000 most recently changed. With `new_since_last_run` on, the older datasets past the first 10,000 are not reached by later runs either.

The search words are sent as plain words: CKAN's search syntax (field:value, wildcards, AND, OR, NOT) is not passed through.

A portal that is down or answers something other than its catalog gets one uncharged error item, and the other portals still deliver; the run fails only when no chosen portal could be read.

dati.gov.it and Data.SA publish under Creative Commons Attribution 4.0: when you publish the data, credit the portal (the portal and url columns name it). Data.SA asks for the organisation, the dataset title, the date sourced and the link: the publisher, title, fetched_at and url columns.

Only the catalog record is read: the dataset's files are not downloaded. Authors, maintainers, contact persons and their emails are never read. A publisher that reads as a person's name is left empty. Links to code hosts, social networks, funding pages and research profiles (for example linkedin.com/in/..., github.com/..., orcid.org/...) are cut from the delivered text, because they name an account, often a person's.

The name check uses derived data, not official statistics: Statistics Norway (SSB) table 10501 and the Finnish Digital and Population Data Services Agency (DVV) first names, both CC BY 4.0, and Czech Statistical Office data, plus hand-written names.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `query` | string | "" | Words to look for in dataset titles, descriptions and tags, for example transport or water quality. Leave empty for all datasets of the portals. Search syntax such as field:value or wildcards is read as plain words. An email is refused. |
| `portals` | array | \[] | dati.gov.it (Italy), data.sa.gov.au (South Australia) or both. Leave empty for both. |
| `new_since_last_run` | boolean | false | Deliver and charge only datasets this Actor has not delivered to you before for the same search words and portals. A dataset held back by Maximum results or your spending limit comes in the next run. Delivered datasets are remembered in a key-value store named ckan-open-data-scraper-state in your account. |
| `max_items` | integer | 10 | How many results to return at most, from 1 to 10000. |

### Output

Each result has these fields. Missing values are `null`, never a different type.

| Field | Type | Description |
|---|---|---|
| `item_type` | string | Always `public_record` |
| `source_id` | string | The portal id, a slash and the dataset's CKAN id, for example data.sa.gov.au/2d8d4f4b-3d9e-44a0-94ca-d7c9a040fd57 |
| `title` | string | Dataset name |
| `description_snippet` | string or null | The first 300 characters of the description |
| `portal` | string | The portal the dataset is on: dati.gov.it or data.sa.gov.au |
| `publisher` | string or null | The organisation that publishes the dataset on the portal. Empty when it reads as a person's name |
| `groups` | string or null | The portal's groups (themes) for the dataset, comma separated: the first 50 |
| `tags` | string or null | The dataset's tags, comma separated: the first 200, at most 5,000 characters |
| `license` | string or null | Licence as the portal states it. Empty when the portal states none |
| `created_at` | string or null | When the catalog record was created, ISO time in UTC, to the second |
| `updated_at` | string or null | When the catalog record last changed, ISO time in UTC. Datasets of one portal come sorted by it, newest first |
| `resource_count` | number or null | Number of files and links (CKAN resources) of the dataset |
| `formats` | string or null | The file formats of the resources, comma separated, for example CSV, JSON: the first 50 |
| `url` | string | The dataset's page on its portal, by its CKAN id |
| `source_url` | string | The record on the source site |
| `fetched_at` | string | When the record was fetched, ISO 8601 UTC |
| `actor_version` | string | The build that produced the record |

Example item:

```json
{
  "item_type": "public_record",
  "source_id": "<source_id>",
  "title": "<title>",
  "description_snippet": "<description_snippet>",
  "portal": "<portal>",
  "publisher": "<publisher>",
  "groups": "<groups>",
  "tags": "<tags>",
  "license": "<license>",
  "created_at": "<created_at>",
  "updated_at": "<updated_at>",
  "resource_count": 0,
  "formats": "<formats>",
  "url": "<url>",
  "source_url": "<source_url>",
  "fetched_at": "2026-11-04T09:30:00Z",
  "actor_version": "0.2.1"
}
```

Free-text fields are cleaned before delivery: email addresses, phone numbers, @handles and person names introduced by words such as "contact", "recruiter", "founder" or "manager" are replaced with `[removed]`. The cleaning follows fixed rules, so a name written elsewhere in the text, or in lower case, can remain.

### What it does not do

- Two portals only: dati.gov.it and data.sa.gov.au. Many other CKAN portals (Open Data Zurich since 20 Nov 2026, data.gov.ie, opendata.swiss, data.gov.au, data.qld.gov.au, govdata.de, data.gov.uk, the Humanitarian Data Exchange) forbid their API path in robots.txt, so they are not read. open.canada.ca allows it but asks for 20 seconds between requests; it is not read in this version.
- Data.NSW (New South Wales) allows the API in robots.txt, but states no licence for its catalog and makes access conditional on not using its content for AI training, so it is not read.
- Metadata only: the dataset's files are not downloaded.
- At most 10,000 datasets of one portal per run, most recently changed first; an updated dataset you already got is not delivered again while new_since_last_run is on. Tags stop at the first 200, groups and file formats at the first 50.
- Version 0.2 only: with new_since_last_run on, the memory belongs to the search words and the portal list. Two lists change with this version: an empty list now means two portals instead of three, and a list that named data.stadt-zuerich.ch (as the old prefilled input did) is refused until you remove it. In both cases the changed list starts a new memory: datasets 0.1 runs delivered from the remaining portals can be delivered and charged again, over several runs when Maximum results or your spending limit stops a run. Once they are remembered under the new list, later runs skip them.
- Search words are plain words: CKAN's own search syntax is not passed through.
- Profile and code-host links are cut from the title, description, publisher, groups, tags and licence. Rarer link forms (another host that mirrors an account, or a link written without its host) may keep an account name.

### How much it costs

You pay per result delivered to the default dataset. Errors and empty results are written to a separate `errors` dataset and are never charged.

| Plan tier | Price per 1,000 results |
|---|---|
| Free and Bronze | USD 1.50 |
| Silver and above | USD 1.28 |

Example: a run that delivers 1,000 results costs USD 1.50 on the Free and Bronze tiers and USD 1.28 on Silver and above, plus the platform's start event of USD 0.00005. If you set a maximum cost per run, the Actor stops before it would go over it and delivers nothing it cannot charge for.

### Other Actors in this family

This Actor is part of a family of job and public-data scrapers built on the same core: one result per charge, a separate uncharged errors dataset, and no person fields. Links follow as the other Actors are published.

### FAQ and support

- **Is there personal data in the output?** No personal data by design. One row is a dataset's catalog record, never a person. Authors, maintainers, contact persons, their emails and portal-specific extra fields are never read. A publisher that reads as a person's full name is left empty, and emails, phones, names after words such as contact and links to profile pages are removed from the title, description, tags, groups and licence. The name check uses a list of common given names, so it can miss a rare name.
- **Is the data accurate?** Accuracy is not guaranteed. The data is parsed from free text written by many people, and fields can be missing or wrong.
- **Who runs this Actor?** It is not affiliated with CKAN action API.
- **How is the data collected?** The official API or open data is used where the source offers it. This Actor uses only the official APIs of CKAN action API.
- **Which portals does it cover?** Two public CKAN portals whose robots.txt and terms allow reading their catalog API - dati.gov.it (Italy's national open data portal, about 75,000 datasets) and data.sa.gov.au (South Australia, about 1,900). Open Data Zurich (data.stadt-zuerich.ch) was read until version 0.1; its robots.txt forbids the API path since 20 Nov 2026. Socrata portals such as data.cityofnewyork.us are in our separate Socrata scraper.
- **Why not data.gov.uk or data.gov.au?** Their robots.txt forbids automated access to the CKAN API path (or the whole site), so this Actor does not read them. The same holds for Open Data Zurich (since 20 Nov 2026), data.gov.ie, opendata.swiss, govdata.de, data.qld.gov.au, the Humanitarian Data Exchange and several others.
- **Can I search for a person?** No, that is not a supported use. CKAN's search also reads a dataset's author and maintainer fields, so a person's name can match datasets that person maintains. A search with an @ (an email) is refused before any request; a name is not refused, because place names such as George Street read the same way. The rows never name authors or maintainers.
- **Does it download the data of a dataset?** No. Each row is the catalog record of one dataset - title, description, publisher, groups, tags, licence, dates, number of files, file formats and the link. Open the link for the files.
- **How do I get only new datasets every day?** Schedule a daily run with new_since_last_run on. Only datasets not delivered before for the same search words and portals are delivered and charged. A dataset you already got is not delivered again when it changes; turn the option off for the current metadata of all.
- **Is it legal to use these catalogs?** The two portals publish their catalogs through the public CKAN API without a login or key, and their robots.txt does not forbid it. dati.gov.it and Data.SA state open licences that allow reuse with credit to the source. Each portal sets its own terms and licence for its data; the licence column shows the licence the dataset states. This is an open reading, not a legal opinion. Not affiliated with CKAN, the Open Knowledge Foundation or any portal.
- **What may I do with the data?** You are responsible for complying with the law and with the source's terms when you use the data.
- **Something is broken.** Open an issue on the Issues tab with the run link and your input. Issues are answered by the automated maintainer.

# Changelog

This Actor's version history is a separate document: https://apify.com/plain-build/ckan-open-data-scraper/changelog.md

# Actor input Schema

## `query` (type: `string`):

Words to look for in dataset titles, descriptions and tags, for example transport or water quality. Leave empty for all datasets of the portals. Search syntax such as field:value or wildcards is read as plain words. An email is refused.

## `portals` (type: `array`):

dati.gov.it (Italy), data.sa.gov.au (South Australia) or both. Leave empty for both.

## `new_since_last_run` (type: `boolean`):

Deliver and charge only datasets this Actor has not delivered to you before for the same search words and portals. A dataset held back by Maximum results or your spending limit comes in the next run. Delivered datasets are remembered in a key-value store named ckan-open-data-scraper-state in your account.

## `max_items` (type: `integer`):

How many results to return at most. You pay per result delivered.

## Actor input object example

```json
{
  "query": "transport",
  "portals": [
    "data.sa.gov.au"
  ],
  "new_since_last_run": false,
  "max_items": 25
}
```

# Actor output Schema

## `results` (type: `string`):

One item per public record.

## `errors` (type: `string`):

Records that could not be delivered, and queries with no results. Not charged.

# 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 = {
    "query": "transport",
    "portals": [
        "data.sa.gov.au"
    ],
    "max_items": 25
};

// Run the Actor and wait for it to finish
const run = await client.actor("plain-build/ckan-open-data-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 = {
    "query": "transport",
    "portals": ["data.sa.gov.au"],
    "max_items": 25,
}

# Run the Actor and wait for it to finish
run = client.actor("plain-build/ckan-open-data-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "query": "transport",
  "portals": [
    "data.sa.gov.au"
  ],
  "max_items": 25
}' |
apify call plain-build/ckan-open-data-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,plain-build/ckan-open-data-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/KvofeRE9NR6evXkXn/builds/iGRw2KZLqL143zDzo/openapi.json
