{
  "openapi": "3.0.1",
  "info": {
    "title": "Martindale.com Lawyer Directory Scraper",
    "description": "Scrape US attorneys from Martindale.com — name, phone, full address with city/state/zip, firm website, headshot, and Martindale profile URL. 30 attorneys per listing page (no detail-page fetches needed). JSON/CSV out, billed per result.",
    "version": "0.1",
    "x-build-id": "B5IOxmXhVEuLJTc4a"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/memo23~martindale-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-memo23-martindale-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/memo23~martindale-scraper/runs": {
      "post": {
        "operationId": "runs-sync-memo23-martindale-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/memo23~martindale-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-memo23-martindale-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": {
          "startUrls": {
            "title": "Martindale URLs",
            "type": "array",
            "description": "Paste any martindale.com URL — listing pages (`/{practice-area}-lawyers/{city}/{state}/`, `/areas-of-law/{practice-area}-lawyers/{state}`) and direct attorney URLs are auto-classified. Takes precedence over the dropdown filters below — clear this list to use the dropdowns. Pagination via `?page=N` is followed automatically when you paste a base URL.",
            "items": {
              "type": "string"
            }
          },
          "searchByCategory": {
            "title": "Practice areas",
            "uniqueItems": true,
            "type": "array",
            "description": "Select one or more practice areas. Combined with U.S. states + optional cities below as a cartesian product. Either form is accepted (`personal-injury` or `personal-injury-lawyers`) — the trailing `-lawyers` is added automatically.",
            "items": {
              "type": "string",
              "enum": [
                "personal-injury-lawyers",
                "family-lawyers",
                "divorce-lawyers",
                "criminal-defense-lawyers",
                "dui-lawyers",
                "immigration-lawyers",
                "bankruptcy-lawyers",
                "estate-planning-lawyers",
                "real-estate-lawyers",
                "business-lawyers",
                "employment-lawyers",
                "workers-compensation-lawyers",
                "medical-malpractice-lawyers",
                "car-accident-lawyers",
                "tax-lawyers",
                "intellectual-property-lawyers",
                "social-security-disability-lawyers",
                "wrongful-death-lawyers",
                "trusts-estates-lawyers",
                "wills-lawyers"
              ],
              "enumTitles": [
                "Personal Injury",
                "Family Law",
                "Divorce",
                "Criminal Defense",
                "DUI / DWI",
                "Immigration",
                "Bankruptcy",
                "Estate Planning",
                "Real Estate",
                "Business / Corporate",
                "Employment",
                "Workers Compensation",
                "Medical Malpractice",
                "Car Accidents",
                "Tax Law",
                "Intellectual Property",
                "Social Security Disability",
                "Wrongful Death",
                "Trusts & Estates",
                "Wills"
              ]
            }
          },
          "searchByLocation": {
            "title": "U.S. states",
            "uniqueItems": true,
            "type": "array",
            "description": "Select one or more US states (full state-name slugs). Empty = state-wide listings (one per practice area, very large response — typically 5MB+ per state).",
            "items": {
              "type": "string",
              "enum": [
                "alabama",
                "alaska",
                "arizona",
                "arkansas",
                "california",
                "colorado",
                "connecticut",
                "delaware",
                "district-of-columbia",
                "florida",
                "georgia",
                "hawaii",
                "idaho",
                "illinois",
                "indiana",
                "iowa",
                "kansas",
                "kentucky",
                "louisiana",
                "maine",
                "maryland",
                "massachusetts",
                "michigan",
                "minnesota",
                "mississippi",
                "missouri",
                "montana",
                "nebraska",
                "nevada",
                "new-hampshire",
                "new-jersey",
                "new-mexico",
                "new-york",
                "north-carolina",
                "north-dakota",
                "ohio",
                "oklahoma",
                "oregon",
                "pennsylvania",
                "rhode-island",
                "south-carolina",
                "south-dakota",
                "tennessee",
                "texas",
                "utah",
                "vermont",
                "virginia",
                "washington",
                "west-virginia",
                "wisconsin",
                "wyoming"
              ],
              "enumTitles": [
                "Alabama",
                "Alaska",
                "Arizona",
                "Arkansas",
                "California",
                "Colorado",
                "Connecticut",
                "Delaware",
                "Dist. of Columbia",
                "Florida",
                "Georgia",
                "Hawaii",
                "Idaho",
                "Illinois",
                "Indiana",
                "Iowa",
                "Kansas",
                "Kentucky",
                "Louisiana",
                "Maine",
                "Maryland",
                "Massachusetts",
                "Michigan",
                "Minnesota",
                "Mississippi",
                "Missouri",
                "Montana",
                "Nebraska",
                "Nevada",
                "New Hampshire",
                "New Jersey",
                "New Mexico",
                "New York",
                "North Carolina",
                "North Dakota",
                "Ohio",
                "Oklahoma",
                "Oregon",
                "Pennsylvania",
                "Rhode Island",
                "South Carolina",
                "South Dakota",
                "Tennessee",
                "Texas",
                "Utah",
                "Vermont",
                "Virginia",
                "Washington",
                "West Virginia",
                "Wisconsin",
                "Wyoming"
              ]
            }
          },
          "searchByCity": {
            "title": "Cities (optional)",
            "type": "array",
            "description": "Optional city slugs (e.g. `dallas`, `austin`, `san-antonio`). When set, narrows to `/{practice-area}-lawyers/{city}/{state}/`. Cities must be valid for the chosen state(s); Martindale uses lowercase-hyphenated city names.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "type": "integer",
            "description": "Hard cap on the number of attorney rows collected across all listings. Each listing page yields ~30 attorneys; pagination auto-walks until this cap is hit or the source runs out of pages.",
            "default": 5000
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of pages processed in parallel.",
            "default": 5
          },
          "minConcurrency": {
            "title": "Min concurrency",
            "minimum": 1,
            "type": "integer",
            "description": "Minimum number of pages processed in parallel.",
            "default": 1
          },
          "maxRequestRetries": {
            "title": "Max request retries",
            "minimum": 0,
            "type": "integer",
            "description": "Number of retries before a failed request is given up.",
            "default": 5
          },
          "proxy": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify proxy settings. Martindale serves Cloudflare on every page — only the curl-impersonate Chrome 131 stack reliably passes the challenge. A US residential pool is strongly recommended.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}