NT planning and pastoral notices scraper

A morph.io scraper for the Northern Territory Government's Development Applications Online notices. It captures every notice the site publishes, current and archived:

  • Planning notices, all application types: development (D), subdivision (S), planning scheme amendment (PS), exceptional development permit (ED) and concurrent application (CA). The archive also holds V, VE, CC and AL notices. Those types are missing from the site's own type list, which doesn't say what they stand for, so application_type_description is empty for them.
  • Pastoral notices: pastoral land clearing (PLC) and non-pastoral use (NPU).

How the site works

The site is a Vue single page app. The notice lists, and the panel that slides out on "view proposal", are drawn in the browser from four JSON endpoints that the app calls itself. They are not documented and need no key.

| Endpoint | Method | Contents | | - | - | - | | /planning-notices-online/notices/json | GET | Planning notices on exhibition now | | /planning-notices-online/notices/archived/json | POST | Planning notices previously on exhibition | | /planning-notices-online/notices/pastoral/json | GET | Pastoral notices on exhibition now | | /planning-notices-online/notices/pastoral/archived/json | POST | Pastoral notices previously on exhibition |

The archive endpoints take a JSON body of {"query": "byMonth", "year": 2026, "month": 2}, where the month is a number. Any other month format returns HTTP 500. They return every notice whose exhibition overlapped that month, so a notice that spans two months is listed in both. A notice that is on exhibition now appears only in the current feed. Once its exhibition ends, it is added to the archive for each month it spanned.

The site's archive menu only offers years from 2010, but the server answers for earlier years too. Planning notices go back to 1995 (sparse until about 2003). Pastoral notices start in 2021.

All four endpoints return the same notice structure. The app also has archive searches by date range, address and applicant name, which this scraper doesn't need.

Output

data.sqlite contains four tables.

data: one row per notice

One row per exhibition, keyed on notice_key, which combines the source, the application's applicationId and the exhibition dates (e.g. planning:125502932:2026-12-04:2026-12-18).

The feed's own notice id can't be the key. The current feeds generate a new id on every request, so it would add duplicate rows each run; only the archive's ids are stable. The application number isn't unique either: one application can be exhibited more than once, parallel applications can share a number, and an extended exhibition appears in the archive twice with different finish dates. The key also lets the archive record take over a notice's row once its exhibition ends.

| Column | Notes | | - | - | | notice_key | See above | | archive_notice_id | The archive's stable id for the notice. Empty while the notice is on exhibition. | | application_number | e.g. PA2026/0449 (planning) or PL2026/0009 (pastoral). Not unique. | | application_id, draft_id | Internal NTLIS ids | | source | planning or pastoral | | status | on_exhibition or archived | | application_type, application_type_description | e.g. S, Subdivision | | description | The notice's purpose | | variations | Variations sought, comma separated | | assessment_category | e.g. Merit Assessment | | address | First parcel with a street address, e.g. 205 ROSS HWY, ROSS, NT. For remote parcels, the land description and locality. Empty for notices with no parcel, such as Territory-wide scheme amendments. | | suburbs, land_description | Every parcel's locality and legal description, separated by ; | | consent_authority, consent_authority_formal | e.g. Darwin, Development Consent Authority (Darwin Division) | | applicants | Applicant names as published on the notice, separated by ; | | on_notice_from, on_notice_to | Exhibition period, ISO 8601 | | info_url | For notices on exhibition, notices#/index?referenceNumber=<ref>, which shows just that application. For archived notices, the archive page. The site has no permanent page for each application. | | parcel_overlays, regional_land_use_plans, sub_regional_land_use_plans, area_plans, proposed_zones | Planning context | | document_count | Number of documents attached to the notice | | first_seen, last_seen | Darwin dates this scraper first and last saved the notice | | raw_json | The full notice exactly as the feed returned it, so nothing is lost |

parcels

One row per land parcel per notice: legal description, property name, street address, locality, zoning and overlays. Joins to data on notice_key.

documents

One row per document per notice, joined to data on notice_key: category, file name and URL. The feed often lists the same document several times, identical down to its id (about 45,000 entries for 8,800 documents), so each document is stored once. The feed's document links point at https://localhost/..., a bug on the site's side, so they are rewritten to the working https://www.ntlis.nt.gov.au/ilis/planningPopup/lta.dar.viewDocument/... path. The documents themselves are not downloaded.

archive_months

Records which archive months have been fetched, so later runs don't fetch them again.

How runs work

  1. Fetch both current feeds and save them as on_exhibition.
  2. Fetch every archive month, for both sources, that hasn't settled yet. A month counts as settled once it ended more than 120 days ago. Until then, notices whose exhibitions finish later can still be added to it, so it is fetched again on each run.
  3. Mark any notice that was on exhibition, but no longer is, as archived.

The first run backfills the whole archive from 1990: about 880 requests, roughly half an hour. Later runs make about a dozen requests. If an archive month fails, the run carries on and retries that month on the next run. Set the MORPH_FULL_REFRESH environment variable to true on morph.io to fetch every month again.

Relationship to PlanningAlerts

PlanningAlerts already scrapes the current planning feed with planningalerts-scrapers/northern_territory. This scraper is broader: it covers the archive and pastoral notices, and keys on notices rather than applications. Because of that, its data table does not follow the PlanningAlerts format, in which council_reference must be unique and address is required.

morph.io configuration

These files matter, and none of them should be deleted:

  • platform selects the heroku-24 build image. Without it, morph.io builds on cedar-14.
  • runtime.txt pins Python 3.12. morph.io copies only requirements.txt, runtime.txt and Procfile into the build step, so .python-version is never seen there. A missing runtime.txt is replaced with morph's default, python-2.7.6. The heroku-24 image's Python buildpack (v267) supports 3.10 to 3.13.
  • requirements.txt is deliberately empty, because the scraper uses only the standard library. A missing one is replaced with morph's Python 2 era default list.
  • .python-version is only for local tooling such as pyenv, mise and uv.

Running locally

sh python3 scraper.py # writes ./data.sqlite; the first run takes about half an hour python3 -m unittest -v # offline, uses tests/fixtures/feeds.json

Contributors brdlyp

Last run failed with status code 255.

Console output of last run

Injecting configuration and compiling... [1G [1G-----> Python app detected [1G-----> Using Python 3.12 specified in runtime.txt [91m [1;31m ! Error: Python 3.12.7 isn't available for this stack (heroku-24).[0m [1;31m ! [0m [0m [91m[1;31m ! For a list of the supported Python versions, see:[0m [0m [91m[1;31m ! https://devcenter.heroku.com/articles/python-support#supported-runtimes[0m [0m

Statistics

Total run time: less than 20 seconds

Total cpu time used: less than 5 seconds

Total disk space used: 101 KB

History

  • Manually ran revision 7972021a and failed .
  • Manually ran and failed .
  • Created on morph.io