# LoopNet Search

Searches US commercial listings. location is free text (city, ZIP, state or county) and is resolved to a LoopNet geography first, so a client does not have to call the locations endpoint. listing_type picks the sale or the lease book. One page holds 25 cards and total reports the whole result set, so page 2 of a 750-result search is the second 25. A valid empty result is a successful response.

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

## 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 |
| --- | --- | --- | --- |
| `location` | string | Yes | Free-text place, for example "houston, tx", "boston, ma" or "90210". |
| `listing_type` | string | No | for-sale (default) or for-lease. |
| `page` | integer | No | Result page, 1-based. 25 listings per page. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/loopnet/search?location=houston%2C+tx&listing_type=for-sale"
```

## Example response

```json
{
    "success": true,
    "data": {
        "total": 750,
        "page": 1,
        "per_page": 25,
        "listing_type": "for-sale",
        "location": "Houston, TX",
        "listings": [
            {
                "listing_id": "42039160",
                "url": "https://www.loopnet.com/Listing/1100-Louisiana-St-Houston-TX/42039160/",
                "address": "1100 Louisiana St",
                "city": "Houston",
                "state": "TX",
                "zip": "77002",
                "price_display": "Price Upon Request",
                "size": "60 - 28,600 SF",
                "property_type": "Office",
                "space_use": "Coworking",
                "status": "Available",
                "image": "https://images1.loopnet.com/i2/bFE7ADaUxhZq7Ltn5yyyKyJaupMBkaEAg41kJ9I-nwM/117/coworking-property-for-lease-1100-louisiana-st-houston-tx-77002.jpg"
            }
        ]
    }
}
```

## 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)
