{
  "openapi": "3.0.1",
  "info": {
    "title": "DC Contractor License Lookup & List Scraper (DLCP)",
    "description": "Export every active Washington, DC contractor licence (5,909 on 2026-10-09): general contractors, home improvement and asbestos abatement firms, with address and registered agent. Filter by activity, status, state, city, ZIP, ward or name.",
    "version": "0.0",
    "x-build-id": "CIEQguOj1d0QdqFTh"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapebench~district-of-columbia-contractor-license-lookup/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapebench-district-of-columbia-contractor-license-lookup",
        "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/scrapebench~district-of-columbia-contractor-license-lookup/runs": {
      "post": {
        "operationId": "runs-sync-scrapebench-district-of-columbia-contractor-license-lookup",
        "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/scrapebench~district-of-columbia-contractor-license-lookup/run-sync": {
      "post": {
        "operationId": "run-sync-scrapebench-district-of-columbia-contractor-license-lookup",
        "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": {
          "activity": {
            "title": "Licence activity",
            "enum": [
              "general_contractor",
              "home_improvement",
              "asbestos"
            ],
            "type": "string",
            "description": "Which DLCP contractor licence activity to return: 'general_contractor' (General Contractor/Construction Manager), 'home_improvement' (Home Improvement Contractor) or 'asbestos' (Asbestos Abatement Business). Leave empty for all three. An unrecognised value is ignored with a log line; if nothing you gave is recognised, the run returns a free row saying so instead of every licence."
          },
          "activities": {
            "title": "Activities (batch)",
            "type": "array",
            "description": "Several activities in ONE run, e.g. general_contractor and home_improvement. Combined with 'Licence activity' if you fill both.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "status": {
            "title": "Licence status",
            "enum": [
              "active",
              "all",
              "expired",
              "closed",
              "cancelled",
              "suspended",
              "revoked"
            ],
            "type": "string",
            "description": "Leave empty for Active licences (or for every status when you look up licence numbers). 'all' adds closed, cancelled, expired and suspended licences; 'expired' covers every 'Expired' variant DLCP files (Expired, Expired - Enforcement, Expired - 1st / 2nd / Final Penalty)."
          },
          "licenseNumber": {
            "title": "Licence number",
            "type": "string",
            "description": "A DC Basic Business Licence number to verify, digits only, e.g. 420225000088. Searches every status unless you set one."
          },
          "licenseNumbers": {
            "title": "Licence numbers (batch)",
            "type": "array",
            "description": "Several licence numbers in ONE run. The run log names any that matched nothing. Filters of different kinds combine (a licence must match all of them), so leave name, city and the other filters empty for a plain licence lookup.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "name": {
            "title": "Name contains",
            "type": "string",
            "description": "Text the business name or trade name contains (case-insensitive), e.g. 'ROOFING' or 'SMITH'."
          },
          "names": {
            "title": "Names (batch)",
            "type": "array",
            "description": "Several name fragments in ONE run; a licence matching any of them is returned once. The run log says how many licences each one matched.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "addressState": {
            "title": "Business address state",
            "type": "string",
            "description": "Two-letter state of the business premises address, e.g. DC, MD or VA. Most DC-licensed contractors are based outside the District (on 2026-10-09: 2,863 active in MD, 1,278 in VA, 1,154 in DC)."
          },
          "addressStates": {
            "title": "Address states (batch)",
            "type": "array",
            "description": "Several states in ONE run. Combined with 'Business address state' if you fill both.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "City of the business premises address, exact match ignoring case, e.g. 'Silver Spring'. DC premises file the city as 'Washington'."
          },
          "cities": {
            "title": "Cities (batch)",
            "type": "array",
            "description": "Several cities in ONE run. Combined with 'City' if you fill both.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "zip": {
            "title": "ZIP code",
            "type": "string",
            "description": "ZIP of the business premises address, 5 digits (a ZIP+4 is matched on its first 5)."
          },
          "zips": {
            "title": "ZIP codes (batch)",
            "type": "array",
            "description": "Several ZIPs in ONE run. Combined with 'ZIP code' if you fill both.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "ward": {
            "title": "DC ward",
            "type": "string",
            "description": "DC ward of the business premises, 1 to 8 (only premises inside the District have a ward)."
          },
          "wards": {
            "title": "DC wards (batch)",
            "type": "array",
            "description": "Several wards in ONE run, e.g. 5 and 6.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Cap on licences returned for the whole run (a spend control). DC had 5,909 active contractor licences and 20,910 in all statuses on 2026-10-09, so 100000 returns everything that matches. The run log states how many matched when the cap cuts it short.",
            "default": 500
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. DC's open-data server answers direct requests; enable a proxy only if runs come back with a 'blocked' notice.",
            "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}