# NSW eTendering Tenders Scraper: NSW Government Tenders (`badboxx_newlife/nsw-etendering-tenders`) Actor

- **URL**: https://apify.com/badboxx_newlife/nsw-etendering-tenders.md
- **Developed by:** [Francesco Correnti](https://apify.com/badboxx_newlife) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

Export NSW Government tenders (the old NSW eTendering, now buy.nsw) as JSON/CSV: bid hunters and consultants filter by keyword and agency. No login.

### Use case

Bid hunters and consultants track new NSW government tenders (RFT/RFQ/EOI) by keyword and agency, as JSON/CSV, without login.

### Input

| field | example | meaning |
|---|---|---|
| `keyword` | `"bridge"` | site search text; empty = all |
| `agency` | `"Transport"` | keep tenders whose agency contains this text |
| `includeDetails` | `false` | `true` adds `description` (text shown in the list; no extra requests) |
| `maxItems` | `50` | default 100, max 5000 |

### Output fields

| field | meaning |
|---|---|
| `rftId` | agency reference (e.g. `BDA001501`); site UUID if none |
| `title`, `agency` | as listed |
| `category` | site category, `; `-joined when several |
| `tenderType` | `RFT`, `RFQ`, `EOI`, ... |
| `status` | always `open` (site lists open tenders only) |
| `publishedDate` | always `null`: not shown on the list |
| `closingDate` | ISO-8601, Australia/Sydney offset (`+10:00` / `+11:00`) |
| `url` | `https://buy.nsw.gov.au/prcOpportunity/<uuid>` |
| `description` | only with `includeDetails` |

Missing values = `null`. Business data only: no contact names, emails or phones.

### Sample

Real rows from the 2026-11-06 live run (`sample.json`, 20 items, `maxItems` 30 run in `RUN.md`):

| rftId | title | agency | type | closingDate |
|---|---|---|---|---|
| BDA001501 | First Building Creative Producer Services 2026 - 2028 | Bradfield Development Authority | RFT | 2026-12-01T15:00:00+11:00 |
| SR01342 | New Bunberoo Creek Bridge | Water Group | RFT | 2026-12-01T15:00:00+11:00 |
| SOH-C1558 | Vending Machines at the Sydney Opera House | Sydney Opera House | RFT | 2026-11-17T15:00:00+11:00 |
| LAHC 2026/510 | Design Finalisation and Construction - Grafton - BH3G6 | Homes NSW | RFT | 2026-11-23T15:00:00+11:00 |
| 26.0000139367.0770 | Macquarie Street Windsor, Old Northern Road Glenorie and Galston Road Pedestrian Refuge Project | Transport Infrastructure Projects | RFT | 2026-12-07T15:00:00+11:00 |

### Pricing

Pay per event: $0.005 per start + $0.002 per tender (event `result`). Example: 1000 tenders = $0.005 + 1000 x $0.002 = $2.005. Charged only on push; the run stops at `maxItems` or at your spending cap.

### Limits

No login, no proxy. Page 1 is loaded in headless Chromium (playwright) to pass the AWS WAF JS challenge; its cookies are reused by plain fetch for the next pages (`?page=N&types=Tenders`, 10 rows/page, 118 open tenders at test time). Needs the `apify/actor-node-playwright-chrome` image (Dockerfile). If the WAF still blocks, the run stops with `stopped early: ...` and is not charged.

### Known issues

- Departure from brief: no `status` input and no closed tenders. The site lists open opportunities only (`tenders.nsw.gov.au` redirects to `buy.nsw.gov.au`; no closed filter), so closed/all would always return 0. `fixtures/listing_closed.html` is RECONSTRUCTED (open rows relabelled "Closed:") and only tests the parser. Awarded-contract notices live on a different site and were not added.
- Item URLs use the final host `https://buy.nsw.gov.au/`, not `tenders.nsw.gov.au`.
- Detail pages are not scraped: `publishedDate` is `null`; `includeDetails` adds the list description only.
- `actor-start` is charged only after page 1 is fetched and parsed; a blocked run costs nothing.
- Live proof ran with the Apify `Actor` object stubbed (no Apify account run); the network, browser and parsing were real.
- `publish.py` was NOT run against Apify. Run `python3 publish.py --noruns` with `APIFY_TOKEN` to publish without test runs.

### Run / test

`python3 check.py` (offline: stubbed fetch and browser over `fixtures/`: parsing, ISO dates, no personal data, page 2, maxItems, PPE, blocked run = no charge). Live proof log: `RUN.md`. Live: `echo '{"maxItems":30}' > storage/key_value_stores/default/INPUT.json; node src/main.js`. Pattern from #468 (GeBIZ).

# Actor input Schema

## `keyword` (type: `string`):

Search the NSW tender list for this word or phrase. Empty = all. Example: bridge.

## `agency` (type: `string`):

Keep only tenders whose agency name contains this text. Empty = all. Example: Transport.

## `includeDetails` (type: `boolean`):

Add the description text shown in the list (no extra requests; the detail pages sit behind a bot wall). Example: false.

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

Maximum tenders returned; you pay per tender, so this caps cost. Example: 50.

## Actor input object example

```json
{
  "keyword": "bridge",
  "includeDetails": false,
  "maxItems": 50
}
```

# Actor output Schema

## `notices` (type: `string`):

No description

# 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 = {
    "keyword": "bridge",
    "maxItems": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("badboxx_newlife/nsw-etendering-tenders").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 = {
    "keyword": "bridge",
    "maxItems": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("badboxx_newlife/nsw-etendering-tenders").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 '{
  "keyword": "bridge",
  "maxItems": 50
}' |
apify call badboxx_newlife/nsw-etendering-tenders --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,badboxx_newlife/nsw-etendering-tenders"
        }
    }
}
```

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/KHUqpPndKLgOBbedi/builds/w1qG3oV9GxhmXlfkF/openapi.json
