# Hudexchange — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://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 browse over 5,288 HUD resources including FAQs, training materials, reports, and general documents across 95+ housing and urban development programs. Filter results by program, topic, and content type to quickly find the information you need.

**Category:** Government & Public Data | **Website:** [www.hudexchange.info/](https://www.hudexchange.info/) | **Docs:** [parse.bot/marketplace/8beb606c-c43c-4e31-9b30-5c3f5cf1138b/hudexchange-info-api](https://parse.bot/marketplace/8beb606c-c43c-4e31-9b30-5c3f5cf1138b/hudexchange-info-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-hudexchange-info-api-8beb606c/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_facets

Get all available filter options for the Resource Library, including content types and programs/topics with document counts. Returns the full catalog of facet values and their resource counts. Use the returned names as filter values in search_resources.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-hudexchange-info-api-8beb606c/get_facets \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_resource_detail

Get detailed information for a specific resource page including title, date, breadcrumb navigation, description, related topics, and related links. The resource_path is obtained from search_resources results by removing the domain prefix from the URL.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `resource_path` | string | Yes | Path to the resource relative to hudexchange.info (e.g. '/resource/5334/cdbg-income-limits/' or '/faqs/4357/how-often-are-the-data-displays-updated/'). Obtain from search_resources results[*].url by removing the domain prefix. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-hudexchange-info-api-8beb606c/get_resource_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"resource_path":"<string>"}'
```

### search_resources

Search the HUD Exchange Resource Library with keyword search and filters by content type, program/topic, date range, and sort order. Returns paginated results (15 per page) with document metadata and available filter facets for the current query. Paginates via integer page number. Each result includes title, URL, content_type, and date. Facets update to reflect the filtered result set.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `content_type` | string | No | Filter by content type. Comma-separated for multiple values. Values: FAQs, Resources, Training Materials, Reports. Use + for spaces in values (e.g. 'Training+Materials'). |
| `date_range` | string | No | Predefined date range filter. |
| `order_by` | string | No | Sort order for results. |
| `page` | integer | No | Page number for pagination (15 results per page). |
| `query` | string | No | Keyword search term (e.g. 'CDBG', 'homelessness'). |
| `topic` | string | No | Filter by program/topic name (e.g. 'Housing+Counseling+Program', 'CDBG+Entitlement+Program'). Use + for spaces. Valid names available from get_facets endpoint. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-hudexchange-info-api-8beb606c/search_resources \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"content_type":"<string>","date_range":"<string>","order_by":"<string>","page":"<integer>","query":"<string>","topic":"<string>"}'
```
