{
  "openapi": "3.0.1",
  "info": {
    "title": "USPTO Patent Attorney & Agent Leads Scraper",
    "description": "Scrape every registered US patent practitioner from the official USPTO OED roster: name, registration number, type, firm, full address, phone & lead score. Filter by state, city, type or firm; monitor newly registered practitioners. B2B IP-law leads, no key or login.",
    "version": "0.1",
    "x-build-id": "TBMOfkzf9TncZ62uj"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapesage~uspto-patent-practitioner-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapesage-uspto-patent-practitioner-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~uspto-patent-practitioner-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapesage-uspto-patent-practitioner-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~uspto-patent-practitioner-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapesage-uspto-patent-practitioner-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": {
          "states": {
            "title": "States / territories",
            "type": "array",
            "description": "Filter practitioners by USPS state/territory code (e.g. CA, NY, TX, DC). Leave empty for all states. Combine with city or firm filters to narrow further.",
            "items": {
              "type": "string"
            }
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Filter by city name (case-insensitive, exact match), e.g. \"San Francisco\", \"Alexandria\". Leave empty for all cities.",
            "items": {
              "type": "string"
            }
          },
          "practitionerTypes": {
            "title": "Practitioner type",
            "type": "array",
            "description": "Filter by practitioner type. Accepts: attorney (patent attorney), agent (patent agent), limited (limited recognition), design (design patent practitioner). Leave empty for all types.",
            "items": {
              "type": "string"
            }
          },
          "firmName": {
            "title": "Firm / organization contains",
            "type": "string",
            "description": "Keep only practitioners whose firm or organization name contains this text (case-insensitive), e.g. \"Fish\", \"Google\", \"Intellectual Property\"."
          },
          "name": {
            "title": "Name contains",
            "type": "string",
            "description": "Keep only practitioners whose full name contains this text (case-insensitive)."
          },
          "keyword": {
            "title": "Keyword (any field)",
            "type": "string",
            "description": "Free-text keyword matched across name, firm, city, state and attention line."
          },
          "practiceSettings": {
            "title": "Practice setting",
            "type": "array",
            "description": "Filter by derived practice setting: law_firm, corporate (in-house), solo, government, academic, other.",
            "items": {
              "type": "string"
            }
          },
          "registrationNumbers": {
            "title": "Registration numbers (direct lookup)",
            "type": "array",
            "description": "Look up specific practitioners by USPTO registration number (e.g. 40478). When set, location/type filters are ignored.",
            "items": {
              "type": "string"
            }
          },
          "zipCodes": {
            "title": "ZIP codes",
            "type": "array",
            "description": "Filter by 5-digit ZIP code.",
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Filter by country code (e.g. US, CA, GB, JP). Most practitioners are US; limited-recognition practitioners are often abroad.",
            "items": {
              "type": "string"
            }
          },
          "withPhoneOnly": {
            "title": "Only with phone",
            "type": "boolean",
            "description": "Keep only practitioners that have a phone number on the roster (≈99% do).",
            "default": false
          },
          "withFirmOnly": {
            "title": "Only with a firm / organization",
            "type": "boolean",
            "description": "Keep only practitioners affiliated with a firm or organization (drops solo / unaffiliated practitioners).",
            "default": false
          },
          "minLeadScore": {
            "title": "Minimum lead score",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Keep only practitioners with a lead score (0-100) at or above this value."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "leadScore",
              "name",
              "state",
              "firm",
              "registrationNumber",
              "source"
            ],
            "type": "string",
            "description": "How to order results before applying the limit.",
            "default": "leadScore"
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of practitioner records to return. The full roster has ~53,000 active practitioners; set 0-style limits via a high number only when you intend to export many.",
            "default": 100
          },
          "monitorMode": {
            "title": "Monitor mode (only new / changed)",
            "type": "boolean",
            "description": "Remember practitioners seen on previous runs (by registration number) and emit only NEWLY-registered practitioners or those whose firm/city/phone changed. Ideal on a schedule for a fresh-leads feed. Works independently of Apify Schedules.",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor key",
            "type": "string",
            "description": "Name this monitor's memory so different saved searches track new practitioners separately (e.g. \"ca-attorneys\").",
            "default": "default"
          },
          "includeRawFields": {
            "title": "Include raw source columns",
            "type": "boolean",
            "description": "Append the raw roster columns as a sourceFields array on each record (for auditing / debugging).",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "The roster is a public US government download that works without a proxy. Enable Apify Proxy only if you hit a transient block — it is used as a retry fallback.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}