# Spatial Nsw — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Search and retrieve spatial data, publications, news, and information from NSW Spatial Services, including portal items, data packs, and groups. Access detailed information about spatial datasets and resources available through the NSW Spatial Services Portal.

**Category:** Maps & Geospatial | **Website:** [spatial.nsw.gov.au/](https://spatial.nsw.gov.au/) | **Docs:** [parse.bot/marketplace/aadaaf03-21a5-4b9e-acc2-410fe1a5c311/spatial-nsw-gov-au-api](https://parse.bot/marketplace/aadaaf03-21a5-4b9e-acc2-410fe1a5c311/spatial-nsw-gov-au-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-spatial-nsw-gov-au-api-aadaaf03/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_data_packs

Search for data packs (GIS processing and feature service packages) in the portal. Returns paginated results sorted by modification date descending with id, name, type, owner, tags, snippet, and timestamps.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Maximum number of results to return. |
| `start` | integer | No | Start index for pagination (1-based). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-spatial-nsw-gov-au-api-aadaaf03/get_data_packs \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","start":"<integer>"}'
```

### get_news

Retrieve news articles from the NSW Spatial Services website. Returns all currently listed news items with title, date, URL, and summary. No pagination; returns the full listing from the news page.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-spatial-nsw-gov-au-api-aadaaf03/get_news \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_portal_groups

List all public groups in the NSW Spatial Collaboration Portal. Returns groups sorted alphabetically by title with id, title, owner, snippet, tags, access level, and timestamps.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Maximum number of groups to return. |
| `start` | integer | No | Start index for pagination (1-based). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-spatial-nsw-gov-au-api-aadaaf03/get_portal_groups \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","start":"<integer>"}'
```

### get_portal_item_details

Get detailed metadata for a specific portal item by its unique ID. Returns full item properties including description, tags, extent, license info, access details, and timestamps. The item_id is obtained from search_portal_items or list_all_portal_items results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `item_id` | string | Yes | Unique alphanumeric ID of the portal item (from search_portal_items.results[*].id or list_all_portal_items.results[*].id). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-spatial-nsw-gov-au-api-aadaaf03/get_portal_item_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"item_id":"<string>"}'
```

### get_publications

List publications available on the NSW Spatial Services website. Returns publication titles, URLs, and descriptions. No pagination; returns all publications from the publications page.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-spatial-nsw-gov-au-api-aadaaf03/get_publications \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### list_all_portal_items

List all public items in the NSW Spatial Collaboration Portal with pagination. Returns results sorted by modification date descending. Use start and limit to paginate through the full catalog.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Maximum number of results to return. |
| `start` | integer | No | Start index for pagination (1-based). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-spatial-nsw-gov-au-api-aadaaf03/list_all_portal_items \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","start":"<integer>"}'
```

### search_portal_items

Search for items in the NSW Spatial Collaboration Portal by keyword. Returns paginated results sorted by modification date descending. Each result includes id, title, type, owner, tags, snippet, and timestamps. Pagination uses a 1-based start index; nextStart indicates the next page or -1 when exhausted.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Maximum number of results to return. |
| `query` | string | No | Search keywords to filter portal items. |
| `start` | integer | No | Start index for pagination (1-based). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-spatial-nsw-gov-au-api-aadaaf03/search_portal_items \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","query":"<string>","start":"<integer>"}'
```
