{
  "openapi": "3.0.1",
  "info": {
    "title": "Australia Site Selection API – Demographics | TruGrid AU",
    "description": "Compare Australian locations for retail, franchise and commercial property research. Get a complete neighbourhood profile with population, local business and audience data in one query. Export JSON/CSV or connect via MCP.",
    "version": "0.16",
    "x-build-id": "nEGfWyylVIffGqSuK"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/trustats~trugrid-au/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-trustats-trugrid-au",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/trustats~trugrid-au/runs": {
      "post": {
        "operationId": "runs-sync-trustats-trugrid-au",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/trustats~trugrid-au/run-sync": {
      "post": {
        "operationId": "run-sync-trustats-trugrid-au",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "action"
        ],
        "properties": {
          "action": {
            "title": "Action",
            "enum": [
              "demo",
              "create",
              "resume"
            ],
            "type": "string",
            "description": "Demo returns three fixed sample rows from a historical Chatswood export, with no business query fee. Create submits a new query for your location. Recover uses the original order ID.",
            "default": "create"
          },
          "operation": {
            "title": "❗ Operation — required for a new query",
            "enum": [
              "profile",
              "score"
            ],
            "type": "string",
            "description": "Required for action=create. profile returns basic, commercial and audience data for every target cell. score adds a business-context preset for qualifying candidates: 19 provide scenario comparisons, and outdoor/cycling provides context without ranks. Omitted for resume."
          },
          "preset_id": {
            "title": "Business preset — ONLY for Business context (empty for Profile)",
            "enum": [
              "after_school_tutoring",
              "allied_health_clinic",
              "boutique_coffee_bakery",
              "qsr_asian_casual",
              "symbiotic_boutique_fashion_sydney_v1",
              "symbiotic_boutique_hotel_sydney_v1",
              "symbiotic_boutique_pilates_sydney_v1",
              "symbiotic_cocktail_bar_sydney_v1",
              "symbiotic_discount_pharmacy_sydney_v1",
              "symbiotic_fine_dining_sydney_v1",
              "symbiotic_gourmet_grocer_sydney_v1",
              "symbiotic_japanese_restaurant_v1",
              "symbiotic_k12_tutoring_sydney_v1",
              "symbiotic_mass_burger_sydney_v1",
              "symbiotic_outdoor_cycling_sydney_v1",
              "symbiotic_premium_bakery_sydney_v1",
              "symbiotic_premium_childcare_sydney_v1",
              "symbiotic_retail_bank_sydney_v1",
              "general_medical_ecosystem",
              "symbiotic_specialty_coffee_sydney_v1"
            ],
            "type": "string",
            "description": "Required for operation=score; absent for profile and resume. general_medical_ecosystem compares existing medical services, not specialist demand. Outdoor/cycling returns profiles without scores or ranks. allied_health_clinic applies dental avoidance. Historical sydney IDs do not limit geography. Single-anchor scenarios are review cues, not proven demand."
          },
          "location_text": {
            "title": "Type a place / address / postcode — leave City reference empty",
            "maxLength": 240,
            "type": "string",
            "description": "Australian address, suburb or postcode, such as Chatswood NSW 2067. Mutually exclusive with location_id, coordinates, h3_cells and advanced scope. Resolves to one point with a resolution-9 k=3 query (up to 37 cells, approximately 3.9 km2), not the whole suburb or postcode. Ambiguous matches return OUTPUT.location_candidates. Unmatched text uses Photon/OpenStreetMap geocoding."
          },
          "location_id": {
            "title": "City reference point — choose this OR type above",
            "enum": [
              "sydney-cbd-nsw",
              "chatswood-nsw",
              "parramatta-nsw",
              "surry-hills-nsw",
              "bondi-junction-nsw",
              "north-sydney-nsw",
              "melbourne-cbd-vic",
              "brisbane-cbd-qld",
              "adelaide-sa",
              "perth-wa",
              "canberra-act",
              "hobart-tas",
              "darwin-nt",
              "gold-coast-qld",
              "newcastle-nsw",
              "wollongong-nsw",
              "geelong-vic",
              "maroochydore-qld",
              "cairns-qld",
              "townsville-qld",
              "toowoomba-qld",
              "ballarat-vic",
              "bendigo-vic",
              "albury-nsw",
              "launceston-tas"
            ],
            "type": "string",
            "description": "Ready-made Australian reference point. Mutually exclusive with location_text and other location methods. This selects the point queried; it does not restrict a separate text search to a city."
          },
          "latitude": {
            "title": "Latitude",
            "minimum": -90,
            "maximum": 90,
            "type": "number",
            "description": "WGS84 latitude in decimal degrees, from -90 to 90. Requires longitude. The coordinate pair is mutually exclusive with text, city reference, H3 IDs and advanced scope."
          },
          "longitude": {
            "title": "Longitude",
            "minimum": -180,
            "maximum": 180,
            "type": "number",
            "description": "WGS84 longitude in decimal degrees, from -180 to 180. Requires latitude."
          },
          "h3_cells": {
            "title": "H3 cell IDs",
            "maxLength": 2048,
            "type": "string",
            "description": "Supply the resolution-9 H3 IDs in one complete k=3 window, up to 37, separated by commas, spaces or newlines. Mutually exclusive with other location methods."
          },
          "field_set": {
            "title": "Complete result profile",
            "pattern": "^(profile_complete|profile_basic|commercial_context|audience_context)$",
            "type": "string",
            "description": "Leave unset. New queries always deliver profile_complete, which includes basic, commercial and audience data. The previous package names are accepted for compatibility with older create requests. Omit for resume."
          },
          "order_id": {
            "title": "Original order ID — Optional (recovery only)",
            "type": "string",
            "description": "Original order identifier from ORDER_STATE, used with action=resume and dry_run=false. Clear new-query settings when recovering. If OUTPUT specifies resurrect_original_run, recovery continues in that original run."
          },
          "request_key": {
            "title": "Repeat request key — Optional",
            "type": "string",
            "description": "Optional idempotency key for action=create. The same key refers to the same immutable request and original order. Different query settings require a different key."
          },
          "use_advanced_scope": {
            "title": "Use advanced JSON scope — Optional",
            "type": "boolean",
            "description": "false ignores scope_template. true parses scope_template as the location and excludes a separate scope object and ordinary location fields. API requests can supply scope directly with this switch omitted or false.",
            "default": false
          },
          "scope_template": {
            "title": "Advanced scope JSON — Optional multiline example",
            "maxLength": 4096,
            "type": "string",
            "description": "JSON location used when use_advanced_scope=true. Circle format requires type=circle, latitude, longitude and k_ring=3. H3 format requires type=h3 and the cells in one complete resolution-9 k=3 window."
          },
          "dry_run": {
            "title": "Validate only — Optional",
            "type": "boolean",
            "description": "For Create a query, false requests data under Pricing and true checks the input without returning data rows or creating a business query fee. Leave it off for Demo or Recover. Valid completed empty queries are billable. Platform run costs may apply.",
            "default": false
          },
          "limit": {
            "title": "🔢 Maximum result rows",
            "minimum": 1,
            "maximum": 37,
            "type": "integer",
            "description": "Optional score-only row limit, 1 to 37. Leave unset or use 37 for a complete profile. The geographic scan covers the full window. Omit for resume."
          },
          "workflow": {
            "title": "Workflow",
            "enum": [
              "single",
              "area"
            ],
            "type": "string",
            "description": "single uses one local Res9/k3 window. area creates or recovers a durable area plan with separate serial child orders and unified results; the parent has no business query event.",
            "default": "single"
          },
          "area_names": {
            "title": "Optional area names — suburb and state",
            "type": "string",
            "description": "Semicolon or newline-separated exact area names, e.g. Chatswood NSW; Parramatta NSW. Nonempty names activate the area workflow. Each window includes one complete profile. A selected industry preset adds a scoring task. Names override advanced quote JSON. Recovery actions use area_request. At most 8 areas."
          },
          "area_action": {
            "title": "Area action — ONLY for Whole area",
            "enum": [
              "quote",
              "execute",
              "resume",
              "status",
              "cancel",
              "delivery"
            ],
            "type": "string",
            "description": "quote resolves boundaries and checks target membership in complete atomic windows without business events. execute requires exact plan/quote hashes, revision, buyer_consent=true and execute_children=true. resume preserves original children. cancel retains unknown-payment reservations; delivery recovers paid results.",
            "default": "quote"
          },
          "area_business_cap_usd": {
            "title": "Area plan business-fee cap (USD)",
            "type": "string",
            "description": "Maximum business-event spending for this plan as a USD decimal string. An upper limit, not the quoted price or total platform usage cap.",
            "default": "24.00"
          },
          "area_buyer_budget_usd": {
            "title": "Shared buyer area budget (USD)",
            "type": "string",
            "description": "Shared business-event cap across this buyer’s area plans in the quote’s UTC-day scope. The first authorized cap is fixed; other plans cannot raise it. Ordinary single queries are outside this budget.",
            "default": "50.00"
          },
          "area_max_atomic_runs": {
            "title": "Maximum child queries",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "Planning limit for child queries. One child combines all three profile groups in a window. A selected industry preset adds one score child per window. An over-limit request is rejected before execution.",
            "default": 24
          },
          "area_allow_partial": {
            "title": "Allow disclosed partial-area plan",
            "type": "boolean",
            "description": "false rejects unsupported target tasks before execution. true quotes supported tasks and discloses missing targets; it never invents data or derives total population from score rows.",
            "default": false
          },
          "area_request": {
            "title": "❗ Advanced area JSON — required ONLY without names or for recovery",
            "type": "object",
            "description": "For quote: areas, optional field_sets (omit or use [profile_complete]), optional preset_id, max_atomic_runs<=60, business_cap_usd and buyer_budget_usd as decimal strings, allow_partial, idempotency_key. Each area has area_id plus name/state, Polygon/MultiPolygon geometry, or Res9 cells. Names resolve exact ABS SAL 2021 statistical boundaries. Other actions use the returned plan_id/hashes/revision. Max 8 areas, 1024 target cells, 32 KiB input."
          },
          "area_task": {
            "title": "Internal child-plan binding",
            "type": "object",
            "description": "Backend-generated child context. Do not set for ordinary queries. Every use is checked against authenticated buyer, frozen plan, task, scope, price, build and dispatch fence."
          },
          "hard_filters": {
            "title": "🔍 Minimum / maximum filters",
            "type": "object",
            "description": "Optional score-only filters on allowlisted fields using min_ or max_ keys, for example min_sa2_university_degree_share: 0.30. Share values are fractions from 0 to 1. Omit for a complete profile and for resume."
          },
          "base_weights": {
            "title": "⚖️ Legacy weights — leave empty for new queries",
            "type": "object",
            "description": "Legacy linear-scoring override retained for compatibility documentation. New scenario queries reject nonempty base_weights; scenario weights and references are fixed by the versioned preset. Recover old orders with action=resume rather than resubmitting overrides."
          },
          "product_mode": {
            "title": "Product mode",
            "pattern": "^daas$",
            "type": "string",
            "description": "Fixed value daas.",
            "default": "daas"
          },
          "scope": {
            "title": "🧩 Advanced scope — JSON/API compatibility",
            "type": "object",
            "description": "API geography object: type=circle with coordinates and k_ring=3, or type=h3 with all cells of one resolution-9 k=3 window. Mutually exclusive with ordinary location methods. Supplied directly with use_advanced_scope omitted or false. true selects scope_template."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}