# Australian Taxation Office — Wrapped API

> **You are on:** `https://api.beta.paywithlocus.com/api` | [llms.txt](https://beta.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 official Australian Taxation Office rulings, legislation, court cases, and interpretative decisions to find authoritative tax guidance and legal information. Access specific tax documents directly to research compliance requirements and regulatory interpretations relevant to your situation.

**Category:** Government & Public Data | **Website:** [www.ato.gov.au/single-page-applications/legaldatabase#Law/table-of-contents](https://www.ato.gov.au/single-page-applications/legaldatabase#Law/table-of-contents) | **Docs:** [parse.bot/marketplace/33d20e6e-09b5-43ed-b0d5-507e992447d1/ato-gov-au-api](https://parse.bot/marketplace/33d20e6e-09b5-43ed-b0d5-507e992447d1/ato-gov-au-api)

Pay-per-use API proxy for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.beta.paywithlocus.com/api/wrapped/credits/australian-taxation-office/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## Endpoints

### Get document

Retrieve a specific document from the ATO Legal Database by its document ID. Returns full document content as text plus Dublin Core metadata (title, type, dates, keywords, description). The doc_id is obtained from search results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `doc_id` | string | Yes | Document identifier from search results (e.g. 'AID/AID201517/00001', 'GST/GSTR20141/NAT/ATO/00001'). |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/australian-taxation-office/get-document \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"doc_id":"<string>"}'
```

### Search

Search the ATO Legal Database for documents matching a query. Returns paginated results with document titles, IDs, and summaries. Supports filtering by document category and toggling between exact phrase and keyword search. The page parameter controls which page of results to return (default 1), and page_size controls results per page (default 10).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category` | string | No | Category filter code to refine results. Format is a code string with separator ':::' (e.g. 'E:::Rulings', 'JA:::ATO interpretative decisions', 'C-CY:::Cases', 'A+B+FI:::Legislation'). Omitting returns results from all categories. |
| `exact_phrase` | boolean | No | When true, searches for the exact phrase. When false, searches for any of the words. |
| `include_archived` | boolean | No | When true, includes archived content in search results. |
| `page` | integer | No | Page number of results to return. |
| `page_size` | integer | No | Number of results per page (1-100). |
| `query` | string | Yes | Search terms to find in the legal database. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/australian-taxation-office/search \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"category":"<string>","exact_phrase":"<boolean>","include_archived":"<boolean>","page":"<integer>","page_size":"<integer>","query":"<string>"}'
```

## Next steps

- [All wrapped API providers](https://beta.paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://beta.paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://beta.paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://beta.paywithlocus.com/agent/index.md): every Locus agent page.