# Neighborhood Data API - Location Scores and Demographics (`nabeelbaghoor/neighborhood-data-api`) Actor

Score any US or Canadian address on 18 measures of walkability, transit, schools, groceries, nightlife, parks, greenery and quiet, then pull the neighborhood, city and metro area around it with demographics, schools, points of interest, market statistics and similar neighborhoods.

- **URL**: https://apify.com/nabeelbaghoor/neighborhood-data-api.md
- **Developed by:** [Nabeel Hassan](https://apify.com/nabeelbaghoor) (community)
- **Categories:** Real estate, Lead generation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 location record returneds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Neighborhood Data API - Location Scores and Demographics

Score any US or Canadian address on 18 measures of what it is actually like to live there, then pull the neighborhood, city and metro area around it.

### What this actor does

- **18 location scores per address.** Walkability, cycling, transit and car friendliness, groceries, shopping, cafes, restaurants, nightlife, primary and high schools, daycares, quiet, historic character, vibrancy, parks, greenery and wellness, each on a 0 to 5 scale with the provider's own plain-English explanation.
- **Coordinate to geography.** Turn a latitude and longitude into the neighborhood, borough, city, ZIP or postal code, county, region and metro area that contain it, with centroids, bounding boxes, areas and optional boundary polygons.
- **Neighborhood profiles.** Written summaries of a neighborhood's character, housing stock and services, in English or French.
- **Demographics.** Income, commute mode, household composition, education, tenure and more, around a point or for a whole area.
- **Schools and places nearby.** Every school with its level, grades, languages, programs, type and school board, and every point of interest with its categories, brands, tags and straight-line distance.
- **Market statistics, value drivers and similar neighborhoods.** Residential market readings by property type, the location factors that move value in an area, and the areas most like it.
- **Pay per result.** You are charged for rows that carry a real record. Locations the provider has no data for are free.

### Bring your own key

This actor signs in with **your own client id and client secret**. Paste them into the input, or set the secret as `DATA_API_KEY`. Nothing runs on anyone else's credentials, and a run without them ends cleanly with an explanation rather than failing.

### Example output

```json
{
  "recordType": "location-scores",
  "requested": "41.847206, -87.668825",
  "found": true,
  "geographyId": "g30_f25dv0me",
  "geographyName": "Westmount",
  "geographyLevelType": "municipality",
  "scoresReturned": 18,
  "averageScore": 3.61,
  "pedestrian_friendly": 4.5,
  "transit_friendly": 4.5,
  "car_friendly": 2.5,
  "groceries": 4,
  "restaurants": 4.5,
  "nightlife": 3.5,
  "primary_schools": 4,
  "parks": 3.5,
  "quiet": 1
}
```

### FAQ

#### What is a location score?

A location score rates one spot on one aspect of neighborhood quality, from 0 to 5, relative to the provider's whole coverage area. Eighteen are published, grouped into transportation, amenities, education, character, nature and wellness. A score that is missing means the provider has too little information about that location, not that it scored zero, so the actor stores it as empty rather than as 0.

#### How do I get a geography id?

Run the actor in "Geographies at a coordinate" mode with a latitude and longitude. It returns every area that contains that point, each with its `geographyId`, from neighborhood up to country. Feed those ids into the profile, market statistics, value drivers and similar neighborhoods modes, which describe an area rather than a point.

#### What areas does this cover?

The United States and Canada, at address level, across more than 250 million addresses. Neighborhood and macro-neighborhood boundaries exist in both countries. A few measures are narrower: historic character covers a handful of cities, and greenery covers about ten.

#### Can I score a list of addresses?

Yes. Put one `latitude, longitude` pair per line in the coordinates field and the actor scores each one, pacing the requests for you. Turn off "Round scores to the nearest half point" when you are ranking addresses against each other, otherwise close calls collapse onto the same value.

#### What is the difference between scores and snapshot?

Scores returns the 18 measures for the point and, if you ask, for the areas around it. Snapshot returns the scores for the point plus demographics, a count of nearby places by category, and the underlying distance and access measures such as nearest grocery store proximity and traffic noise, all in one row.

#### What does it cost?

Pricing is pay per result: 0.01 USD per location, geography, profile, demographics, market statistics, value driver or similar neighborhood record, and 0.004 USD per school or point of interest, with Apify platform usage included. Rows the provider had no data for are not charged. You also need your own agreement with the data provider, which bills separately.

#### Does the actor fail if my credentials are wrong?

No. Missing credentials, rejected credentials, a dataset that is not part of your agreement, or an empty input all end the run cleanly with a message saying what to change. Only a real outage or a bug fails the run.

### Keyword map

neighborhood data API, location scores API, walkability score API, walk score alternative, transit score, neighborhood profile API, real estate location intelligence, demographics API by coordinate, school data API, points of interest API, POI data API, neighborhood boundaries API, geography lookup by latitude longitude, housing market statistics API, similar neighborhoods, US and Canada location data, address quality of life score, MLS listing enrichment, proptech data API

# Actor input Schema

## `mode` (type: `string`):

Location scores rates a spot on 18 measures. Snapshot bundles scores with demographics, nearby place counts and distance measures. Geographies turns a coordinate into the areas that contain it, which is how you find the geography id the area modes need.

## `coordinates` (type: `array`):

One "latitude, longitude" pair per line, for example "41.847206, -87.668825". Used by the scores, snapshot, geographies, demographics, schools and points of interest modes.

## `geographyIds` (type: `array`):

One geography id per line, for example g30\_dpz89rm7. Required by the profile, market statistics, value drivers and similar neighborhoods modes, and accepted by scores, demographics, schools and points of interest. Run the geographies mode on a coordinate to find ids.

## `geographyLevels` (type: `array`):

Which levels of area to return alongside a coordinate. Leave empty in scores mode to get the point score only. 10 neighborhood, 20 macro-neighborhood, 30 city, 32 zip or postal code, 35 county subdivision, 37 county, 38 region, 40 metro area, 60 state or province, 70 country.

## `radius` (type: `integer`):

How far around each coordinate to look, for the snapshot, demographics, schools and points of interest modes. Leave empty for the provider's defaults: 500 m for demographics, a five minute walk for schools, 5 km for points of interest. Points of interest are capped at 25 km.

## `radiusUnit` (type: `string`):

Whether the radius above is in metres or miles. Points of interest always use metres.

## `poiCategories` (type: `array`):

Points of interest mode. Keeps only these categories, for example cafes or groceries. One per line. Leave empty for every category. The provider returns at most 500 places per request.

## `propertyTypes` (type: `array`):

Market statistics mode. Which property types to report on. Leave empty for the provider's default set. Note that its commercial and unclassified groupings are for reconciling totals rather than for analysis.

## `limit` (type: `integer`):

Value drivers and similar neighborhoods modes. How many to return per area. Similar neighborhoods are capped at 10.

## `includeBoundaries` (type: `boolean`):

Geographies mode. Adds each area's boundary polygon to the row. Boundaries make rows much larger and are only published for some geographies.

## `roundScores` (type: `boolean`):

Scores mode. The provider rounds point scores to the nearest 0.5 by default. Turn this off for unrounded values, which is what you want when ranking a list of addresses against each other.

## `language` (type: `string`):

The language for names and descriptive text. French is available for Canadian coverage.

## `maxResults` (type: `integer`):

The most rows this run will save and charge for. Schools and points of interest return many rows per location, so this is the spending control that matters most in those modes.

## `requestsPerMinute` (type: `integer`):

How fast to call the provider. Lower this if your agreement rate limits the run.

## `clientId` (type: `string`):

Your own client id for the neighborhood data provider. This actor is bring your own key: it signs in with your credentials only, and never uses anyone else's.

## `clientSecret` (type: `string`):

Your own client secret for the neighborhood data provider. Exchanged for a short lived access token at the start of every run and stored as a secret.

## Actor input object example

```json
{
  "mode": "scores",
  "radiusUnit": "meter",
  "includeBoundaries": false,
  "roundScores": true,
  "language": "en",
  "maxResults": 500,
  "requestsPerMinute": 120
}
```

# Actor output Schema

## `records` (type: `string`):

One row per record, alongside the coordinate or geography id that produced it.

# 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("nabeelbaghoor/neighborhood-data-api").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("nabeelbaghoor/neighborhood-data-api").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 nabeelbaghoor/neighborhood-data-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,nabeelbaghoor/neighborhood-data-api"
        }
    }
}

```

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/hBxPHxDiEM43MyYcD/builds/aWqLTcepCbIJgihh2/openapi.json
