---
title: "Search active agricultural service listings"
method: GET
path: "/services/search"
tags: ["Services"]
---

# Search active agricultural service listings

`GET /services/search`

## Request

- Base URL: `https://api.purplegrain.com/api/v1`
- URL: `https://api.purplegrain.com/api/v1/services/search`
- Auth: none declared

Search active service listings that have a saved location. Filter by an exact category name, a term matching names, descriptions, categories or tags, and optionally latitude, longitude and radius in metres. Valid coordinates enable nearest-first ordering; otherwise results are newest first. Returns matching service details and optional included relationships. Use page and per_page, following meta.next_page. This search does not book services or contact providers.

## Query parameters

- `page` integer
- `per_page` integer
- `category` string
- `latitude` string
- `longitude` string
- `radius` string
- `term` string
- `include` string

## Response `200`

Success. When the `include` query parameter is used, the response may contain an `included` array (JSON:API) or inlined related resources (application/json).

- ServicesIndexResponseAttributes
  - `data` ServiceModelAttributes[]
    - `id` string
    - `type` string
    - `slug` string
    - `name` string
    - `status` 'active' | 'inactive'
    - `cost` string, nullable
    - `currency` string, nullable
    - `description` string, nullable
    - `tags` string[]: Hashtag-style labels (they work like Twitter hashtags) — free-form lowercase tokens stored without a leading hash, e.g. ["slashing", "north-paddock"]. Reusing a tag groups records together, and the /tasks/search and /services/search term parameter matches tags case-insensitively, so a tag aggregates everything labelled with it. Always an array — the API never returns null.
    - `radius` integer, nullable
    - `url` string
    - `image_url` string, nullable
    - `image_thumb_url` string, nullable
    - `updated_at` string, date-time
    - `created_at` string, date-time
    - `city` object: Inlined when include=city
    - `place` object: Inlined when include=place
    - `owner` object: Inlined when include=owner
    - `category` object: Inlined when include=category
    - `location` object: Inlined when include=location
  - `meta` PaginationMeta
    - `current_page` number
    - `next_page` number, nullable
    - `prev_page` number, nullable

---

[API](https://skmtc.dev/purplegrain/apis/purple-grain-api.md) · [All operations](https://skmtc.dev/purplegrain/apis/purple-grain-api/llms.txt) · [OpenAPI document](https://skmtc.dev/purplegrain/apis/purple-grain-api/revisions/06540345bbbc?raw)
