{
  "openapi": "3.0.1",
  "info": {
    "title": "Justia Lawyer Directory Scraper — Attorney Leads",
    "description": "Extract attorney profiles from the Justia Lawyer Directory with practice areas, contact info, bar admissions, education, ratings & reviews. Filter by practice area and location, or supply direct URLs. Export to CSV/JSON, run via API, schedule and monitor runs, or integrate with other tools.",
    "version": "1.0",
    "x-build-id": "kQWydO7RTGz6K5Xpb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/muhammadafzal~justia-lawyer-directory-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-muhammadafzal-justia-lawyer-directory-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/muhammadafzal~justia-lawyer-directory-scraper/runs": {
      "post": {
        "operationId": "runs-sync-muhammadafzal-justia-lawyer-directory-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/muhammadafzal~justia-lawyer-directory-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-muhammadafzal-justia-lawyer-directory-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": "Start URLs",
            "type": "array",
            "description": "Use this field when the user provides specific Justia lawyer listing or profile URLs. Each URL must contain 'justia.com/lawyers'. Accepted formats include practice-area pages (justia.com/lawyers/family-law), location pages (justia.com/lawyers/california/los-angeles), combined (justia.com/lawyers/family-law/california/los-angeles), county pages (justia.com/lawyers/california/los-angeles-county), or individual lawyer profile pages. Do NOT use this when the user describes a practice area or location in words — use practiceArea and location instead. Example: [{\"url\":\"https://www.justia.com/lawyers/family-law/california/los-angeles\"}]",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "title": "URL",
                  "type": "string",
                  "description": "A fully-qualified Justia lawyer directory URL. Example: https://www.justia.com/lawyers/california/los-angeles"
                }
              },
              "required": [
                "url"
              ]
            },
            "default": []
          },
          "practiceArea": {
            "title": "Practice Area",
            "enum": [
              "personal-injury",
              "medical-malpractice",
              "criminal-law",
              "dui",
              "family-law",
              "divorce",
              "bankruptcy",
              "business-law",
              "consumer-law",
              "employment-law",
              "estate-planning",
              "foreclosure-defense",
              "immigration-law",
              "intellectual-property",
              "nursing-home-abuse",
              "probate",
              "products-liability",
              "real-estate-law",
              "tax-law",
              "traffic-tickets",
              "workers-compensation",
              "legal-malpractice"
            ],
            "type": "string",
            "description": "Use this field when the user describes a legal practice area in words. Justia uses kebab-case slugs (lowercase, hyphen-separated). Common values: personal-injury, medical-malpractice, criminal-law, dui, family-law, divorce, bankruptcy, business-law, consumer-law, employment-law, estate-planning, foreclosure-defense, immigration-law, intellectual-property, nursing-home-abuse, probate, products-liability, real-estate-law, tax-law, traffic-tickets, workers-compensation, legal-malpractice. Pair with location for geo-filtered results. Do NOT use this when the user provides a direct Justia URL — use startUrls instead. Example: family-law",
            "default": "family-law"
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "Use this field when the user describes a geographic area. Format is lowercase state/city or state/county slug using hyphens for spaces. Examples: 'california/los-angeles', 'california/los-angeles-county', 'new-york', 'illinois/chicago', 'texas/houston'. Pair with practiceArea to filter by both. Do NOT use this when the user provides a direct Justia URL — use startUrls instead. Example: california/los-angeles",
            "default": "california/los-angeles"
          },
          "maxResults": {
            "title": "Max Results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of lawyer records to extract before stopping. Caps both listing pages and profile enrichments. Defaults to 50. Increase for bulk extraction jobs; decrease for quick tests. Example: 100",
            "default": 50
          },
          "scrapeProfileDetails": {
            "title": "Scrape Profile Details",
            "type": "boolean",
            "description": "When true (default), the actor visits each lawyer's profile page to enrich the record with bar admissions, law school, and any contact info not present on the listing page. When false, only listing-page fields are returned — roughly 10x faster but may miss education, bar admissions, and some emails/phones. Use false for high-volume discovery, true for complete lead records. Example: true",
            "default": true
          },
          "customProxyUrl": {
            "title": "Custom Proxy URL",
            "type": "string",
            "description": "Optional premium residential proxy URL (e.g., http://user:pass@provider.decodo.com:8000). Justia blocks datacenter IPs aggressively on some endpoints; providing a premium residential proxy (Decodo, Bright Data, IPRoyal) dramatically improves reliability. Leave empty to use Apify's default proxy rotation. Example: http://user:pass@proxy.decodo.com:8000",
            "default": ""
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}