{
  "openapi": "3.0.1",
  "info": {
    "title": "Avvo Scraper - US Attorney Directory & Lawyer Leads",
    "description": "Scrape Avvo lawyer profiles: Avvo Rating, client reviews, peer endorsements, bar admissions, practice areas, awards, disciplinary status, firm website & phone. Optional email enrichment & lead score. Search by practice area, city or URL. Export JSON, CSV, Excel.",
    "version": "0.1",
    "x-build-id": "rBcoGlqsZOgw1DxY0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapesage~avvo-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapesage-avvo-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/scrapesage~avvo-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapesage-avvo-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/scrapesage~avvo-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapesage-avvo-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": {
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "Where to search. Use <code>City, ST</code> (<code>Austin, TX</code>, <code>New York, NY</code>, <code>Los Angeles, CA</code>), the raw <code>st/city</code> slug (<code>tx/austin</code>), or a whole state (<code>Texas</code>, <code>CA</code>). Each location is combined with every practice area below.",
            "items": {
              "type": "string"
            }
          },
          "practiceAreas": {
            "title": "Practice areas",
            "type": "array",
            "description": "Practice areas to scrape, combined with every location. Use a friendly term (<code>divorce</code>, <code>personal injury</code>, <code>criminal defense</code>) or the exact Avvo slug (<code>divorce-lawyer</code>, <code>personal-injury-lawyer</code>, <code>dui-lawyer</code>, <code>estate-planning-lawyer</code>, <code>bankruptcy-lawyer</code>, <code>employment-lawyer</code>, <code>immigration-lawyer</code>, <code>business-lawyer</code>, <code>real-estate-lawyer</code>, <code>tax-lawyer</code>, <code>medical-malpractice-lawyer</code>, <code>workers-compensation-lawyer</code>). Leave empty or use <code>all-lawyers</code> for every attorney in each location.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Direct Avvo URLs: attorney profiles (<code>https://www.avvo.com/attorneys/78731-tx-robert-frazer-1900396.html</code>) or directory listings (<code>https://www.avvo.com/divorce-lawyer/tx/austin.html</code>). Used in addition to the locations above.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxResults": {
            "title": "Max attorneys",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of attorney records to scrape across all locations and practice areas.",
            "default": 100
          },
          "includeProfileDetails": {
            "title": "Include full profile details",
            "type": "boolean",
            "description": "Fetch each attorney's profile page for the full record: bio, Avvo Rating, client reviews, peer endorsements, bar admissions + admission date, practice areas, awards, disciplinary status, firm website & socials, languages and payment info. Turn off for a faster, lighter run that returns only the listing-level fields (name, firm, address, phone, schools).",
            "default": true
          },
          "enrichEmails": {
            "title": "Enrich emails from the firm website",
            "type": "boolean",
            "description": "For each attorney that has a firm website, crawl it (home + contact/about, up to 3 pages) to extract contact emails, phone numbers and extra social links. Avvo itself never exposes emails — this is the only way to get them. Requires profile details.",
            "default": false
          },
          "minAvvoRating": {
            "title": "Minimum Avvo Rating (1–10)",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Only keep attorneys whose numeric Avvo Rating is at least this value (e.g. 8 for Excellent+). 0 = no minimum. Requires profile details.",
            "default": 0
          },
          "minReviews": {
            "title": "Minimum client reviews",
            "minimum": 0,
            "type": "integer",
            "description": "Only keep attorneys with at least this many client reviews. 0 = no minimum. Requires profile details.",
            "default": 0
          },
          "withPhoneOnly": {
            "title": "Only attorneys with a phone number",
            "type": "boolean",
            "description": "Skip attorneys that have no phone number.",
            "default": false
          },
          "withWebsiteOnly": {
            "title": "Only attorneys with a firm website",
            "type": "boolean",
            "description": "Skip attorneys that have no firm website. Requires profile details.",
            "default": false
          },
          "monitorMode": {
            "title": "Monitor mode (only new attorneys)",
            "type": "boolean",
            "description": "Remember attorney IDs returned in previous runs (in a named key-value store) and emit only NEW attorneys on each run. Perfect with Apify Schedules for a steady new-lead feed — it does not conflict with scheduling: the schedule triggers the run, monitor mode deduplicates this run's records against everything earlier runs already returned.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Monitor store name",
            "type": "string",
            "description": "Name of the key-value store that holds the seen-attorney memory for monitor mode. Use different names to track independent searches separately (lowercase letters, digits and hyphens only).",
            "default": "avvo-monitor"
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many profile pages to fetch in parallel. 5 is a safe default for residential proxies.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxies to use. A RESIDENTIAL US proxy is REQUIRED — Avvo blocks datacenter and direct requests but serves clean pages to residential US IPs.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}