{
  "openapi": "3.0.1",
  "info": {
    "title": "NoCowboys NZ Tradies Scraper — Phones, Websites & Ratings",
    "description": "New Zealand trade businesses from nocowboys.co.nz: each business's own landline and mobile (E.164), website, address, categories, areas served, approval rating, rating count, licensing-board badges (LBP, EWRB, PGDB) and map pin. Filter by category + region. $4 per 1,000 businesses.",
    "version": "0.1",
    "x-build-id": "aDB4hzdR5tMqj5XZl"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapersdelight~nocowboys-nz-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapersdelight-nocowboys-nz-scraper",
        "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/scrapersdelight~nocowboys-nz-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapersdelight-nocowboys-nz-scraper",
        "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/scrapersdelight~nocowboys-nz-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapersdelight-nocowboys-nz-scraper",
        "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",
        "properties": {
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "NoCowboys category slugs, as in nocowboys.co.nz/search/<location>/<category>: plumbers-plumbing-contractors, electricians-electrical-contractors, builders, roofing-contractors, painters-painting-contractors, drainlayers, landscaping-services, tilers-tile-contractors, heat-pump, … (229 in total), or all-categories. Names are normalised (\"Plumbers / Plumbing Contractors\" → plumbers-plumbing-contractors). Each category is searched once per location.",
            "default": [
              "plumbers-plumbing-contractors"
            ],
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "new-zealand, a region (auckland, wellington, canterbury, waikato-king-country, bay-of-plenty, otago, hawkes-bay, manawatu, northland, nelson-bays, southland, taranaki, gisborne, thames-coromandel, wairarapa, wanganui, marlborough, west-coast) or a town/suburb slug (paraparaumu, hamilton, tauranga, …). A business listed in several searches is delivered and charged once.",
            "default": [
              "wellington"
            ],
            "items": {
              "type": "string"
            }
          },
          "includeUnregistered": {
            "title": "Include unregistered businesses",
            "type": "boolean",
            "description": "On (default) = every business customers have rated, as the site's own \"Show unregistered businesses\" option (plumbers NZ-wide: 1,046 instead of 117). Unregistered businesses still publish their phone number (measured 97% fill) but have no website link, contact name or map pin on the page. Off = registered (paying) businesses only.",
            "default": true
          },
          "allBusinesses": {
            "title": "Whole directory (ignores categories and locations)",
            "type": "boolean",
            "description": "Every business on NoCowboys: all-categories for all of New Zealand, split region by region past the site's 7,000-result search limit, plus the businesses listed only in the site's sitemap (filed under no region). About 18,000 businesses. Set Max businesses to 0 for no limit.",
            "default": false
          },
          "businessUrls": {
            "title": "Business profile URLs (optional)",
            "type": "array",
            "description": "Specific profiles to fetch, e.g. https://www.nocowboys.co.nz/businesses/peter-jackson-plumbing or just peter-jackson-plumbing. When given, only these are fetched and the search fields above are ignored.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "requirePhone": {
            "title": "Only businesses with a phone number",
            "type": "boolean",
            "description": "Skip businesses whose page publishes no phone. Skipped businesses are never charged.",
            "default": false
          },
          "minRatingCount": {
            "title": "Minimum number of ratings",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only businesses with at least this many NoCowboys authenticated ratings. Applied to the search result before the profile is opened. Skipped businesses are never charged.",
            "default": 0
          },
          "minApprovalPercent": {
            "title": "Minimum approval %",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Keep only businesses whose NoCowboys approval rating is at least this (0-100). Businesses with no ratings have no approval and are skipped when this is above 0. Skipped businesses are never charged.",
            "default": 0
          },
          "includeReviews": {
            "title": "Include recent reviews",
            "type": "boolean",
            "description": "Adds recentReviews: date, approval %, reviewer first name and text of the business's most recent ratings, newest first (the page's structured data carries up to 80). Same price per business.",
            "default": false
          },
          "maxReviewsPerBusiness": {
            "title": "Reviews per business",
            "minimum": 1,
            "maximum": 80,
            "type": "integer",
            "description": "How many recent reviews to include per business when reviews are on (1-80).",
            "default": 10
          },
          "maxResults": {
            "title": "Max businesses",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after delivering this many businesses (cost guard). Set 0 for no limit — every business in every search.",
            "default": 75
          },
          "maxPagesPerSearch": {
            "title": "Max listing pages per search",
            "minimum": 0,
            "type": "integer",
            "description": "Limit how deep each search goes (100 businesses per page). 0 = every page the site serves.",
            "default": 0
          },
          "concurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many pages are fetched at once. The default is gentle on the site and fast enough for thousands of businesses.",
            "default": 4
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Hard deadline for a single page request; a slow request is retried.",
            "default": 30
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Not needed: nocowboys.co.nz answers Apify's servers directly (measured 2026-09-23). If you ever see blocks, choose Apify Proxy with the RESIDENTIAL group.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}