# SS.lv Text Search API Documentation

<p><strong>SS.lv Text Search API</strong>: Finds real estate ads of every category by free text. Rows have the price, the location, the category path and the thumbnail. Results follow the full-text order of the site and paging is supported with the page parameter. A word can match in the description of an ad, so rows of other places or categories can appear. A query with no hit returns an empty list. This route has no filters or sort and mixes all categories. The site is in Latvian: text such as titles, descriptions and series stays Latvian or Russian, field names are English. Bedrooms and bathrooms do not exist on SS.lv, only rooms.</p>

- **Documentation:** [https://scrappa.co/docs/ss-lv-api/ss_lv_text_search](https://scrappa.co/docs/ss-lv-api/ss_lv_text_search)
- **API group:** SS.lv API
- **Endpoint:** `GET https://scrappa.co/api/ss-lv/text-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 |
| --- | --- | --- | --- |
| `query` | string | Yes | Search text, 2 to 100 characters. |
| `page` | integer | No | Page of the result list, starting at 1. A page past the last page returns an empty list. |

## Example response

```json
{
    "data": {
        "items": [
            {
                "id": "58220324",
                "url": "https://www.ss.lv/msg/lv/real-estate/flats/riga/centre/beieen.html",
                "area": null,
                "code": "beieen",
                "size": null,
                "floor": null,
                "price": 650,
                "rooms": null,
                "title": "Dz\u012bvoklis atrodas pagalma m\u0101jas 2. st\u0101v\u0101 klus\u0101, sakopt\u0101 vid\u0113. Plat\u012bba 43, 4 m\u00b2. P\u0113c m\u0101jas re",
                "series": null,
                "company": null,
                "currency": "EUR",
                "location": {
                    "region": "riga",
                    "address": null,
                    "district": "centre",
                    "region_name": "R\u012bga",
                    "district_name": "Centrs"
                },
                "area_unit": "m2",
                "land_area": null,
                "thumbnail": "https://i.ss.lv/gallery/8/1561/390163/78032483.th2.jpg",
                "price_text": "650 \u20ac/m\u0113n.",
                "floors_total": null,
                "listing_type": "rent",
                "price_period": "month",
                "category_path": "Dz\u012bvok\u013ci : R\u012bga : Centrs",
                "price_per_sqm": null
            },
            {
                "id": "58120614",
                "url": "https://www.ss.lv/msg/lv/real-estate/plots-and-lands/riga-region/adazu-nov/divezeri/fnbhl.html",
                "area": null,
                "code": "fnbhl",
                "size": null,
                "floor": null,
                "price": 68000,
                "rooms": null,
                "title": "\u012apa\u0161nieks p\u0101rdod zemes gabalu \u0100da\u017eu novad\u0101 Divezeru ciem\u0101, Zaraines iela 13, D\u016b\u0146ezera D gal\u0101.",
                "series": null,
                "company": null,
                "currency": "EUR",
                "location": {
                    "region": "riga-region",
                    "address": null,
                    "district": "adazu-nov",
                    "region_name": "R\u012bgas rajons",
                    "district_name": "\u0100da\u017eu nov."
                },
                "area_unit": "m2",
                "land_area": null,
                "thumbnail": "https://i.ss.lv/gallery/8/1550/387328/77465466.th2.jpg",
                "price_text": "68,000 \u20ac",
                "floors_total": null,
                "listing_type": "sale",
                "price_period": null,
                "category_path": "Zeme : R\u012bgas rajons : \u0100da\u017eu nov. : Divezeri",
                "price_per_sqm": null
            }
        ],
        "query": "Elizabetes",
        "notices": [],
        "pagination": {
            "page": 1,
            "has_more": true,
            "per_page": 5,
            "source_page": 1,
            "total_pages": 50,
            "filtered_from": 5
        },
        "applied_filters": []
    },
    "meta": {
        "billable": true,
        "endpoint_family": "text_search"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A parameter is missing, unknown or not supported, or the location has no list. This response is not billable. |
| 503 | Upstream Unavailable | SS.lv could not be reached or returned a page that does not match the request. This response is not billable and is retryable. |

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