# Officeworks Search API Documentation

<p><strong>Officeworks Search API Documentation</strong> Search the public Australian office supplies catalogue by query, category, brand, colour, sort, AUD price range, zero-based page and clearance or ranged flags. Hits carry sku, name, brand, AUD price, categories, stock flags and full-size image URLs. Ids work unchanged in the next routes. 1 credit per request. Failed requests are never billed.</p>

- **Documentation:** [https://scrappa.co/docs/officeworks-api/officeworks_search](https://scrappa.co/docs/officeworks-api/officeworks_search)
- **API group:** Officeworks API
- **Endpoint:** `GET https://scrappa.co/api/officeworks/search`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `query` | string | No | Search text, e.g. laptop |
| `category` | string | No | Category from a search hit |
| `brand` | string | No | Brand from a search hit |
| `colour` | string | No | Colour facet value |
| `sort` | string | No | newest, price_asc, price_desc, rating_asc, rating_desc or name |
| `price_min` | number | No | Minimum price in AUD |
| `price_max` | number | No | Maximum price in AUD |
| `page` | integer | No | Zero-based page number, default 0 |
| `hitsPerPage` | integer | No | Results per page, default 24 |
| `clearance` | boolean | No | Only clearance items |
| `ranged` | boolean | No | Only ranged items |

## Example response

```json
{
    "data": {
        "hits": [
            {
                "sku": "HPD90S3PA",
                "url": "https://www.officeworks.com.au/hp-laptop",
                "name": "HP Laptop",
                "brand": "HP",
                "flags": {
                    "ranged": true,
                    "clearance": false
                },
                "image": "https://www.officeworks.com.au/image.jpg",
                "price": {
                    "current": 397,
                    "currency": "AUD",
                    "discount": null,
                    "original": null
                },
                "rating": {
                    "count": 120,
                    "average": 4.5
                },
                "highlight": null,
                "attributes": [],
                "categories": [
                    "Computers/Laptops"
                ]
            }
        ],
        "page": 0,
        "query": "laptop",
        "facets": {
            "brand": {
                "HP": 120
            }
        },
        "nbHits": 1200,
        "nbPages": 50,
        "hitsPerPage": 24
    },
    "meta": {
        "credits": 1,
        "billable": true,
        "endpoint_family": "algolia_search"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A query parameter is invalid. Failed requests are not billed. |
| 503 | Upstream Unavailable | The source is temporarily unavailable. Failed requests are not billed. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
