{
  "openapi": "3.0.1",
  "info": {
    "title": "CA State Bar Attorney Search Scraper",
    "description": "Unofficial scraper for public California State Bar attorney profiles; not affiliated with or endorsed by the State Bar of California.",
    "version": "1.0",
    "x-build-id": "FE6M6JWvvKp2yK2fV"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/codingfrontend~ca-state-bar-attorney-search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-codingfrontend-ca-state-bar-attorney-search",
        "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/codingfrontend~ca-state-bar-attorney-search/runs": {
      "post": {
        "operationId": "runs-sync-codingfrontend-ca-state-bar-attorney-search",
        "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/codingfrontend~ca-state-bar-attorney-search/run-sync": {
      "post": {
        "operationId": "run-sync-codingfrontend-ca-state-bar-attorney-search",
        "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": {
          "barNumbers": {
            "title": "State Bar numbers",
            "type": "array",
            "description": "Exact numeric California State Bar numbers.",
            "items": {
              "type": "string"
            },
            "default": [
              "314033"
            ]
          },
          "queries": {
            "title": "Name or bar-number searches",
            "type": "array",
            "description": "Quick-search values such as an attorney name or bar number.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "advancedSearches": {
            "title": "Advanced searches",
            "type": "array",
            "description": "Advanced public-directory filters. At least one non-option field must be supplied per object.",
            "items": {
              "type": "object",
              "properties": {
                "lastName": {
                  "type": "string",
                  "title": "Last name",
                  "description": "Attorney last name."
                },
                "firstName": {
                  "type": "string",
                  "title": "First name",
                  "description": "Attorney first name."
                },
                "middleName": {
                  "type": "string",
                  "title": "Middle name",
                  "description": "Attorney middle name."
                },
                "firmName": {
                  "type": "string",
                  "title": "Firm name",
                  "description": "Firm name."
                },
                "city": {
                  "type": "string",
                  "title": "City",
                  "description": "Public profile city."
                },
                "state": {
                  "type": "string",
                  "title": "State",
                  "description": "Two-letter US state code."
                },
                "zip": {
                  "type": "string",
                  "title": "ZIP",
                  "description": "Five-digit ZIP code."
                },
                "district": {
                  "type": "string",
                  "title": "District",
                  "description": "State Bar district code from 0 through 6."
                },
                "county": {
                  "type": "string",
                  "title": "County",
                  "description": "State Bar county code, for example LA, SF, or SD."
                },
                "legalSpecialty": {
                  "type": "string",
                  "title": "Legal specialty",
                  "description": "Certified legal-specialty code used by the official form."
                },
                "languageSpoken": {
                  "type": "string",
                  "title": "Language",
                  "description": "Language code used by the official form."
                },
                "practiceArea": {
                  "type": "string",
                  "title": "Practice area",
                  "description": "Self-reported practice-area code used by the official form."
                },
                "matchOption": {
                  "type": "string",
                  "title": "Match option",
                  "description": "Name/city matching mode: begins, contains, exact, or sounds.",
                  "enum": [
                    "begins",
                    "contains",
                    "exact",
                    "sounds"
                  ],
                  "default": "begins"
                }
              }
            },
            "default": []
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of unique attorney profiles saved across all searches.",
            "default": 25
          },
          "maxConcurrency": {
            "title": "Maximum concurrency",
            "minimum": 1,
            "maximum": 6,
            "type": "integer",
            "description": "Concurrent profile requests, capped to reduce load on the public directory.",
            "default": 3
          },
          "requestDelayMillis": {
            "title": "Delay between requests (ms)",
            "minimum": 300,
            "maximum": 10000,
            "type": "integer",
            "description": "Minimum polite delay before each State Bar request.",
            "default": 500
          },
          "maxRetries": {
            "title": "Maximum request attempts",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "Total bounded attempts per request with exponential backoff.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional Apify Proxy configuration. Direct public access is the default.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}