Skip to content
Scrappa Get API key
SS.lv API 1 credit/request

SS.lv Autocomplete API Documentation

GET https://scrappa.co/api/ss-lv/autocomplete

SS.lv Autocomplete API: Matches regions, Riga and Riga region districts and premises or other sub-categories, and returns the slug to use in search. SS.lv has no autocomplete of its own, so the answer comes from a fixed list and makes no upstream lookup. This route is free.

SS.lv Autocomplete API Documentation 1 credit/request

Endpoint

Request preview
GET
https://scrappa.co/api/ss-lv/autocomplete
Auth header
x-api-key
Cost
1 credit/request
query = coffee shops
Response preview
200 OK
{
    "data": {
        "query": "riga",
        "results": [
            {
                "name": "R\u012bga",
                "slug": "riga",
                "type": "region",
                "region": "riga",
                "category": null,
                "district": null,
                "sub_category": null
            },
            {
...

Parameters

Start with the required fields, then add optional filters only when your use case needs them.

Runnable path

1 required parameter needed before sending a request.

2 optional filters available.

query string Required

Search text, 1 to 100 characters. Ignores case and Latvian diacritics.

Example value coffee shops
type string Optional

Optional: region, district or sub_category.

Example value example
limit integer Optional

Number of results, 1 to 50 (default 10).

Example value 10

Response Schema

Example response fields are illustrative; inspect the JSON before integrating.

Example response fields

Scan these fields before integrating.

data meta success
JSON Response
200 OK
{
    "data": {
        "query": "riga",
        "results": [
            {
                "name": "R\u012bga",
                "slug": "riga",
                "type": "region",
                "region": "riga",
                "category": null,
                "district": null,
                "sub_category": null
            },
            {
                "name": "R\u012bgas rajons",
                "slug": "riga-region",
                "type": "region",
                "region": "riga-region",
                "category": null,
                "district": null,
                "sub_category": null
            },
            {
                "name": "Vecr\u012bga",
                "slug": "vecriga",
                "type": "district",
                "region": "riga",
                "category": null,
                "district": "vecriga",
                "sub_category": null
            }
        ]
    },
    "meta": {
        "billable": false,
        "endpoint_family": "autocomplete"
    },
    "success": true
}

Errors

Handle these documented responses before retrying or showing customer-facing failures.

422

Validation Error

A parameter is missing, unknown or not supported, or the location has no list. This response is not billable.

{
    "meta": {
        "billable": false,
        "retryable": false,
        "endpoint_family": "autocomplete"
    },
    "error": {
        "code": "VALIDATION_ERROR",
        "message": "region is required. Use one of: riga, jurmala, riga-region."
    },
    "success": false
}
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.

{
    "meta": {
        "billable": false,
        "retryable": true,
        "endpoint_family": "autocomplete"
    },
    "error": {
        "code": "UPSTREAM_UNAVAILABLE",
        "message": "SS.lv could not be reached. Please retry shortly."
    },
    "success": false
}

Generate Code with AI

Copy a ready-made prompt with all the endpoint details, parameters, and example responses. Paste it into ChatGPT, Claude, or any AI assistant to instantly generate working code.

Try It Live

Test this endpoint in our interactive playground with real data.