[Python] StreetEasy api-v6 pagination?

Discussão em 'Python' iniciado por Stack, Junho 18, 2025.

  1. Stack

    Stack Membro Participativo

    The endpoint https://api-v6.streeteasy.com/ seems to work, at least the initial request. However, I haven't been able to figure out how to implement pagination, and the "page" variable didn't do anything.

    json_data = {
    'query': '\n query GetListingRental($input: SearchRentalsInput!) {\n searchRentals(input: $input) {\n search {\n criteria\n }\n totalCount\n edges {\n ... on OrganicRentalEdge {\n node {\n id\n areaName\n bedroomCount\n buildingType\n fullBathroomCount\n geoPoint {\n latitude\n longitude\n }\n halfBathroomCount\n noFee\n leadMedia {\n photo {\n key\n }\n }\n price\n priceChangedAt\n priceDelta\n priceChangedAt\n offMarketAt\n relloExpress {\n ctaEnabled\n link\n rentalId\n }\n sourceGroupLabel\n status\n street\n unit\n urlPath\n }\n }\n }\n }\n }\n',
    'variables': {
    'input': {
    'filters': {
    'rentalStatus': 'ACTIVE',
    'areas': [
    100,
    200,
    300,
    400,
    500
    ],
    'boundingBox': {
    'topLeft': {
    'latitude': 40.68,
    'longitude': -74,
    },
    'bottomRight': {
    'latitude': 40.657,
    'longitude': -73.959,
    },
    },
    },
    'page': 1,
    'perPage': 500,
    'sorting': {
    'attribute': 'INTERESTING_CHANGE_AT',
    'direction': 'DESCENDING',
    },
    'userSearchToken': '714e0db2-0790-4524-8a54-20499d7a97fd',
    'adStrategy': 'NONE',
    },
    },
    }

    Continue reading...

Compartilhe esta Página