# data.gov.au open data catalogue · Query datastore

Search public records with data.gov.au open data catalogue · Query datastore from Alexandria through one Spiral API key. For tabular data (population, income, business counts ...) once get_resource or a dataset card shows `datastore_active: true`. Field ids come from `fields`; do not guess them. It runs in the background and returns structured JSON. Pay as you go, with no subscription.

- Provider: Alexandria
- Category: Public Records
- Runs: In the background
- Returns: json
- Tool id: `alexandria` / `data-gov-au/open-data/query_datastore`
- Page: https://spiral.ai/tools/alexandria/data-gov-au/open-data/query_datastore

## Pricing

$0.00873 per call.

## Limits

- Longest queue wait: 1 hour
- Run deadline: 5 minutes
- Longest run, end to end: 225 minutes
- Largest inline input: 1 MB
- Largest input file: 2 GB
- Largest output: 5 GB

## Input

| Field | Kind | Allowed | Default | Description |
| --- | --- | --- | --- | --- |
| `resource_id` (required) | text |  | — | Resource id (UUID) with `datastore_active: true`, or a data.gov.au resource page / datastore dump URL containing it. |
| `q` | text |  | — | Full-text search across all columns (Postgres websearch syntax). |
| `sort` | text |  | — | Sort, e.g. `_id asc` or `"2011-12" desc`; comma-separate several. |
| `limit` | number | 1 to 1000 | 100 | Rows per page. |
| `cursor` | text |  | — | Row offset to resume from: the `next_cursor` of the previous page. Pattern: ^[0-9]{1,9}$. |
| `fields` | list |  | — | Field ids to return; default all. |
| `filters` | JSON |  | — | Equality filters keyed by field id; a value may be a scalar or an array of scalars (any of). Example {"Income year1": "Number of individuals2"}. |
| `distinct` | true or false |  | — | distinct |

## Example

```bash
curl https://api.spiral.ai/v1/runs \
  -H "Authorization: Bearer $SPIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "provider": "alexandria",
    "model": "data-gov-au/open-data/query_datastore",
    "input": {
      "resource_id": "<resource_id>"
    }
  }'
```

Try it in the Playground: https://spiral.ai/start?provider=alexandria&model=data-gov-au%2Fopen-data%2Fquery_datastore

## Common questions

### data.gov.au open data catalogue · Query datastore

**How much does data.gov.au open data catalogue · Query datastore cost?**

$0.00873 per call. You pay as you go from one Spiral balance, with no subscription, and a failed run is not charged.

**How do I use data.gov.au open data catalogue · Query datastore through an API?**

Send `POST /v1/runs` with `"provider": "alexandria"`, `"model": "data-gov-au/open-data/query_datastore"` and the input fields on this page, using one Spiral API key. It runs in the background: poll the run, or name a webhook to be told when it finishes.

**Do I need an account with Alexandria to use data.gov.au open data catalogue · Query datastore?**

No. Spiral runs it on its own Alexandria account and charges your Spiral balance.

**Can my AI agent use data.gov.au open data catalogue · Query datastore?**

Yes. Agents find and run it through Spiral's MCP server, CLI or agent skill, with the same API key.

