Froren / realtorca

API wrapper for realtor.ca MLS website
195 stars 75 forks source link

API documentation for listing details #19

Closed iwasrobbed closed 4 years ago

iwasrobbed commented 4 years ago

Hi there,

Thanks for putting this together. It's easy enough to get the listings but I was having a more difficult time getting a listing's detail information

Charles Proxy is a decent tool to use for inspecting API calls for mobile apps (rather than HTML-based calls like web) https://www.charlesproxy.com/documentation/ios/ since it acts as a "man-in-the-middle" SSL root certificate so it can read all API requests, headers, etc. This makes it much easier to work backwards from what the iOS app is doing to better understand how to create an API wrapper for your own personal needs.

Note: this was for an anonymous session (no account signed up / logged in)

cURL equivalent (using Postman) with the minimal set of parameters needed to get a result:

curl --location --request GET 'https://api37.realtor.ca:443//Listing.svc/PropertyDetails?PropertyId=22054689&ApplicationId=37&CultureId=1&HashCode=0&ReferenceNumber=15418919'

That gives a response like:

{
    "ErrorCode": {
        "Id": 200,
        "Description": "Success - OK",
        "ProductName": "! Push to PR-Stage - Realtor API (Maintenance)^28858 [Monday, August 10, 2020 8:50:12 AM]",
        "Version": "1.0.7527.15915"
    },
    "HashCode": "1471583764",
    "Id": "22054689",
    "MlsNumber": "15418919",
    "PublicRemarks": "Bardagi.com/1209 Very nice 6plex located in the charming Laurier East district. Close to all the shops and restaurants of the dynamic Mont-Royal avenue. Less than 10 minutes walk from the Laurier metro station of the Laurier Park. Very nice neighborhood life! Beautiful income property very well maintained! (37473608)",
    "LastUpdated": "2020-07-17 1:02:37 PM",
    "Building": {
        "BathroomTotal": "1",
        "Bedrooms": "3",
        "SizeInterior": "5730 sqft",
        "StoriesTotal": "3",
        "Type": "Multi-Family",
        "UnitTotal": "6",
        "BasementDevelopment": "Finished",
        "BasementFeatures": "Six feet and over",
        "BasementType": "Full (Finished)",
        "ConstructedDate": "1915",
        "ConstructionStyleAttachment": "Semi-detached",
        "HalfBathTotal": "0",
        "HeatingFuel": "Electric",
        "Room": [
            {
                "Type": "Living room",
                "Width": "10 ft ,10 in",
                "Length": "13 ft ,4 in",
                "Level": "Second level",
                "Dimension": "13 ft ,4 in x 10 ft ,10 in"
            },
            {
                "Type": "Bedroom",
                "Width": "12 ft ,2 in",
                "Length": "9 ft ,5 in",
                "Level": "Second level",
                "Dimension": "9 ft ,5 in x 12 ft ,2 in"
            },
            {
                "Type": "Bedroom",
                "Width": "9 ft ,6 in",
                "Length": "9 ft ,4 in",
                "Level": "Second level",
                "Dimension": "9 ft ,4 in x 9 ft ,6 in"
            },
            {
                "Type": "Bedroom",
                "Width": "8 ft ,7 in",
                "Length": "16 ft ,9 in",
                "Level": "Second level",
                "Dimension": "16 ft ,9 in x 8 ft ,7 in"
            },
            {
                "Type": "Kitchen",
                "Width": "8 ft ,9 in",
                "Length": "7 ft ,5 in",
                "Level": "Second level",
                "Dimension": "7 ft ,5 in x 8 ft ,9 in"
            },
            {
                "Type": "Dinette",
                "Width": "9 ft ,3 in",
                "Length": "9 ft ,5 in",
                "Level": "Second level",
                "Dimension": "9 ft ,5 in x 9 ft ,3 in"
            },
            {
                "Type": "Bathroom",
                "Width": "4 ft",
                "Length": "9 ft ,9 in",
                "Level": "Second level",
                "Dimension": "9 ft ,9 in x 4 ft"
            },
            {
                "Type": "Living room",
                "Width": "11 ft ,1 in",
                "Length": "13 ft ,10 in",
                "Level": "Second level",
                "Dimension": "13 ft ,10 in x 11 ft ,1 in"
            },
            {
                "Type": "Bedroom",
                "Width": "10 ft ,2 in",
                "Length": "10 ft ,1 in",
                "Level": "Second level",
                "Dimension": "10 ft ,1 in x 10 ft ,2 in"
            },
            {
                "Type": "Bedroom",
                "Width": "8 ft ,10 in",
                "Length": "11 ft ,6 in",
                "Level": "Second level",
                "Dimension": "11 ft ,6 in x 8 ft ,10 in"
            },
            {
                "Type": "Kitchen",
                "Width": "8 ft ,10 in",
                "Length": "15 ft ,8 in",
                "Level": "Second level",
                "Dimension": "15 ft ,8 in x 8 ft ,10 in"
            },
            {
                "Type": "Dinette",
                "Width": "8 ft ,6 in",
                "Length": "10 ft ,1 in",
                "Level": "Second level",
                "Dimension": "10 ft ,1 in x 8 ft ,6 in"
            },
            {
                "Type": "Bathroom",
                "Width": "8 ft ,10 in",
                "Length": "11 ft ,6 in",
                "Level": "Second level",
                "Dimension": "11 ft ,6 in x 8 ft ,10 in"
            },
            {
                "Type": "Living room",
                "Width": "10 ft ,10 in",
                "Length": "13 ft ,7 in",
                "Level": "Third level",
                "Dimension": "13 ft ,7 in x 10 ft ,10 in"
            },
            {
                "Type": "Bedroom",
                "Width": "10 ft ,8 in",
                "Length": "9 ft ,4 in",
                "Level": "Third level",
                "Dimension": "9 ft ,4 in x 10 ft ,8 in"
            },
            {
                "Type": "Bedroom",
                "Width": "13 ft ,5 in",
                "Length": "9 ft ,6 in",
                "Level": "Third level",
                "Dimension": "9 ft ,6 in x 13 ft ,5 in"
            },
            {
                "Type": "Bedroom",
                "Width": "11 ft",
                "Length": "8 ft ,4 in",
                "Level": "Third level",
                "Dimension": "8 ft ,4 in x 11 ft"
            },
            {
                "Type": "Office",
                "Width": "10 ft ,1 in",
                "Length": "6 ft ,9 in",
                "Level": "Third level",
                "Dimension": "6 ft ,9 in x 10 ft ,1 in"
            },
            {
                "Type": "Kitchen",
                "Width": "12 ft",
                "Length": "11 ft ,5 in",
                "Level": "Third level",
                "Dimension": "11 ft ,5 in x 12 ft"
            },
            {
                "Type": "Bathroom",
                "Width": "5 ft ,4 in",
                "Length": "9 ft ,3 in",
                "Level": "Third level",
                "Dimension": "9 ft ,3 in x 5 ft ,4 in"
            },
            {
                "Type": "Living room",
                "Width": "10 ft ,10 in",
                "Length": "61 ft ,11 in",
                "Level": "Third level",
                "Dimension": "61 ft ,11 in x 10 ft ,10 in"
            },
            {
                "Type": "Bedroom",
                "Width": "10 ft ,2 in",
                "Length": "11 ft ,2 in",
                "Level": "Third level",
                "Dimension": "11 ft ,2 in x 10 ft ,2 in"
            },
            {
                "Type": "Bedroom",
                "Width": "10 ft ,11 in",
                "Length": "10 ft",
                "Level": "Third level",
                "Dimension": "10 ft x 10 ft ,11 in"
            },
            {
                "Type": "Bedroom",
                "Width": "11 ft",
                "Length": "8 ft ,4 in",
                "Level": "Third level",
                "Dimension": "8 ft ,4 in x 11 ft"
            },
            {
                "Type": "Office",
                "Width": "11 ft ,9 in",
                "Length": "6 ft ,10 in",
                "Level": "Third level",
                "Dimension": "6 ft ,10 in x 11 ft ,9 in"
            },
            {
                "Type": "Kitchen",
                "Width": "8 ft ,6 in",
                "Length": "11 ft ,7 in",
                "Level": "Third level",
                "Dimension": "11 ft ,7 in x 8 ft ,6 in"
            },
            {
                "Type": "Dinette",
                "Width": "8 ft ,8 in",
                "Length": "10 ft ,5 in",
                "Level": "Third level",
                "Dimension": "10 ft ,5 in x 8 ft ,8 in"
            },
            {
                "Type": "Bathroom",
                "Width": "4 ft ,11 in",
                "Length": "8 ft ,2 in",
                "Level": "Third level",
                "Dimension": "8 ft ,2 in x 4 ft ,11 in"
            },
            {
                "Type": "Bedroom",
                "Width": "10 ft ,9 in",
                "Length": "11 ft ,11 in",
                "Level": "Basement",
                "Dimension": "11 ft ,11 in x 10 ft ,9 in"
            },
            {
                "Type": "Family room",
                "Width": "13 ft ,5 in",
                "Length": "10 ft ,5 in",
                "Level": "Basement",
                "Dimension": "10 ft ,5 in x 13 ft ,5 in"
            },
            {
                "Type": "Family room",
                "Width": "11 ft ,2 in",
                "Length": "7 ft ,7 in",
                "Level": "Basement",
                "Dimension": "7 ft ,7 in x 11 ft ,2 in"
            },
            {
                "Type": "Bathroom",
                "Width": "7 ft",
                "Length": "5 ft ,5 in",
                "Level": "Basement",
                "Dimension": "5 ft ,5 in x 7 ft"
            },
            {
                "Type": "Laundry room",
                "Width": "7 ft",
                "Length": "5 ft ,4 in",
                "Level": "Basement",
                "Dimension": "5 ft ,4 in x 7 ft"
            },
            {
                "Type": "Family room",
                "Width": "14 ft ,4 in",
                "Length": "11 ft ,5 in",
                "Level": "Basement",
                "Dimension": "11 ft ,5 in x 14 ft ,4 in"
            },
            {
                "Type": "Bedroom",
                "Width": "11 ft ,8 in",
                "Length": "10 ft ,8 in",
                "Level": "Basement",
                "Dimension": "10 ft ,8 in x 11 ft ,8 in"
            },
            {
                "Type": "Office",
                "Width": "11 ft ,9 in",
                "Length": "14 ft ,8 in",
                "Level": "Basement",
                "Dimension": "14 ft ,8 in x 11 ft ,9 in"
            },
            {
                "Type": "Laundry room",
                "Width": "4 ft ,8 in",
                "Length": "5 ft ,5 in",
                "Level": "Basement",
                "Dimension": "5 ft ,5 in x 4 ft ,8 in"
            },
            {
                "Type": "Living room",
                "Width": "11 ft",
                "Length": "13 ft ,5 in",
                "Level": "Main level",
                "Dimension": "13 ft ,5 in x 11 ft"
            },
            {
                "Type": "Bedroom",
                "Width": "11 ft ,1 in",
                "Length": "12 ft ,10 in",
                "Level": "Main level",
                "Dimension": "12 ft ,10 in x 11 ft ,1 in"
            },
            {
                "Type": "Bedroom",
                "Width": "11 ft ,8 in",
                "Length": "13 ft",
                "Level": "Main level",
                "Dimension": "13 ft x 11 ft ,8 in"
            },
            {
                "Type": "Kitchen",
                "Width": "8 ft ,6 in",
                "Length": "7 ft ,2 in",
                "Level": "Main level",
                "Dimension": "7 ft ,2 in x 8 ft ,6 in"
            },
            {
                "Type": "Dinette",
                "Width": "8 ft ,7 in",
                "Length": "11 ft ,2 in",
                "Level": "Main level",
                "Dimension": "11 ft ,2 in x 8 ft ,7 in"
            },
            {
                "Type": "Bathroom",
                "Width": "9 ft ,11 in",
                "Length": "4 ft ,11 in",
                "Level": "Main level",
                "Dimension": "4 ft ,11 in x 9 ft ,11 in"
            },
            {
                "Type": "Living room",
                "Width": "11 ft ,2 in",
                "Length": "13 ft ,9 in",
                "Level": "Main level",
                "Dimension": "13 ft ,9 in x 11 ft ,2 in"
            },
            {
                "Type": "Bedroom",
                "Width": "14 ft ,11 in",
                "Length": "13 ft ,7 in",
                "Level": "Main level",
                "Dimension": "13 ft ,7 in x 14 ft ,11 in"
            },
            {
                "Type": "Bedroom",
                "Width": "8 ft ,11 in",
                "Length": "11 ft ,11 in",
                "Level": "Main level",
                "Dimension": "11 ft ,11 in x 8 ft ,11 in"
            },
            {
                "Type": "Kitchen",
                "Width": "8 ft ,1 in",
                "Length": "15 ft ,9 in",
                "Level": "Main level",
                "Dimension": "15 ft ,9 in x 8 ft ,1 in"
            },
            {
                "Type": "Dinette",
                "Width": "9 ft ,7 in",
                "Length": "10 ft ,4 in",
                "Level": "Main level",
                "Dimension": "10 ft ,4 in x 9 ft ,7 in"
            },
            {
                "Type": "Bathroom",
                "Width": "5 ft ,1 in",
                "Length": "8 ft ,1 in",
                "Level": "Main level",
                "Dimension": "8 ft ,1 in x 5 ft ,1 in"
            }
        ],
        "Water": "Municipal water",
        "DisplayAsYears": "0",
        "FireplacePresent": "",
        "BuiltIn": "1915"
    },
    "Land": {
        "SizeTotal": "2735 sqft",
        "Sewer": "Municipal sewage system"
    },
    "Individual": [
        {
            "IndividualID": 1440073,
            "Name": "Georges Bardagi",
            "Organization": {
                "OrganizationID": 69938,
                "Name": "RE/MAX DU CARTIER G.B.",
                "Logo": "https://cdn.realtor.ca/organization/en-CA/TS637305877570000000/lowres/1132738.jpg",
                "Address": {
                    "AddressText": "100 - 1290 Bernard Ouest |Outremont, Quebec H2V1V9"
                },
                "Phones": [
                    {
                        "PhoneType": "Telephone",
                        "PhoneNumber": "271-9895",
                        "AreaCode": "514",
                        "PhoneTypeId": "1"
                    },
                    {
                        "PhoneType": "Fax",
                        "PhoneNumber": "271-8800",
                        "AreaCode": "514",
                        "PhoneTypeId": "4"
                    }
                ],
                "Emails": [
                    {
                        "ContactId": "424697395"
                    }
                ],
                "Websites": [
                    {
                        "Website": "http://www.bardagi.com",
                        "WebsiteTypeId": "1"
                    }
                ],
                "OrganizationType": "Firm",
                "Designation": "Real Estate Agency",
                "HasEmail": true,
                "PermitFreetextEmail": true,
                "PermitShowListingLink": true,
                "RelativeDetailsURL": "/office/firm/69938/remax-du-cartier-gb-100-1290-bernard-ouest-outremont-quebec-h2v1v9",
                "PhotoLastupdate": "2020-07-17 1:02:37 PM"
            },
            "Phones": [
                {
                    "PhoneType": "Telephone",
                    "PhoneNumber": "271-9895",
                    "AreaCode": "514",
                    "PhoneTypeId": "1"
                }
            ],
            "Websites": [
                {
                    "Website": "http://www.bardagi.com",
                    "WebsiteTypeId": "1"
                }
            ],
            "Emails": [
                {
                    "ContactId": "421658289"
                }
            ],
            "Photo": "https://cdn.realtor.ca/individual/TS636840535200000000/lowres/1077368.jpg",
            "Position": "Certified Real Estate Broker",
            "PermitFreetextEmail": true,
            "FirstName": "Georges",
            "LastName": "Bardagi",
            "CorporationDisplayTypeId": "0",
            "PermitShowListingLink": true,
            "RelativeDetailsURL": "/agent/1440073/georges-bardagi-100---1290-bernard-ouest--outremont-quebec-h2v1v9",
            "AgentPhotoLastUpdated": "2019-01-25 22:52:00"
        }
    ],
    "Property": {
        "Price": "$2,795,000",
        "Type": "Multi-family",
        "Address": {
            "AddressText": "5106-5116 Rue Fabre|Montréal (Le Plateau-Mont-Royal), Quebec H2J3W5",
            "Longitude": "-73.583143",
            "Latitude": "45.534695",
            "Neighbourhood": "Le Plateau-Mont-Royal",
            "PermitShowAddress": true
        },
        "Photo": [
            {
                "SequenceId": "1",
                "HighResPath": "https://cdn.realtor.ca/listing/TS637293202500570000/reb5/highres/9/15418919_1.jpg",
                "MedResPath": "https://cdn.realtor.ca/listing/TS637293202500570000/reb5/medres/9/15418919_1.jpg",
                "LowResPath": "https://cdn.realtor.ca/listing/TS637293202500570000/reb5/lowres/9/15418919_1.jpg",
                "Description": "Frontage",
                "LastUpdated": "2020-07-02 8:57:30 PM"
            },
            {
                "SequenceId": "2",
                "HighResPath": "https://cdn.realtor.ca/listing/TS637293202501200000/reb5/highres/9/15418919_2.jpg",
                "MedResPath": "https://cdn.realtor.ca/listing/TS637293202501200000/reb5/medres/9/15418919_2.jpg",
                "LowResPath": "https://cdn.realtor.ca/listing/TS637293202501200000/reb5/lowres/9/15418919_2.jpg",
                "Description": "Frontage",
                "LastUpdated": "2020-07-02 8:57:30 PM"
            },
            {
                "SequenceId": "3",
                "HighResPath": "https://cdn.realtor.ca/listing/TS637293202501600000/reb5/highres/9/15418919_3.jpg",
                "MedResPath": "https://cdn.realtor.ca/listing/TS637293202501600000/reb5/medres/9/15418919_3.jpg",
                "LowResPath": "https://cdn.realtor.ca/listing/TS637293202501600000/reb5/lowres/9/15418919_3.jpg",
                "Description": "Living room",
                "LastUpdated": "2020-07-02 8:57:30 PM"
            },
            {
                "SequenceId": "4",
                "HighResPath": "https://cdn.realtor.ca/listing/TS637293202501670000/reb5/highres/9/15418919_4.jpg",
                "MedResPath": "https://cdn.realtor.ca/listing/TS637293202501670000/reb5/medres/9/15418919_4.jpg",
                "LowResPath": "https://cdn.realtor.ca/listing/TS637293202501670000/reb5/lowres/9/15418919_4.jpg",
                "Description": "Dinette",
                "LastUpdated": "2020-07-02 8:57:30 PM"
            },
            {
                "SequenceId": "5",
                "HighResPath": "https://cdn.realtor.ca/listing/TS637293202501770000/reb5/highres/9/15418919_5.jpg",
                "MedResPath": "https://cdn.realtor.ca/listing/TS637293202501770000/reb5/medres/9/15418919_5.jpg",
                "LowResPath": "https://cdn.realtor.ca/listing/TS637293202501770000/reb5/lowres/9/15418919_5.jpg",
                "Description": "Kitchen",
                "LastUpdated": "2020-07-02 8:57:30 PM"
            },
            {
                "SequenceId": "6",
                "HighResPath": "https://cdn.realtor.ca/listing/TS637293202501870000/reb5/highres/9/15418919_6.jpg",
                "MedResPath": "https://cdn.realtor.ca/listing/TS637293202501870000/reb5/medres/9/15418919_6.jpg",
                "LowResPath": "https://cdn.realtor.ca/listing/TS637293202501870000/reb5/lowres/9/15418919_6.jpg",
                "Description": "Bedroom",
                "LastUpdated": "2020-07-02 8:57:30 PM"
            },
            {
                "SequenceId": "7",
                "HighResPath": "https://cdn.realtor.ca/listing/TS637293202501900000/reb5/highres/9/15418919_7.jpg",
                "MedResPath": "https://cdn.realtor.ca/listing/TS637293202501900000/reb5/medres/9/15418919_7.jpg",
                "LowResPath": "https://cdn.realtor.ca/listing/TS637293202501900000/reb5/lowres/9/15418919_7.jpg",
                "Description": "Bedroom",
                "LastUpdated": "2020-07-02 8:57:30 PM"
            },
            {
                "SequenceId": "8",
                "HighResPath": "https://cdn.realtor.ca/listing/TS637293202501970000/reb5/highres/9/15418919_8.jpg",
                "MedResPath": "https://cdn.realtor.ca/listing/TS637293202501970000/reb5/medres/9/15418919_8.jpg",
                "LowResPath": "https://cdn.realtor.ca/listing/TS637293202501970000/reb5/lowres/9/15418919_8.jpg",
                "Description": "Bedroom",
                "LastUpdated": "2020-07-02 8:57:30 PM"
            },
            {
                "SequenceId": "9",
                "HighResPath": "https://cdn.realtor.ca/listing/TS637293202502070000/reb5/highres/9/15418919_9.jpg",
                "MedResPath": "https://cdn.realtor.ca/listing/TS637293202502070000/reb5/medres/9/15418919_9.jpg",
                "LowResPath": "https://cdn.realtor.ca/listing/TS637293202502070000/reb5/lowres/9/15418919_9.jpg",
                "Description": "Living room",
                "LastUpdated": "2020-07-02 8:57:30 PM"
            },
            {
                "SequenceId": "10",
                "HighResPath": "https://cdn.realtor.ca/listing/TS637293202500600000/reb5/highres/9/15418919_10.jpg",
                "MedResPath": "https://cdn.realtor.ca/listing/TS637293202500600000/reb5/medres/9/15418919_10.jpg",
                "LowResPath": "https://cdn.realtor.ca/listing/TS637293202500600000/reb5/lowres/9/15418919_10.jpg",
                "LastUpdated": "2020-07-02 8:57:30 PM"
            },
            {
                "SequenceId": "11",
                "HighResPath": "https://cdn.realtor.ca/listing/TS637293202500700000/reb5/highres/9/15418919_11.jpg",
                "MedResPath": "https://cdn.realtor.ca/listing/TS637293202500700000/reb5/medres/9/15418919_11.jpg",
                "LowResPath": "https://cdn.realtor.ca/listing/TS637293202500700000/reb5/lowres/9/15418919_11.jpg",
                "LastUpdated": "2020-07-02 8:57:30 PM"
            },
            {
                "SequenceId": "12",
                "HighResPath": "https://cdn.realtor.ca/listing/TS637293202500700000/reb5/highres/9/15418919_12.jpg",
                "MedResPath": "https://cdn.realtor.ca/listing/TS637293202500700000/reb5/medres/9/15418919_12.jpg",
                "LowResPath": "https://cdn.realtor.ca/listing/TS637293202500700000/reb5/lowres/9/15418919_12.jpg",
                "LastUpdated": "2020-07-02 8:57:30 PM"
            },
            {
                "SequenceId": "13",
                "HighResPath": "https://cdn.realtor.ca/listing/TS637293202500770000/reb5/highres/9/15418919_13.jpg",
                "MedResPath": "https://cdn.realtor.ca/listing/TS637293202500770000/reb5/medres/9/15418919_13.jpg",
                "LowResPath": "https://cdn.realtor.ca/listing/TS637293202500770000/reb5/lowres/9/15418919_13.jpg",
                "LastUpdated": "2020-07-02 8:57:30 PM"
            },
            {
                "SequenceId": "14",
                "HighResPath": "https://cdn.realtor.ca/listing/TS637293202500870000/reb5/highres/9/15418919_14.jpg",
                "MedResPath": "https://cdn.realtor.ca/listing/TS637293202500870000/reb5/medres/9/15418919_14.jpg",
                "LowResPath": "https://cdn.realtor.ca/listing/TS637293202500870000/reb5/lowres/9/15418919_14.jpg",
                "LastUpdated": "2020-07-02 8:57:30 PM"
            },
            {
                "SequenceId": "15",
                "HighResPath": "https://cdn.realtor.ca/listing/TS637293202500900000/reb5/highres/9/15418919_15.jpg",
                "MedResPath": "https://cdn.realtor.ca/listing/TS637293202500900000/reb5/medres/9/15418919_15.jpg",
                "LowResPath": "https://cdn.realtor.ca/listing/TS637293202500900000/reb5/lowres/9/15418919_15.jpg",
                "LastUpdated": "2020-07-02 8:57:30 PM"
            },
            {
                "SequenceId": "16",
                "HighResPath": "https://cdn.realtor.ca/listing/TS637293202500970000/reb5/highres/9/15418919_16.jpg",
                "MedResPath": "https://cdn.realtor.ca/listing/TS637293202500970000/reb5/medres/9/15418919_16.jpg",
                "LowResPath": "https://cdn.realtor.ca/listing/TS637293202500970000/reb5/lowres/9/15418919_16.jpg",
                "LastUpdated": "2020-07-02 8:57:30 PM"
            },
            {
                "SequenceId": "17",
                "HighResPath": "https://cdn.realtor.ca/listing/TS637293202501000000/reb5/highres/9/15418919_17.jpg",
                "MedResPath": "https://cdn.realtor.ca/listing/TS637293202501000000/reb5/medres/9/15418919_17.jpg",
                "LowResPath": "https://cdn.realtor.ca/listing/TS637293202501000000/reb5/lowres/9/15418919_17.jpg",
                "LastUpdated": "2020-07-02 8:57:30 PM"
            },
            {
                "SequenceId": "18",
                "HighResPath": "https://cdn.realtor.ca/listing/TS637293202501070000/reb5/highres/9/15418919_18.jpg",
                "MedResPath": "https://cdn.realtor.ca/listing/TS637293202501070000/reb5/medres/9/15418919_18.jpg",
                "LowResPath": "https://cdn.realtor.ca/listing/TS637293202501070000/reb5/lowres/9/15418919_18.jpg",
                "LastUpdated": "2020-07-02 8:57:30 PM"
            },
            {
                "SequenceId": "19",
                "HighResPath": "https://cdn.realtor.ca/listing/TS637293202501100000/reb5/highres/9/15418919_19.jpg",
                "MedResPath": "https://cdn.realtor.ca/listing/TS637293202501100000/reb5/medres/9/15418919_19.jpg",
                "LowResPath": "https://cdn.realtor.ca/listing/TS637293202501100000/reb5/lowres/9/15418919_19.jpg",
                "LastUpdated": "2020-07-02 8:57:30 PM"
            },
            {
                "SequenceId": "20",
                "HighResPath": "https://cdn.realtor.ca/listing/TS637293202501300000/reb5/highres/9/15418919_20.jpg",
                "MedResPath": "https://cdn.realtor.ca/listing/TS637293202501300000/reb5/medres/9/15418919_20.jpg",
                "LowResPath": "https://cdn.realtor.ca/listing/TS637293202501300000/reb5/lowres/9/15418919_20.jpg",
                "LastUpdated": "2020-07-02 8:57:30 PM"
            },
            {
                "SequenceId": "21",
                "HighResPath": "https://cdn.realtor.ca/listing/TS637293202501370000/reb5/highres/9/15418919_21.jpg",
                "MedResPath": "https://cdn.realtor.ca/listing/TS637293202501370000/reb5/medres/9/15418919_21.jpg",
                "LowResPath": "https://cdn.realtor.ca/listing/TS637293202501370000/reb5/lowres/9/15418919_21.jpg",
                "LastUpdated": "2020-07-02 8:57:30 PM"
            },
            {
                "SequenceId": "22",
                "HighResPath": "https://cdn.realtor.ca/listing/TS637293202501400000/reb5/highres/9/15418919_22.jpg",
                "MedResPath": "https://cdn.realtor.ca/listing/TS637293202501400000/reb5/medres/9/15418919_22.jpg",
                "LowResPath": "https://cdn.realtor.ca/listing/TS637293202501400000/reb5/lowres/9/15418919_22.jpg",
                "LastUpdated": "2020-07-02 8:57:30 PM"
            },
            {
                "SequenceId": "23",
                "HighResPath": "https://cdn.realtor.ca/listing/TS637293202501470000/reb5/highres/9/15418919_23.jpg",
                "MedResPath": "https://cdn.realtor.ca/listing/TS637293202501470000/reb5/medres/9/15418919_23.jpg",
                "LowResPath": "https://cdn.realtor.ca/listing/TS637293202501470000/reb5/lowres/9/15418919_23.jpg",
                "LastUpdated": "2020-07-02 8:57:30 PM"
            },
            {
                "SequenceId": "24",
                "HighResPath": "https://cdn.realtor.ca/listing/TS637293202501570000/reb5/highres/9/15418919_24.jpg",
                "MedResPath": "https://cdn.realtor.ca/listing/TS637293202501570000/reb5/medres/9/15418919_24.jpg",
                "LowResPath": "https://cdn.realtor.ca/listing/TS637293202501570000/reb5/lowres/9/15418919_24.jpg",
                "LastUpdated": "2020-07-02 8:57:30 PM"
            }
        ],
        "TypeId": "310",
        "FarmType": "Other",
        "ZoningType": "Residential",
        "AmmenitiesNearBy": "CEGEP, Park, Schools, Public Transit, University",
        "Features": "Sliding windows",
        "TransactionType": "For sale"
    },
    "AlternateURL": {
        "DetailsLink": "http://passerelle.centris.ca/redirect.aspx?CodeDest=DUCARTIERGB&NoMLS=15418919&Lang=E",
        "VideoLink": "https://youtu.be/bLkwfQ9uomY"
    },
    "UploadedBy": "Quebec Professional Association of Real Estate Brokers",
    "Business": {
        "BathroomTotal": "1",
        "Bedrooms": "3",
        "SizeInterior": "5730 sqft",
        "StoriesTotal": "3",
        "Type": "Multi-Family",
        "UnitTotal": "6"
    }
}

