{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Local Services Ads Scraper: Home Service Leads & Rank",
    "description": "Find the home service advertisers Google Local Services shows for any trade and city. Get rank, phone, rating, review breakdown, years in business and weekly hours, search many cities in one run with no per-city fee, and track new and removed advertisers on a schedule.",
    "version": "0.1",
    "x-build-id": "bYTN152FAVdmnefCb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/getascraper~google-local-services-ads-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-getascraper-google-local-services-ads-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/getascraper~google-local-services-ads-scraper/runs": {
      "post": {
        "operationId": "runs-sync-getascraper-google-local-services-ads-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/getascraper~google-local-services-ads-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-getascraper-google-local-services-ads-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": {
          "services": {
            "title": "Services",
            "type": "array",
            "description": "Trade or service to look up, one per row, as a customer would type it (for example Plumber, Electrician, HVAC). Every service is searched in every location below, with no per-location fee. Google only lists advertisers for home and local services it runs this program for.",
            "default": [
              "Plumber"
            ],
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "Places to search, one per row: City, ST for the United States and Canada (Austin, TX or Toronto, ON), just the city for the United Kingdom (London), or a ZIP or postal code. Each place is searched for every service above. To see more of a crowded metro than the roughly 20 advertisers Google shows per search, add neighbouring cities or ZIP codes: the results are merged without duplicates.",
            "default": [
              "Austin, TX"
            ],
            "items": {
              "type": "string"
            }
          },
          "country": {
            "title": "Country",
            "enum": [
              "US",
              "GB",
              "CA"
            ],
            "type": "string",
            "description": "Market to search. Choose United Kingdom or Canada only for cities in those countries; searches outside the United States use a residential connection in the same country, which Google requires for local results there.",
            "default": "US"
          },
          "strictLocation": {
            "title": "Strict location check",
            "type": "boolean",
            "description": "When Google does not recognise a place it quietly shows advertisers for another area. With this on, such a search is reported and not saved. Turn it off to keep results even when the advertisers serve a neighbouring or differently named area (for example a borough shown under the main city).",
            "default": true
          },
          "minRating": {
            "title": "Minimum rating",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Keep only advertisers rated at least this many stars. Advertisers with no rating yet are left out when this is above 0. Filtered advertisers are never saved, so they cost nothing.",
            "default": 0
          },
          "minReviews": {
            "title": "Minimum reviews",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Keep only advertisers with at least this many Google reviews. Useful to focus on established companies.",
            "default": 0
          },
          "minYearsInBusiness": {
            "title": "Minimum years in business",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Keep only advertisers that show at least this many years in business. Advertisers that do not show a number are left out when this is above 0.",
            "default": 0
          },
          "requirePhone": {
            "title": "Only advertisers with a phone number",
            "type": "boolean",
            "description": "Skip advertisers that list no phone number. The number is Google's call-forwarding number for the ad, not always the company's own line.",
            "default": false
          },
          "openNowOnly": {
            "title": "Only advertisers open right now",
            "type": "boolean",
            "description": "Keep only advertisers shown as open at the moment the search is read.",
            "default": false
          },
          "includeProfile": {
            "title": "Add profile details",
            "type": "boolean",
            "description": "Open each advertiser's Google profile to add the verified label when shown, services offered, service-area counties, review topics, a few recent reviews and the Google place identifiers. This is a paid add-on: each advertiser whose profile is read is billed separately, on top of the normal result. Profiles that cannot be read are never billed. Runs take longer. Reviewer names and ids are public Google review data.",
            "default": false
          },
          "includeActionLinks": {
            "title": "Include booking and message links",
            "type": "boolean",
            "description": "Add the Google booking and messaging links when an advertiser offers them. These links belong to the paid ad, so opening them can count as an ad interaction for the advertiser; leave this off unless you need them.",
            "default": false
          },
          "monitorMode": {
            "title": "Change tracking",
            "enum": [
              "off",
              "changes",
              "all"
            ],
            "type": "string",
            "description": "For scheduled runs. 'Changes only' saves new, updated, reopened and removed advertisers per service and city and skips unchanged ones. 'All with status' saves every advertiser with its change status. The first run saves everything as new.",
            "default": "off"
          },
          "monitorScope": {
            "title": "Watchlist name",
            "type": "string",
            "description": "Names the saved watchlist so different customers or schedules stay separate. Keep it the same for every run of one schedule.",
            "default": "default"
          },
          "removedAfterMisses": {
            "title": "Removed after missed runs",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many complete runs in a row an advertiser must be missing before it is reported as removed. Raise it for crowded cities where the 20 shown advertisers rotate a lot.",
            "default": 3
          },
          "resetMonitor": {
            "title": "Start the watchlist over",
            "type": "boolean",
            "description": "Ignore the saved state for this run and treat everything as new, then save it as the new baseline. Switch it off again afterwards.",
            "default": false
          },
          "maxResults": {
            "title": "Maximum advertisers",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Most advertisers saved in the whole run, counted after filters. Start small to check your searches, then raise it for a full sweep. Google shows about 20 advertisers per search at a time.",
            "default": 20
          },
          "passes": {
            "title": "Passes per search",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Looks at each search this many times with slightly different wording and merges the results. In testing, repeat looks returned almost the same advertisers, so for a bigger picture of a metro prefer adding neighbouring cities or ZIP codes as locations and use change tracking over several days. Each row reports how many passes it appeared in. Passes stop early when Google has nothing more to show.",
            "default": 1
          },
          "uniqueOnly": {
            "title": "One row per advertiser",
            "type": "boolean",
            "description": "Save each advertiser once even if it appears in several searches, with the list of searches, ranks and passes it appeared in. Switch off to get one row per search. Change tracking always reports per search.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Leave the default. United States searches start with a direct connection and move to a proxy only if Google refuses a request. Searches in other countries use a residential connection in that country automatically. Choose proxy groups or your own proxies to force a specific setup.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}