# Nashville Building Permits Properties and Details Scraper (`realestateapi/nashville-building-permits-properties-and-details-scraper`) Actor

Collects bounded public Nashville permit records with flat compatibility fields and structured permit, address, finance, location, contact, and provenance objects. Exact duplicate feature rows are suppressed.

- **URL**: https://apify.com/realestateapi/nashville-building-permits-properties-and-details-scraper.md
- **Developed by:** [Real Estate API](https://apify.com/realestateapi) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.99 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Nashville Building Permits Properties and Details Scraper

This Actor reads bounded records from Metro Nashville's official “Building Permits Issued” ArcGIS layer. It returns permit records, not active real-estate listings. Source fields include permit number, type and subtype, parcel, dates, construction cost, address, location, tracking data, and other permit metadata. Some source records may include contact or purpose fields; no real contact or purpose values appear in the example below. Exact duplicate normalized records are emitted once, while rows with conflicting source values are preserved.

The Actor accepts only the configured Metro Nashville HTTPS layer and rejects unknown input fields and other hosts or layers. It does not submit permit applications or contact anyone.

### Input

`where` filters the official layer, for example `Permit_Type_Description LIKE '%Residential%'`. `maxItems` limits returned records, `maxPages` bounds pagination, `outFields` selects source fields, `returnGeometry` includes point geometry when available, and `requestTimeoutSecs` sets the request timeout. The default layer is Metro Nashville's Building Permits Issued service.

`includeContact` is an optional boolean that defaults to `false`. When `false` (the privacy-safe default), new records omit the personal `contact` and `contactDetails` fields. Set it to `true` only when a documented lawful use-basis covers collecting that personal data; the flag is an operator setting and does not itself grant permission.

### Output

The example is a synthetic permit record, not a live permit or listing. It illustrates the flat fields and nested detail groups when the source supplies those values. The source's `Purpose` value (public work-description text) is emitted as `purpose` and mirrored in `permitDetails.purpose`.

The source's `Contact` value can identify a person, and there is no documented lawful use-basis for collecting it. New records therefore omit both the flat `contact` field and `contactDetails` unless `includeContact: true` is set; in that mode they are emitted as `contact` and `contactDetails.sourceValue`. Enabling the flag requires a documented use-basis and does not itself grant permission. Both fields stay declared as optional in the dataset schema so historical rows remain readable. No phone numbers, email addresses, or other personal contact details are requested or emitted.

```json
{
  "recordType": "buildingPermit",
  "recordId": "nashville-permit:EXAMPLE-0001",
  "actorName": "Nashville Building Permits Properties and Details Scraper",
  "permitNumber": "EXAMPLE-0001",
  "permitType": "Residential Building Permit",
  "permitSubtype": "New Construction",
  "parcel": "EXAMPLE-PARCEL",
  "dateEntered": "2026-01-10T00:00:00.000Z",
  "dateIssued": "2026-01-15T00:00:00.000Z",
  "constructionCost": 275000,
  "address": "100 Example Street",
  "city": "Nashville",
  "state": "TN",
  "subdivisionLot": "Example Subdivision, Lot 1",
  "permitTypeCode": "EXAMPLE-TYPE",
  "permitSubtypeCode": "EXAMPLE-SUBTYPE",
  "trackingNumber": 999999,
  "councilDistrict": 1,
  "longitude": -86.7,
  "latitude": 36.1,
  "objectId": 999999,
  "zip": "00000",
  "addressDetails": {
    "streetAddress": "100 Example Street",
    "city": "Nashville",
    "state": "TN",
    "postalCode": "00000",
    "parcel": "EXAMPLE-PARCEL",
    "subdivisionLot": "Example Subdivision, Lot 1"
  },
  "permitDetails": {
    "permitNumber": "EXAMPLE-0001",
    "type": "Residential Building Permit",
    "subtype": "New Construction",
    "typeCode": "EXAMPLE-TYPE",
    "subtypeCode": "EXAMPLE-SUBTYPE",
    "trackingNumber": 999999
  },
  "financialDetails": {
    "constructionCost": 275000
  },
  "location": {
    "longitude": -86.7,
    "latitude": 36.1,
    "councilDistrict": 1
  },
  "sourceUrl": "https://services2.arcgis.com/HdTo6HJqh92wn4D8/arcgis/rest/services/Building_Permits_Issued_2/FeatureServer/0",
  "scrapedAt": "2026-10-05T12:00:00.000Z",
  "provenance": {
    "sourceUrl": "https://services2.arcgis.com/HdTo6HJqh92wn4D8/arcgis/rest/services/Building_Permits_Issued_2/FeatureServer/0",
    "sourceLayer": "Building Permits Issued",
    "sourceObjectId": 999999,
    "recordId": "nashville-permit:EXAMPLE-0001",
    "actorName": "Nashville Building Permits Properties and Details Scraper",
    "scrapedAt": "2026-10-05T12:00:00.000Z"
  }
}
```

# Actor input Schema

## `serviceUrl` (type: `string`):

Metro Nashville's official Building Permits Issued FeatureServer layer. Other hosts and layers are rejected.

## `where` (type: `string`):

SQL-like ArcGIS filter applied to the layer, for example Permit_Type_Description LIKE '%Residential%'.

## `maxItems` (type: `integer`):

Maximum number of permit records to collect.

## `outFields` (type: `string`):

Comma-separated ArcGIS fields to request.

## `returnGeometry` (type: `boolean`):

Include ArcGIS point geometry when available.

## `requestTimeoutSecs` (type: `integer`):

Timeout for each ArcGIS request.

## `maxPages` (type: `integer`):

Hard limit for paged requests used to collect unique permits after duplicate records are removed.

## `includeContact` (type: `boolean`):

When true, new records include the source's `contact` name and `contactDetails.sourceValue`. Off by default because there is no documented lawful use-basis for collecting this personal data; only enable it once a valid use-basis is documented. This flag does not itself grant permission and does not change historical rows already in storage.

## Actor input object example

```json
{
  "serviceUrl": "https://services2.arcgis.com/HdTo6HJqh92wn4D8/arcgis/rest/services/Building_Permits_Issued_2/FeatureServer/0",
  "where": "1=1",
  "maxItems": 100,
  "outFields": "*",
  "returnGeometry": false,
  "requestTimeoutSecs": 30,
  "maxPages": 10,
  "includeContact": false
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `runSummary` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("realestateapi/nashville-building-permits-properties-and-details-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("realestateapi/nashville-building-permits-properties-and-details-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call realestateapi/nashville-building-permits-properties-and-details-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,realestateapi/nashville-building-permits-properties-and-details-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/hdvzBCYoIDeKqG0uW/builds/rZpY5KFCXF9XE6cC7/openapi.json
