{
  "openapi": "3.0.1",
  "info": {
    "title": "Home Services / Contractor Leads",
    "description": "Niche and area lead list from Google Maps, with website email, quality, and intent score. Accepted matches only. Does not call the Places API.",
    "version": "0.1",
    "x-build-id": "AKOaf851g5yoLuGk8"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/staticxviper~home-services/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-staticxviper-home-services",
        "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/staticxviper~home-services/runs": {
      "post": {
        "operationId": "runs-sync-staticxviper-home-services",
        "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/staticxviper~home-services/run-sync": {
      "post": {
        "operationId": "run-sync-staticxviper-home-services",
        "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": [
          "niche"
        ],
        "properties": {
          "niche": {
            "title": "Niche",
            "enum": [
              "mobile_notaries",
              "professional_organizers",
              "specialty_dog_trainers",
              "premium_mobile_auto_detailers",
              "estate_sale_companies",
              "court_medical_interpreters",
              "birth_postpartum_doulas",
              "private_speech_language_pathologists",
              "pediatric_occupational_therapists",
              "geriatric_care_managers",
              "funeral_celebrants",
              "specialized_wedding_officiants",
              "pet_funeral_aftercare",
              "equine_bodyworkers",
              "pool_specialists",
              "premium_appliance_repair",
              "commercial_hood_cleaning",
              "radon_mold_specialists",
              "septic_well_drainage",
              "specialty_music_teachers"
            ],
            "type": "string",
            "description": "Preset id from scripts/lead_automation/niches.json.",
            "default": "pool_specialists"
          },
          "area": {
            "title": "Area",
            "type": "string",
            "description": "Region name from geo_regions.json, or City, ST. A county uses the form Monroe County, NY."
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "Optional city. Overrides the city parsed from area."
          },
          "county": {
            "title": "County",
            "type": "string",
            "description": "Optional county. Do not include the word County. Overrides the county parsed from area."
          },
          "state": {
            "title": "State",
            "type": "string",
            "description": "Optional two-letter state. Overrides the state parsed from area."
          },
          "mapsDataset": {
            "title": "Maps dataset",
            "type": "array",
            "description": "Upstream Maps rows. When set, the Actor scores these listings and does not open Google Maps."
          },
          "maxItems": {
            "title": "Max accepted leads",
            "minimum": 1,
            "maximum": 25,
            "type": "integer",
            "description": "Stop after this many accepted matches. Default 10, maximum 25.",
            "default": 10
          },
          "maxSearches": {
            "title": "Max Maps searches",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Keyword and place searches when mapsDataset is omitted. Default 5, maximum 20.",
            "default": 5
          },
          "maxResults": {
            "title": "Max results per search",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Listings opened per Maps search. Default 5, maximum 10.",
            "default": 5
          },
          "minConfidence": {
            "title": "Minimum confidence",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Issue #127 score required for an accepted place. Default 80.",
            "default": 80
          },
          "lowConfidenceFloor": {
            "title": "Low-confidence floor",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Scores at or above this floor and below the minimum are rejected and not billed. Default 60.",
            "default": 60
          },
          "includeEmail": {
            "title": "Find website email",
            "type": "boolean",
            "description": "Read emails from the business website after robots.txt allows it. Billed only when a validated address is found.",
            "default": true
          },
          "includeWebsiteQuality": {
            "title": "Score website quality",
            "type": "boolean",
            "description": "Fetch the business website after robots.txt allows it and record website_quality. Higher means a weaker site.",
            "default": true
          },
          "includeScore": {
            "title": "Score the lead",
            "type": "boolean",
            "description": "Write lead_score and intent signals. Billed only when a score is produced.",
            "default": true
          },
          "headless": {
            "title": "Headless browser",
            "type": "boolean",
            "description": "Run Chromium headless. Default true.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}