{
  "openapi": "3.0.1",
  "info": {
    "title": "Ireland Planning Applications",
    "description": "Ireland Planning Applications Scraper\n\nEvery planning application in the Republic of Ireland, all 31 local authorities, a full archive back to 2010, and the documents that were actually filed.\n\nIt opens the planning file, so you get the drawings, the planner's report and the Chief Executive's Order.",
    "version": "0.1",
    "x-build-id": "khj8SA9HiMkfwdu2i"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/devon_gtme~ireland-planning-applications/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-devon_gtme-ireland-planning-applications",
        "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/devon_gtme~ireland-planning-applications/runs": {
      "post": {
        "operationId": "runs-sync-devon_gtme-ireland-planning-applications",
        "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/devon_gtme~ireland-planning-applications/run-sync": {
      "post": {
        "operationId": "run-sync-devon_gtme-ireland-planning-applications",
        "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": {
          "councils": {
            "title": "Planning authorities",
            "type": "array",
            "description": "Which of Ireland's 31 local authorities to cover. Clear the field to cover all 31; that is a full national harvest and takes about half an hour with the live pass on, so a single county is prefilled to keep a first run quick. Accepts full names ('Kildare County Council'), the legal name ('Limerick City and County Council'), short forms ('Co. Kildare', 'DLR') or portal codes ('KildareCC'). An unrecognised name stops the run rather than being silently dropped.",
            "items": {
              "type": "string"
            }
          },
          "daysBack": {
            "title": "Days back",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "How far back to look, counted from today. The national register goes back to 2010, so large values are fine for history. Note that live-portal freshness only covers the last 42 days (see Live freshness below).",
            "default": 30
          },
          "dateFrom": {
            "title": "Date from (YYYY-MM-DD)",
            "type": "string",
            "description": "Explicit start of the received-date window. Overrides 'Days back'. Setting an explicit window disables the live freshness pass, which can only search relative to today."
          },
          "dateTo": {
            "title": "Date to (YYYY-MM-DD)",
            "type": "string",
            "description": "Explicit end of the received-date window. Overrides 'Days back'."
          },
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Keep only applications whose description, address or type contains one of these (case-insensitive, any match). Applied locally on purpose: the portals' own text search matches word-initial stems only, so searching them directly misses words that appear mid-phrase.",
            "items": {
              "type": "string"
            }
          },
          "appStatus": {
            "title": "Application status",
            "type": "array",
            "description": "Filter by status as the national register spells it, e.g. 'NEW APPLICATION', 'FURTHER INFORMATION', 'APPLICATION FINALISED'. Leave empty for all.",
            "items": {
              "type": "string"
            }
          },
          "appTypes": {
            "title": "Application type",
            "type": "array",
            "description": "Filter by type, e.g. 'PERMISSION', 'RETENTION', 'OUTLINE PERMISSION'. Leave empty for all.",
            "items": {
              "type": "string"
            }
          },
          "excludeComplianceSubmissions": {
            "title": "Exclude compliance submissions",
            "type": "boolean",
            "description": "Drop references ending 'Sub01', 'Sub02' and so on. These are condition-compliance filings against an application that was already decided, not new schemes. They are about a quarter of Dublin City's rows and near-zero elsewhere, so leaving them in overstates the largest authority.",
            "default": true
          },
          "freshMode": {
            "title": "Live freshness pass",
            "type": "boolean",
            "description": "Also read the councils' live portals, not just the national register. The national database refreshes weekly, so an application lodged in the last few days may not be in it yet. This closes that gap for the 24 ePlan councils. The portals cap their own listing at 42 days.",
            "default": true
          },
          "includeAgileCouncils": {
            "title": "Include Agile council portals (Dublin, Cork, Wexford)",
            "type": "boolean",
            "description": "Read the Agile Applications API directly for the 7 councils on it (all four Dublin authorities, both Cork authorities, Wexford). It adds the planning agent's email address and phone number, live status, and documents. It is OFF by default because planning.agileapplications.ie publishes a robots.txt that disallows all automated agents; those councils are covered by the national register regardless. Turn it on only if you have decided that is appropriate for your use. Cork City is the one council the national register no longer receives, so it needs this.",
            "default": false
          },
          "includeDocuments": {
            "title": "Include documents",
            "type": "boolean",
            "description": "Attach the list of documents filed with each application: type, description, date and a direct link. Covers 28 of the 31 authorities. Donegal, Galway County and Monaghan publish no documents online.",
            "default": false
          },
          "extractDocumentText": {
            "title": "Extract document text (paid)",
            "type": "boolean",
            "description": "Download the documents and return their full text, including drawings. This is the billed part of the actor and is charged per document that actually yields text -- documents that are missing, or scanned so badly that OCR finds nothing, cost nothing. Turning this on also turns on 'Include documents'.",
            "default": false
          },
          "documentCategories": {
            "title": "Document categories to extract",
            "type": "array",
            "description": "Which document types to download when extracting text. Site notices and site location maps are excluded by default: both are near-content-free, and a site location map is a parcel outline on an Ordnance Survey extract that can never carry building detail.",
            "items": {
              "type": "string",
              "enum": [
                "plans",
                "decision_notice",
                "officer_report",
                "further_information",
                "appeal",
                "consultation",
                "supporting",
                "site_location",
                "site_notice",
                "administrative"
              ],
              "enumTitles": [
                "Plans, drawings, elevations and sections",
                "Decision notice / Chief Executive's Order",
                "Planner's report",
                "Further information",
                "An Bord Pleanala appeal papers",
                "Submissions and observations",
                "Supporting reports and statements",
                "Site location map",
                "Site and newspaper notices",
                "Council administrative paperwork"
              ]
            },
            "default": [
              "plans",
              "decision_notice",
              "officer_report"
            ]
          },
          "maxDocumentMb": {
            "title": "Maximum document size (MB)",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Skip documents larger than this. Architectural drawings can be very large and a single one can consume a gigabyte of memory while being parsed, so this is a safety limit rather than a cost control.",
            "default": 25
          },
          "allowOcr": {
            "title": "OCR scanned documents",
            "type": "boolean",
            "description": "Fall back to OCR when a document has no text layer. Irish planning files are about 97% machine-readable, so this rarely fires, but it is slow when it does.",
            "default": true
          },
          "maxResults": {
            "title": "Maximum applications",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Stop after this many applications.",
            "default": 1000
          },
          "proxy": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. None of these sources blocked a direct connection during testing, so a proxy is not normally needed. If you do use one, an Irish exit is the closest match to the audience these portals serve.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}