Full dump of Charles response:

[
   {
      "status":"COMPLETE",
      "method":"GET",
      "protocolVersion":"HTTP/1.1",
      "scheme":"https",
      "host":"api37.realtor.ca",
      "actualPort":443,
      "path":"/Listing.svc/PropertyDetails",
      "query":"ApplicationId=37&CultureId=1&HashCode=0&PreferedMeasurementUnit=1&PropertyId=22054689&ReferenceNumber=15418919",
      "tunnel":false,
      "keptAlive":true,
      "webSocket":false,
      "remoteAddress":"api37.realtor.ca/23.100.82.11",
      "clientAddress":"198.18.72.253/198.18.72.253",
      "times":{
         "start":"2020-08-15T13:33:22.259-04:00",
         "requestBegin":"2020-08-15T13:33:22.282-04:00",
         "requestComplete":"2020-08-15T13:33:22.289-04:00",
         "responseBegin":"2020-08-15T13:33:22.466-04:00",
         "end":"2020-08-15T13:33:22.529-04:00"
      },
      "durations":{

      },
      "totalSize":"5571",
      "ssl":{
         "protocol":"TLSv1.2",
         "cipherSuite":"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"
      },
      "request":{
         "sizes":{
            "body":"0",
            "headers":664
         },
         "mimeType":null,
         "charset":null,
         "contentEncoding":null,
         "header":{
            "firstLine":"GET /Listing.svc/PropertyDetails?ApplicationId=37&CultureId=1&HashCode=0&PreferedMeasurementUnit=1&PropertyId=22054689&ReferenceNumber=15418919 HTTP/1.1",
            "headers":[
               {
                  "name":"Host",
                  "value":"api37.realtor.ca"
               },
               {
                  "name":"Accept",
                  "value":"application/json"
               },
               {
                  "name":"X-CREA-App-ID",
                  "value":"37"
               },
               {
                  "name":"X-CREA-App-Token",
                  "value":"937ghfd342few2rnbvhgfhjug"
               },
               {
                  "name":"X-CREA-Max-Record",
                  "value":"500"
               },
               {
                  "name":"X-CREA-Device-Platform",
                  "value":"iPhone"
               },
               {
                  "name":"Accept-Language",
                  "value":"en;q=1"
               },
               {
                  "name":"X-CREA-Device-ID",
                  "value":"077406F7-811A-4F07-A4EB-BA58A17950D4"
               },
               {
                  "name":"User-Agent",
                  "value":"REALTOR/3.2.12 (iPhone; iOS 13.4.1; Scale/2.00)"
               },
               {
                  "name":"Accept-Encoding",
                  "value":"gzip, deflate, br"
               },
               {
                  "name":"Connection",
                  "value":"keep-alive"
               },
               {
                  "name":"X-CREA-Max-RecordPerPage",
                  "value":"200"
               },
               {
                  "name":"X-CREA-API-Version",
                  "value":"1.0"
               },
               {
                  "name":"X-CREA-App-Version",
                  "value":"3.2.12"
               },
               {
                  "name":"Cookie",
                  "value":"ASP.NET_SessionId=jxjtvae3ts5zoxiacwemchb1"
               }
            ]
         }
      },
      "response":{
         "sizes":{
            "body":"4479",
            "headers":428
         },
         "mimeType":"application/json",
         "charset":"utf-8",
         "contentEncoding":"gzip",
         "header":{
            "firstLine":"HTTP/1.1 200 OK",
            "headers":[
               {
                  "name":"Cache-Control",
                  "value":"private"
               },
               {
                  "name":"Content-Length",
                  "value":"4479"
               },
               {
                  "name":"Content-Type",
                  "value":"application/json; charset=utf-8"
               },
               {
                  "name":"Content-Encoding",
                  "value":"gzip"
               },
               {
                  "name":"Vary",
                  "value":"Accept-Encoding"
               },
               {
                  "name":"Server",
                  "value":"Microsoft-IIS/10.0"
               },
               {
                  "name":"X-AspNet-Version",
                  "value":"4.0.30319"
               },
               {
                  "name":"Request-Context",
                  "value":"appId=cid-v1:bfc3c1b2-9e1b-437e-9616-7d1636843cb5"
               },
               {
                  "name":"Access-Control-Expose-Headers",
                  "value":"Request-Context"
               },
               {
                  "name":"X-Powered-By",
                  "value":"ASP.NET"
               },
               {
                  "name":"Arr-Disable-Session-Affinity",
                  "value":"true"
               },
               {
                  "name":"Date",
                  "value":"Sat, 15 Aug 2020 17:33:22 GMT"
               }
            ]
         },
         "body":{
            "encoding":"base64",
            "encoded":"H4sIAAAAAAAEAO29B2AcSZYlJi9tynt/SvVK1+B0oQiAYBMk2JBAEOzBiM3mkuwdaUcjKasqgcplVmVdZhZAzO2dvPfee++999577733ujudTif33/8/XGZkAWz2zkrayZ4hgKrIHz9+fB8/In7xR6d1XdUn1Sz/6NEv/uhs9tGjvZ2d0UdP82ZaF6u2qJYfPfro9Xo6zZsm3U6//L0+Gn30sq5m62n7IlvQSx/9runLdTNP2yp9+Wr7dZtd5NTuVZ6VbVWnxy/P0q0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61cnxqzdnp68+f/ILX1RfPH/9mSHvL3yeLS8+OyW0fpKoUHndyDReV+t2PZ7kv+/dyfO3V+c/8XBdLX4f4PnVqqyyWT5jEv3EOp/k0/RlXZ3nTUMDy8r0uGmqaZFhmGl1nr4iXkhPm5ZGlj6pq7dEK+r0ybqhNfmGCPWLP3pCLIQc/5uqpakgJxTfE+fRR/T9R1Bbr4sf5GdLIlBR1fTR/Xt743v39vfSBUzJa2I1mjfzOtorfb9Yl22x/SxbFCVmh6aqNa0+/eiX/JL/BzwaZshRRwAA"
         }
      }
   }
]
iwasrobbed commented 4 years ago

Just as a follow-up, the same technique works for Centris and other apps. Centris' API is a lot more cryptic with the key naming and I'm not sure if it has any additional inventory

Froren commented 4 years ago

hey thanks for the tip @iwasrobbed! I've known about charles but I didn't realize the implications for testing web vs mobile endpoints. Also had no idea that realtor.ca had mobile apps.

This listing information is pretty useful, I believe @younglee327 was also interested in this.

iwasrobbed commented 4 years ago

It's definitely much, much easier to work backwards from mobile apps versus trying to find endpoints from web apps / Chrome inspector. Scraping HTML is pretty difficult as well so it's easier to just use the same JSON API that their apps are using (I'm building a mac app for personal use)

Have fun, gonna close out this issue. Thanks again for the initial work

scd31 commented 4 years ago

More info on the required values:

ApplicationId - must be 37. I assume this identifies that it's an app request

PropertyId - the ID of the ad, as returned from the search API(or as found in the URL)

ReferenceId - the MLS number

The other values are the same as if you make a request to the search API