{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Maps Lawyers Scraper",
    "description": "Find law firms and lawyers on Google Maps by practice area and city: phone, website, rating, hours, e-mails and social links from the firm site, and state bar license check (NY, FL, CA). Goes past Google's 120-result cap in US cities.",
    "version": "0.0",
    "x-build-id": "cIyz7jftWfepFBMpp"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nice_dev~google-maps-lawyers-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nice_dev-google-maps-lawyers-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/nice_dev~google-maps-lawyers-scraper/runs": {
      "post": {
        "operationId": "runs-sync-nice_dev-google-maps-lawyers-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/nice_dev~google-maps-lawyers-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-nice_dev-google-maps-lawyers-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": {
          "practiceAreas": {
            "title": "Practice areas",
            "uniqueItems": true,
            "type": "array",
            "description": "Pick one or more areas of law: each one is searched on Google Maps as `<area> in <location>` (e.g. `divorce lawyer in Austin, TX`). Combined with **Search terms** below; firms found by several searches are saved once.",
            "items": {
              "type": "string",
              "enum": [
                "lawyer",
                "law firm",
                "personal injury lawyer",
                "car accident lawyer",
                "medical malpractice lawyer",
                "wrongful death lawyer",
                "workers compensation lawyer",
                "divorce lawyer",
                "family law attorney",
                "criminal defense attorney",
                "dui lawyer",
                "immigration attorney",
                "estate planning attorney",
                "probate lawyer",
                "elder law attorney",
                "bankruptcy attorney",
                "employment lawyer",
                "real estate attorney",
                "business attorney",
                "tax attorney",
                "intellectual property attorney",
                "civil rights attorney",
                "social security disability lawyer",
                "insurance claim lawyer",
                "landlord tenant lawyer",
                "litigation attorney",
                "traffic ticket lawyer",
                "consumer protection lawyer"
              ],
              "enumTitles": [
                "Lawyer (all)",
                "Law firm",
                "Personal injury",
                "Car / truck accident",
                "Medical malpractice",
                "Wrongful death",
                "Workers' compensation",
                "Divorce",
                "Family law / child custody",
                "Criminal defense",
                "DUI / DWI",
                "Immigration",
                "Estate planning / wills / trusts",
                "Probate",
                "Elder law",
                "Bankruptcy",
                "Employment / labor",
                "Real estate",
                "Business / corporate",
                "Tax",
                "Intellectual property / patents / trademarks",
                "Civil rights",
                "Social Security disability",
                "Insurance claims",
                "Landlord / tenant",
                "Civil litigation",
                "Traffic tickets",
                "Consumer protection / lemon law"
              ]
            },
            "default": []
          },
          "query": {
            "title": "Search term",
            "maxLength": 200,
            "type": "string",
            "description": "Your own Google Maps search, as you would type it (e.g. `employment attorney`, `abogado de inmigración`). The location below is added as `in <location>`; write `{location}` to place it yourself (e.g. `lawyers near {location}`). Empty = only the practice areas above."
          },
          "searchQueries": {
            "title": "More search terms",
            "maxItems": 100,
            "uniqueItems": true,
            "type": "array",
            "description": "Several of your own searches in one run (same rules as **Search term**). Every term and every practice area is searched in every location (max 500 searches per run). 200 characters at most per term.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "location": {
            "title": "Location",
            "maxLength": 200,
            "type": "string",
            "description": "City, state, ZIP code or country, as typed on Google Maps (e.g. `Austin, TX`, `90210`, `Manchester, UK`)."
          },
          "locations": {
            "title": "More locations",
            "maxItems": 100,
            "uniqueItems": true,
            "type": "array",
            "description": "Several locations in one run: every practice area and search term is searched in every location (3 areas × 4 cities = 12 searches, max 500). Added to **Location**. 200 characters at most per location.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Google Maps search URLs",
            "maxItems": 1000,
            "type": "array",
            "description": "Google Maps search URLs (`https://www.google.com/maps/search/...`) or place URLs (`https://www.google.com/maps/place/...`). A search URL copied with the map position (`https://www.google.com/maps/search/divorce+lawyer/@30.2672,-97.7431,12z`) is searched around that point (the @lat,lng,zoom part). When this list is not empty, the search fields above are ignored; filters, caps, enrichments and monitoring still apply. Max 1 000 URLs.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "deepSearch": {
            "title": "Go past Google's 120-results cap (US ZIP codes)",
            "type": "boolean",
            "description": "Google Maps shows at most about 120 places per search. On: a US city is also searched ZIP code by ZIP code (codes around the city center) to find the firms the city-wide search leaves out — several times more firms in a big city. Only US locations; a ZIP code typed as location is searched alone. Stops as soon as **Max law firms** is reached.",
            "default": true
          },
          "maxItems": {
            "title": "Max law firms",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of firms to save for the whole run (after deduplication and filters). 0 = no limit.",
            "default": 100
          },
          "maxItemsPerQuery": {
            "title": "Max firms per search",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Cap for EACH search (practice area or term × location, or search URL), so that the first search cannot use up the whole **Max law firms** budget. 0 = no per-search cap.",
            "default": 0
          },
          "language": {
            "title": "Language",
            "enum": [
              "en",
              "es",
              "fr",
              "de",
              "it",
              "pt",
              "nl",
              "pl"
            ],
            "type": "string",
            "description": "Language of categories, opening hours and feature labels (names and addresses stay as listed).",
            "default": "en"
          },
          "countryCode": {
            "title": "Country of the search",
            "pattern": "^[a-zA-Z]{2}$",
            "maxLength": 2,
            "type": "string",
            "description": "Two-letter country code that Google Maps uses to rank and localize results (e.g. `us`, `gb`, `ca`, `au`). The location decides where Google searches; this only helps it when the place name is ambiguous.",
            "default": "us"
          },
          "enrichEmails": {
            "title": "Find e-mails on the firm's website",
            "type": "boolean",
            "description": "Google Maps shows no e-mail. On: open the firm's own website (home page + contact / about / legal pages linked from it, 3 pages at most) and add the addresses found there to `emails`. Only for firms with a website of their own. Charged as a separate event, only for the firms where at least one e-mail is found.",
            "default": false
          },
          "enrichSocials": {
            "title": "Find social profiles on the firm's website",
            "type": "boolean",
            "description": "On: add the firm's Facebook, Instagram, LinkedIn, X / Twitter, YouTube and TikTok links found on its website (same pages as the e-mail search, no extra page). Charged as a separate event, only for the firms where at least one profile is found.",
            "default": false
          },
          "websiteInsights": {
            "title": "Read the firm's website: practice areas, fees, languages, software",
            "type": "boolean",
            "description": "On: from the same website pages, add the practice areas the firm lists, fee signals (free consultation, contingency / no win no fee, flat fee, payment plans), languages spoken, online booking link, and the legal software seen on the site (Clio, MyCase, LawPay, PracticePanther, Smokeball, Filevine, Lawmatics, Calendly…). Charged as a separate event, only for the firms where something is found.",
            "default": false
          },
          "verifyBarLicense": {
            "title": "Check the attorneys' bar license (NY, FL, CA)",
            "type": "boolean",
            "description": "On: for firms in New York, Florida and California, look the firm up in the official register of its state bar (New York State Unified Court System open data, The Florida Bar, The State Bar of California) and add the attorneys confirmed as the firm's, with their bar number, license status and admission year (`barStatus`, `barAttorneys`). An attorney counts only when his phone number or office address is the firm's. Charged once per firm where at least one attorney is confirmed; firms in other states (`unsupported_state`), firms with no attorney confirmed (`not_found`) and firms whose register could not answer (`unavailable`) are not charged.",
            "default": false
          },
          "includePlaceDetails": {
            "title": "Open each firm's Google Maps page: description and star breakdown",
            "type": "boolean",
            "description": "On: open the firm's own Google Maps page (one more request per firm) and add the description written by the firm (`description`) and the number of reviews per star (`reviewDistribution`).",
            "default": false
          },
          "includeReviews": {
            "title": "Add the firm's latest Google reviews (up to 8)",
            "type": "boolean",
            "description": "On: from the same Google Maps page, add up to 8 reviews per firm (Google's most relevant first): text, stars, date, reviewer, and the firm's reply (`reviews`). Google shows more reviews only to signed-in users.",
            "default": false
          },
          "minRating": {
            "title": "Minimum rating",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Drop the firms rated below this (1 to 5). 0 = no minimum. Firms without any rating are dropped when this is set.",
            "default": 0
          },
          "minReviewCount": {
            "title": "Minimum number of reviews",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Drop the firms with fewer Google reviews than this. A firm that Google rates without giving its number of reviews is kept. 0 = no minimum.",
            "default": 0
          },
          "requirePhone": {
            "title": "With phone only",
            "type": "boolean",
            "description": "Drop the firms without a phone number.",
            "default": false
          },
          "requireWebsite": {
            "title": "With website only",
            "type": "boolean",
            "description": "Drop the firms without a website.",
            "default": false
          },
          "requireEmail": {
            "title": "With e-mail only",
            "type": "boolean",
            "description": "Drop the firms where no e-mail was found on their website (turns **Find e-mails** on: the e-mails of the firms you keep are charged like that option; a firm this drops is not charged).",
            "default": false
          },
          "requireBarMatch": {
            "title": "With a matched bar license only",
            "type": "boolean",
            "description": "Drop the firms where no attorney was confirmed in the state bar register (turns **Check the bar license** on: the attorneys of the firms you keep are charged like that option; a firm this drops is not charged). Firms outside NY, FL and CA, and firms whose register could not answer, are all dropped.",
            "default": false
          },
          "legalOnly": {
            "title": "Law firms and attorneys only",
            "type": "boolean",
            "description": "Google Maps also returns nearby non-legal places (notaries, process servers, mediators, courts…). On: keep only the places whose Google category is a lawyer, attorney or law firm.",
            "default": true
          },
          "skipClosedPlaces": {
            "title": "Skip closed firms",
            "type": "boolean",
            "description": "Drop the places Google marks as permanently closed. A temporary closure is not told apart: those places stay.",
            "default": true
          },
          "sameCityOnly": {
            "title": "In the searched city only",
            "type": "boolean",
            "description": "Google often widens a search to nearby towns. On: drop the firms whose address is not in the searched city (or ZIP code). A place that is no city (a state, a province, a country) filters nothing. Off: keep them, the `searchLocation` field tells which search found each firm.",
            "default": false
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "maxItems": 50,
            "uniqueItems": true,
            "type": "array",
            "description": "Drop the firms whose name or category contains one of these words (case and accents ignored), e.g. `Morgan & Morgan` to leave out a national chain. 100 characters at most per word.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "excludeMapsUrls": {
            "title": "Exclude firms already collected",
            "maxItems": 10000,
            "type": "array",
            "description": "Google Maps URLs, place IDs (`ChIJ…`) or CIDs from an earlier export: these firms are skipped, not saved and not charged. Up to 10 000.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "onlyNew": {
            "title": "Only new firms",
            "type": "boolean",
            "description": "Skip the firms that a previous run (same **Memory key**) already delivered: they are not saved and not charged. First run = everything is new.",
            "default": false
          },
          "stateKey": {
            "title": "Memory key",
            "pattern": "^[a-zA-Z0-9_-]{1,64}$",
            "maxLength": 64,
            "type": "string",
            "description": "Name of the memory used by **Only new firms**. Give each schedule / task its own key (e.g. `miami-pi`) so that they do not share their memory. Letters, digits, `-` and `_`.",
            "default": "default"
          },
          "resetState": {
            "title": "Reset the memory",
            "type": "boolean",
            "description": "Forget everything remembered under this **Memory key** before the run: this run returns (and charges) every firm again. Untick it afterwards.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy or your own proxies. Keep the default: it is included in the price. The Florida bar answers only to US addresses: with your own proxies, use US ones. The residential Apify proxy is not available in this Actor.",
            "default": {
              "useApifyProxy": true
            }
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum number of requests processed in parallel.",
            "default": 8
          },
          "maxRequestsPerMinute": {
            "title": "Max requests per minute",
            "minimum": 10,
            "maximum": 2000,
            "type": "integer",
            "description": "Most requests to Google Maps in any 60 seconds (results pages and place pages). A budget, not an even pace. Lower it if the log shows HTTP 429 / 403. The firm websites (a few at a time) and the bar registers keep their own pace.",
            "default": 120
          },
          "minRequestIntervalMs": {
            "title": "Min delay between requests",
            "minimum": 0,
            "maximum": 60000,
            "type": "integer",
            "description": "Smallest gap between two requests to Google Maps, in milliseconds. Spreads them evenly instead of letting them go out in a burst. 0 = no gap.",
            "default": 0
          },
          "maxRequestRetries": {
            "title": "Max request retries",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Retries per request before it is marked as failed. Behind a proxy, a request turned away is also retried on a new proxy session up to 10 times without using up these retries.",
            "default": 5
          },
          "debugLog": {
            "title": "Debug log",
            "type": "boolean",
            "description": "Include debug messages in the run log.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}