Skip to content
Scrappa Get API key
SUUMO API 1 credit/request

SUUMO Lines API

GET https://scrappa.co/api/suumo/lines

List the train lines of a prefecture, or the stations of one line. A station search in the rent search needs four values from this endpoint: the station `code` as `station`, the line `code` as `line`, its `line_group` and the `area_code`. `listing_count` is the number of rental listings SUUMO shows for the line or station.

SUUMO Lines API 1 credit/request

Endpoint

Request preview
GET
https://scrappa.co/api/suumo/lines
Auth header
x-api-key
Cost
1 credit/request
prefecture = example
Response preview
200 OK
{
    "data": {
        "lines": [
            {
                "code": "0005",
                "name": "\uff2a\uff32\u5c71\u624b\u7dda",
                "line_group": "00051",
                "listing_count": 291186
            },
            {
                "code": "0125",
                "name": "\uff2a\uff32\u4eac\u6d5c\u6771\u5317\u7dda",
                "line_group": "01251",
                "listing_count": 210663
...

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.

3 optional filters available.

prefecture string Required

Prefecture as a lower-case English name: tokyo, osaka, kanagawa, hokkaido and so on (all 47).

Example value example
line string Optional

A 4-digit line code from the lines list, e.g. 0005. Returns the stations of that line instead. Needs line_group and area_code.

Example value example
line_group string Optional

The line_group value of that line in the lines list, e.g. 00051. Required with line.

Example value example
area_code string Optional

The area_code value of the lines list, e.g. 013. Required with line.

Example value example

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": {
        "lines": [
            {
                "code": "0005",
                "name": "\uff2a\uff32\u5c71\u624b\u7dda",
                "line_group": "00051",
                "listing_count": 291186
            },
            {
                "code": "0125",
                "name": "\uff2a\uff32\u4eac\u6d5c\u6771\u5317\u7dda",
                "line_group": "01251",
                "listing_count": 210663
            }
        ],
        "area_code": "013",
        "prefecture": "tokyo"
    },
    "meta": {
        "billable": true,
        "endpoint_family": "lines"
    },
    "success": true
}

Errors

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

404

HTTP 404

The listing does not exist or is no longer online. This response is not billable.

422

HTTP 422

A parameter or filter is missing, invalid or not available for the property type. This response is not billable.

503

HTTP 503

SUUMO is temporarily unavailable or answered a page that no longer matches the documented contract. Retry the request. This response is not billable.

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.