{
  "openapi": "3.0.1",
  "info": {
    "title": "City Council Agenda Scraper (Legistar, Granicus, CivicPlus)",
    "description": "Scrape city council, county board and planning commission agendas, minutes and agenda items from Legistar, Granicus, CivicPlus AgendaCenter, PrimeGov and CivicClerk. Keyword alerts with PDF text snippets.",
    "version": "0.1",
    "x-build-id": "uROCHR7lmlrHJcMXb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/adaptive_depths~council-agenda-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-adaptive_depths-council-agenda-monitor",
        "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/adaptive_depths~council-agenda-monitor/runs": {
      "post": {
        "operationId": "runs-sync-adaptive_depths-council-agenda-monitor",
        "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/adaptive_depths~council-agenda-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-adaptive_depths-council-agenda-monitor",
        "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",
        "required": [
          "sources"
        ],
        "properties": {
          "sources": {
            "title": "Portals / Legistar clients",
            "type": "array",
            "description": "One per line. Legistar: a client name (e.g. `seattle`), `legistar:seattle`, or `https://seattle.legistar.com`. CivicPlus: the site root or `/AgendaCenter` URL. Granicus: a `ViewPublisher.php?view_id=N` URL. PrimeGov: `https://<city>.primegov.com`. CivicClerk: `https://<tenant>.portal.civicclerk.com` or `civicclerk:<tenant>`.",
            "default": [
              "seattle"
            ],
            "items": {
              "type": "string"
            }
          },
          "startDate": {
            "title": "From date",
            "type": "string",
            "description": "Meetings on/after this date (YYYY-MM-DD). Default: 30 days ago."
          },
          "endDate": {
            "title": "To date",
            "type": "string",
            "description": "Meetings on/before this date. Default: 30 days ahead (catches upcoming agendas)."
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Case-insensitive whole-word matches against meeting titles, agenda items, and (if enabled) agenda/minutes text.",
            "items": {
              "type": "string"
            }
          },
          "downloadPdfText": {
            "title": "Download agenda/minutes text",
            "type": "boolean",
            "description": "Fetch agenda and minutes documents (PDF or HTML), extract text, and return matched snippets. Slower; one or two downloads per meeting.",
            "default": false
          },
          "includeFullText": {
            "title": "Include full document text",
            "type": "boolean",
            "description": "Also put the full extracted text in each dataset item (large).",
            "default": false
          },
          "onlyKeywordMatches": {
            "title": "Only output meetings that match a keyword",
            "type": "boolean",
            "description": "If enabled, only meetings whose agenda/minutes match at least one keyword are saved to the dataset.",
            "default": false
          },
          "includeItems": {
            "title": "Fetch agenda item lists",
            "type": "boolean",
            "description": "Structured items where the platform exposes them (Legistar, PrimeGov, CivicClerk).",
            "default": true
          },
          "onlyNewSinceLastRun": {
            "title": "Only new meetings since last run (monitoring)",
            "type": "boolean",
            "description": "Remembers meetings already output in a named key-value store. A meeting is re-emitted once its minutes appear.",
            "default": false
          },
          "stateStoreName": {
            "title": "State store name",
            "type": "string",
            "description": "Use a different name per monitoring task.",
            "default": "council-agenda-monitor-state"
          },
          "maxMeetingsPerSource": {
            "title": "Max meetings per source",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of meetings to return from each source.",
            "default": 200
          },
          "maxPdfPages": {
            "title": "Max PDF pages to read",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of pages read from each agenda/minutes PDF when extracting text.",
            "default": 60
          },
          "snippetChars": {
            "title": "Snippet context (chars each side)",
            "minimum": 20,
            "type": "integer",
            "description": "Number of characters of context shown on each side of a keyword match.",
            "default": 160
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Usually not needed. Some CivicPlus sites rate-limit datacenter IPs."
          },
          "legistarTokens": {
            "title": "Legistar API tokens (optional)",
            "type": "object",
            "description": "Map of client name to API token for the few Legistar clients that require one, e.g. {\"nyc\": \"YOUR_TOKEN\"}."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}