# Data Gov Au Dataset Scraper (`b2b_lead_generation/data-gov-au-dataset-scraper`) Actor

Search the Australian government open data catalogue (data.gov.au) via the public CKAN package_search API. No API key, no login, no proxy. Returns datasets or their file resources with publisher, licence, contact, and download URLs. Filter by query or organisation and export to JSON, CSV, or Excel.

- **URL**: https://apify.com/b2b_lead_generation/data-gov-au-dataset-scraper.md
- **Developed by:** [B2B Lead Generation](https://apify.com/b2b_lead_generation) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 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

## data.gov.au Dataset Scraper: Australian Open Data

<p align="center">
  <img src="https://imgur.com/let2zOy.png" alt="data.gov.au Dataset Scraper" style="max-width:100%; border-radius:14px; width:680px;" />
</p>

Search the Australian government open data catalogue and save datasets or the files hanging off them. Results land in an Apify dataset you can export as JSON, CSV, or Excel.

A health search currently matches thousands of datasets. Each record carries the publisher, licence, contact, and the files already attached to it.

### Use cases

- **Catalogue research**: pull Australian government datasets for a topic such as health, transport, or budget
- **File inventory**: switch to resources mode and list CSV, PDF, and other downloads with format and URL
- **Licence review**: keep `license_id`, `license_title`, and `license_url` next to the publisher
- **Scheduled refresh**: run the same query on a timer and diff `metadata_modified`
- **Agency filter**: narrow to a single publisher by organisation name

### What data does the data.gov.au dataset scraper extract?

`search` writes one row per dataset. `resources` writes one row per file attached to those datasets.

Rows include the catalogue fields below, plus `scrapedAt` and `sourceUrl`. The public dataset title is stored as `datasetTitle` because `title` cannot be used as an Apify dataset field name. File format and file description are stored as `resourceFormat` and `resourceDescription` for the same reason.

### Input

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `mode` | string | `search` | `search` returns datasets. `resources` returns one row per file. |
| `query` | string | `health` | Search text to match datasets. |
| `filterQuery` | string | empty | Optional filter, such as an organisation name. A rejected filter is saved as an error row. |
| `includeResources` | boolean | `true` | In search mode, attach a slim file list on each dataset row. |
| `maxItems` | integer | `100` | Cap on dataset or resource rows. Hard maximum 1000. |
| `timeoutSecs` | integer | `300` | Stop the run after this many seconds. |
| `requestTimeoutSecs` | integer | `30` | Seconds to wait for each response before retrying. |
| `proxyConfiguration` | object | `{"useApifyProxy": false}` | Optional proxy. Leave it off unless you have a reason to send traffic elsewhere. |

#### Example input

```json
{
  "mode": "search",
  "query": "health",
  "filterQuery": "",
  "includeResources": true,
  "maxItems": 100,
  "timeoutSecs": 300,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": { "useApifyProxy": false }
}
```

### Output

```json
{
  "recordKind": "dataset",
  "archived": false,
  "author": "SA Health",
  "author_email": null,
  "contact_point": "dataandreportingservices@sa.gov.au",
  "creator_user_id": "c2fbbe4a-4ba0-4945-808b-67454605a4cf",
  "duplicate_score": 2,
  "geospatial_topic": [],
  "id": "a9372b1f-e5c0-4d03-9714-0dc707343f2f",
  "isopen": false,
  "language": "English",
  "license_id": "cc-by",
  "license_title": "Creative Commons Attribution 3.0 Australia",
  "license_url": "http://creativecommons.org/licenses/by/3.0/au/",
  "maintainer": "sharon-carthew-4072",
  "datasetTitle": "SA Health Mental Health data",
  "datasetName": "mental-health-data",
  "datasetPage": "https://data.gov.au/data/dataset/mental-health-data",
  "scrapedAt": "2026-10-12T00:00:00+00:00",
  "sourceUrl": "https://data.gov.au/"
}
```

| Field | Type | Description |
|-------|------|-------------|
| `id` | string | Dataset id, or resource id in resources mode. Used for dedupe. |
| `author` | string | Publisher or author from the catalogue. |
| `contact_point` | string | Contact published with the dataset. |
| `license_id` | string | Licence id on that dataset. |
| `license_title` | string | Licence name. Attribute the dataset the way that licence asks. |
| `datasetTitle` | string | Dataset title. |
| `resources` | array | Slim file list when `includeResources` is true. |
| `resourceUrl` | string | File URL on a resource row. |
| `resourceFormat` | string | File format label. |
| `scrapedAt` | string | UTC time the row was saved. |
| `sourceUrl` | string | Source catalogue URL for the row. |
| `error` | string | Present only when a row could not be saved. |

Other catalogue fields are kept when the catalogue provides them: `archived`, `author_email`, `creator_user_id`, `duplicate_score`, `geospatial_topic`, `isopen`, `language`, `license_url`, `maintainer`, `maintainer_email`, `metadata_created`, `metadata_modified`, `name`, `notes`, `num_resources`, `num_tags`, `organization`, `original_harvest_source`, `original_name`, `owner_org`, `private`, `promotion_level`, `remote_last_updated`, `spatial`, and `spatial_coverage`.

### Limits

`maxItems` stops the run at 1000 rows even if you type a higher number. Duplicate records are skipped. A search that matches nothing saves no rows. A rejected filter is saved as a single error row.

Contact fields sometimes contain a person's name or mailbox. Treat those as personal data and keep only what you have a reason to store.

### Data source and licence

Source: [data.gov.au](https://data.gov.au/), the Australian Government's open data catalogue.

The about page states: "Terms of Use Copyright With the exception of the Commonwealth Coat of Arms and where otherwise noted, material presented on Data.gov.au is provided under a Creative Commons Attribution 3.0 Australia licence." It also says: "With the exception of the Commonwealth Coat of Arms and where otherwise noted, this work is licensed under the CC BY 4.0 license."

The same page says: "When using content from this website that is licensed under a Creative Commons Licence, you are required to attribute the work in the manner specified in the licence". Each dataset row includes `license_title` and `license_url`. Follow the licence named on that row.

### FAQ

**What is the difference between search and resources?**
Search saves datasets. Resources saves one row per file attached to those datasets.

**Why did I get an error row?**
A rejected filter or a row that could not be saved is stored as an `error` row instead of failing the whole run. A search that matches nothing saves zero rows and is not an error.

**How many rows can one run save?**
Up to `maxItems`, with a hard cap of 1000. Raise `maxItems` to save more.

**Can I export to CSV or Excel?**
Yes. The Apify dataset export covers JSON, CSV, and Excel.

### Trademark Notice

data.gov.au Dataset and related names, logos, and trademarks belong to their respective owners. Their use in this documentation is solely to identify the source of the data and does not imply affiliation, sponsorship, endorsement, or partnership.

### Disclaimer

Disclaimer: This Actor is an independent tool and is not affiliated with, endorsed by, sponsored by, or otherwise officially associated with data.gov.au Dataset or its owners. All data is collected from publicly available sources. Users are responsible for complying with the source's terms of use, rate limits, and attribution or licensing requirements.

### Is web scraping legal?

This Actor only collects publicly available data from data.gov.au Dataset. Scraping public data is generally legal, but how you use it matters:

- **Personal data:** If the results include personal data (for example names, emails, or profile details), laws such as the GDPR in the EU and the CCPA in California may apply. Only collect and store personal data when you have a legitimate reason.
- **Copyright:** Some content (articles, images, descriptions) may be protected by copyright. Do not republish full copyrighted content without permission.
- **Terms of use:** Respect the source's terms, stated rate limits, and any attribution or non-commercial-use requirements listed in the Data source and licence section.
- **Legal advice:** This is general information, not legal advice. If you're unsure, consult a lawyer.

To learn more, read Apify's guide: [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/)

# Actor input Schema

## `mode` (type: `string`):

search returns one row per dataset. resources returns one row per file attached to those datasets.

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

Text passed to the CKAN package_search q parameter on data.gov.au. Example: health.

## `filterQuery` (type: `string`):

Optional CKAN fq filter, such as organization:sa-health. Leave empty to search the whole catalogue. A rejected filter is saved as an error row.

## `includeResources` (type: `boolean`):

In search mode, attach the dataset file list on each row. Ignored in resources mode, which already emits one row per file.

## `maxItems` (type: `integer`):

Maximum dataset or resource rows to save. Values above 1000 are clamped to 1000.

## `timeoutSecs` (type: `integer`):

Stop fetching when this many seconds have passed. Already saved rows stay in the dataset.

## `requestTimeoutSecs` (type: `integer`):

Seconds to wait for each data.gov.au HTTP response before retrying.

## `proxyConfiguration` (type: `object`):

Optional proxy for CKAN requests. Default is no proxy. The public API does not require one, and a proxy is not used to bypass stated limits.

## Actor input object example

```json
{
  "mode": "search",
  "query": "health",
  "filterQuery": "organization:sa-health",
  "includeResources": true,
  "maxItems": 100,
  "timeoutSecs": 300,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `datasetUrl` (type: `string`):

Default dataset for this run, with one row per dataset, resource, or error.

## `overviewUrl` (type: `string`):

Table of archive flag, author, contact, and dataset id.

# 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 = {
    "mode": "search",
    "query": "health",
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("b2b_lead_generation/data-gov-au-dataset-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 = {
    "mode": "search",
    "query": "health",
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("b2b_lead_generation/data-gov-au-dataset-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 '{
  "mode": "search",
  "query": "health",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call b2b_lead_generation/data-gov-au-dataset-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,b2b_lead_generation/data-gov-au-dataset-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/2WCE3PZXrxfNsE0Mu/builds/kjpICklMDqVRcP5Uk/openapi.json
