# LoopNet Locations

Resolves free text to LoopNet geography candidates. The search endpoint resolves the same way internally, so this is the human-facing "what places exist" surface. geography_type 2 is a city in the observed data; other types cover addresses and ZIPs. An unmatched place is a 422, not an empty list.

- **Documentation:** [https://scrappa.co/docs/loopnet-api/loopnet_locations](https://scrappa.co/docs/loopnet-api/loopnet_locations)
- **API group:** LoopNet API
- **Endpoint:** `GET https://scrappa.co/api/loopnet/locations`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `query` | string | Yes | Place text: address, city, ZIP, county or state, for example "boston, ma". |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/loopnet/locations?query=boston%2C+ma"
```

## Example response

```json
{
    "success": true,
    "data": {
        "query": "boston, ma",
        "candidates": [
            {
                "display": "Boston",
                "geography_id": 28670,
                "geography_type": 2,
                "code": "MA",
                "centroid": [
                    -71.057224,
                    42.31395
                ],
                "bounding_box": [
                    -71.191247,
                    42.227911,
                    -70.923202,
                    42.399989
                ]
            }
        ]
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A required public parameter is missing or invalid, or the location could not be resolved to a LoopNet geography. This response is not billable. |
| 503 | Service Unavailable | The service could not obtain a complete result. This response is not billable. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
