> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scrapebadger.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Marketplace Locations

> The common Facebook Marketplace location slugs used as the location parameter — free reference catalog.

The common Facebook Marketplace **location slugs**, surfaced for convenience.

Not exhaustive, and **not guessable**: only places Facebook itself has created a
slug for resolve. `london` and `newcastleupontyne` do; `durham` and `sunderland`
do not, and
[`/marketplace/search`](https://docs.scrapebadger.com/api-reference/endpoint/facebook/marketplace-search)
returns a `400 invalid_location` for those rather than silently searching a
different place (the place varies — San Francisco, Maryland and Delaware have
all been observed for the same bad input).

To cover a town that has no slug, search a nearby location that does have one
and read `city_page_id` off the listings — those numeric Facebook place ids are
valid `location` values. See
[Location targeting](https://docs.scrapebadger.com/api-reference/endpoint/facebook/marketplace-search.md#location-targeting).

**Credits:** 0 (free)

## Authorization

**X-API-Key** `string` *required*

Your ScrapeBadger API key.

## Response

**locations** `Location[]`

Each `Location` has `slug` (the value you pass as a `location` parameter) and
`name` (the human-readable city).

**count** `integer`

Number of locations returned.

## Example

```bash cURL theme={null}
curl "https://scrapebadger.com/v1/facebook/marketplace/locations" \
  -H "X-API-Key: YOUR_API_KEY"
```

```javascript Node.js theme={null}
const res = await fetch(
  "https://scrapebadger.com/v1/facebook/marketplace/locations",
  { headers: { "X-API-Key": process.env.SCRAPEBADGER_API_KEY } },
);
const data = await res.json();
```

```python Python theme={null}
import requests

res = requests.get(
    "https://scrapebadger.com/v1/facebook/marketplace/locations",
    headers={"X-API-Key": "YOUR_API_KEY"},
)
data = res.json()
```

```json Response theme={null}
{
  "locations": [
    { "slug": "nyc", "name": "New York, NY" },
    { "slug": "la", "name": "Los Angeles, CA" },
    { "slug": "chicago", "name": "Chicago, IL" },
    { "slug": "houston", "name": "Houston, TX" },
    { "slug": "seattle", "name": "Seattle, WA" },
    { "slug": "sanfrancisco", "name": "San Francisco, CA" },
    { "slug": "miami", "name": "Miami, FL" },
    { "slug": "atlanta", "name": "Atlanta, GA" },
    { "slug": "london", "name": "London, UK" },
    { "slug": "toronto", "name": "Toronto, ON" },
    { "slug": "sydney", "name": "Sydney, AU" }
  ],
  "count": 11
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.