# Australian Taxation Office — 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 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. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-ato-gov-au-api-33d20e6e/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## 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.paywithlocus.com/api/wrapped/parse-ato-gov-au-api-33d20e6e/get_document \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-ato-gov-au-api-33d20e6e/search \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"category":"<string>","exact_phrase":"<boolean>","include_archived":"<boolean>","page":"<integer>","page_size":"<integer>","query":"<string>"}'
```
