# Craigslist Apartments — Wrapped API

> **You are on:** `https://api.beta.paywithlocus.com/api` | [llms.txt](https://beta.paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Search and filter Craigslist apartment listings by neighborhood, bedroom count, price range, and image availability. Retrieve detailed listing information including full descriptions, contact details, photos, and location data.

**Category:** Real Estate | **Website:** [newyork.craigslist.org/search/mnh/apa#search=2~gallery~0](https://newyork.craigslist.org/search/mnh/apa#search=2~gallery~0) | **Docs:** [parse.bot/marketplace/52af31dc-4f35-4b04-aed0-fd657c5e8a30/craigslist-apartments-api](https://parse.bot/marketplace/52af31dc-4f35-4b04-aed0-fd657c5e8a30/craigslist-apartments-api)

Pay-per-use API proxy for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.beta.paywithlocus.com/api/wrapped/credits/craigslist-apartments/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## Endpoints

### Get listing details

Fetch full details for a single apartment listing by its numeric Craigslist ID. Returns the complete description, address, images, geo-coordinates, bedroom/bathroom counts, square footage, and posting date. The listing must still be live on Craigslist; expired or removed listings return input_not_found. The subarea hint helps construct the correct URL but the listing will resolve via redirect even with the wrong subarea.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `listing_id` | string | Yes | Craigslist listing ID (numeric string, e.g. '7939927324'). Obtain from search_apartments results. |
| `subarea` | string | No | Craigslist subarea code for the region the listing belongs to (e.g. mnh for Manhattan, brk for Brooklyn). Helps construct the correct URL. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/craigslist-apartments/get-listing-details \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"listing_id":"<string>","subarea":"<string>"}'
```

### Search apartments

Full-text search over apartment listings in a Craigslist metro subarea. Filters by neighborhood codes/names, bedroom count, price range, and image presence. Returns up to max_results listing summaries sorted by the chosen order. Pagination is not supported — the single response contains all matching results up to the cap (max 360). Neighborhood names are resolved to Craigslist numeric codes internally; unrecognized names are silently ignored.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `has_pic` | string | No | Only show listings with images: 1 (yes) or 0 (no). |
| `max_bedrooms` | string | No | Maximum number of bedrooms (numeric string, e.g. '3'). |
| `max_price` | string | No | Maximum monthly rent in USD (numeric string, e.g. '5000'). |
| `max_results` | string | No | Maximum number of results to return (up to 360). |
| `min_bedrooms` | string | No | Minimum number of bedrooms (numeric string, e.g. '1'). |
| `min_price` | string | No | Minimum monthly rent in USD (numeric string, e.g. '1000'). |
| `neighborhoods` | string | No | Comma-separated neighborhood names or numeric codes to filter results within the selected subarea. Manhattan examples: chelsea, soho, east village, west village, greenwich village, lower east side, upper east side, upper west side, harlem, tribeca, midtown east, midtown west, hells kitchen, gramercy park, financial district, battery park city, murray hill, kips bay, stuyvesant town, chinatown, nolita, inwood, washington heights, hamilton heights, morningside heights, east harlem, marble hill. Unrecognized names are silently ignored. |
| `query` | string | No | Search keyword to filter listings by title and description text. |
| `sort` | string | No | Sort order for results. |
| `subarea` | string | No | Craigslist subarea code for the target city region (e.g. mnh for Manhattan, brk for Brooklyn, que for Queens, eby for East Bay). Varies by metro area. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/craigslist-apartments/search-apartments \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"has_pic":"<string>","max_bedrooms":"<string>","max_price":"<string>","max_results":"<string>","min_bedrooms":"<string>","min_price":"<string>","neighborhoods":"<string>","query":"<string>","sort":"<string>","subarea":"<string>"}'
```

## Next steps

- [All wrapped API providers](https://beta.paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://beta.paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://beta.paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://beta.paywithlocus.com/agent/index.md): every Locus agent page.