-
Notifications
You must be signed in to change notification settings - Fork 1
sales_reference_2
robert-valueguard edited this page Mar 9, 2026
·
22 revisions
The code below gives an example of how to use the client to get sales references.
import valueguard
vgClient = valueguard.Client()
vgClient.authenticate("<username>", "<password>")
result = vgClient.sales_reference(search_criteria={
"living_area_reference": 81,
"rooms_reference": 2,
"advertising_days_min": 0,
"advertising_days_max": 500,
"home_type": ["apartment", "house"],
"construction_year_min": 1850,
"construction_year_max": 2024,
"contract_date_start": "1850-01-01",
"contract_date_end": "2024-08-05",
"distance_center": False,
"error_code": 0,
"excluded_ids": [
"f65019c6-0ff4-11ef-a230-0242ac110006",
"e14b864c-93ce-11ee-90t5-0242ac110002"
],
"limit": 115,
"living_area_min": 0,
"living_area_max": 500,
"is_close_to_population_centre": False,
"is_new_construction": False,
"monthly_fee_min": 0,
"monthly_fee_max": 12000,
"new_constructions_conversions": False,
"orgNr": False,
"price_min": 0,
"price_max": 12000000,
"rooms_min": 0,
"rooms_max": 10,
"registered_date_start": "1850-01-01",
"registered_date_end": "2024-08-05",
"sales_reference_selected_sale_ids": None,
"sales_reference_excluded_sale_ids": None,
"wgs84lat": "59.85856380000001",
"wgs84lon": "17.6389267",
"distance_weight": 50,
"polygons": {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "MultiPolygon",
"crs": {
"type": "name",
"properties": {
"name": "EPSG:3021"
}
},
"coordinates": [
[[
[1603359.765, 6639251.261],
[1603673.096, 6639545.17],
[1603330.038, 6639721.021],
[1603000.557, 6639454.841],
[1603359.765, 6639251.261]
]]
]
}
}
]
}
})
print(result)| Field name | Description | Example |
|---|---|---|
| id | sale id | ef0d6559-0358-11ef-b390-0242ac110006 |
| street | Street name in address | 1:a villagatan |
| number | Street number in address | 1 |
| letter | Letter after street number in address, if any | A |
| rooms | Number of rooms for areas above 7sqm, excluding kitchen and bathroom |
5 |
| living_area | Area of residence in sqm | 137 |
| floor | The floor of the residence | 2 |
| floors | The highest floor on the address | 2 |
| construction_year | Year it was built | 1920 |
| home_type | Type of residence: apartment, house, plot, terraced_house, townhouse | apartment |
| plot_area | Area of the plot belonging to the residence in sqm | 896 |
| sold_price | Price the property was sold for | 1900000 |
| monthly_fee | Monthly fee | 3654 |
| rt90x | X-coordinate (longitude) from RT90. a Swedish positioning system by LMV used before 2007 |
6586700.0 |
| rt90y | Y-coordinate (latitude) from RT90. a Swedish positioning system by LMV used before 2007 |
1367905.0 |
| recounted_price | Recounted price to current value | 2300000 |
| contract_date | The day the sales contract was signed for the object | 2018-03-12 |
| relevance | relevance score on the sold residence, lower is better | 0.32 |
| own_sale | if the sale is from the same real estate agency as the logged-in user. null = No real estate agency set True = From the same real estate agency False = Not from the same real estate agency |
True |
| recounted_price_sqm | The recalculated price per square meter | 45000 |
| taxation_value | The official property value assessed by the authorities, usually for tax purposes. | 2500000 |
| taxation_year | The year when the property's tax assessment was last conducted. | 2023 |
| property_unit_designation | Old Land Registry designation for a piece of property | Huddinge Lillsjön 4:19 |
| ownership_type | The type of ownership for the property: co_operative_apartment, property_rights, site_leasehold, lease | co_operative_apartment |
| owner_name | The name of the BRF of the property. | "BRF Uppsala 2" |
| owner_id | The organisation number of the BRF | "717600-8143" |
| allabrf_url | URL to the "AllaBrf" page, a Swedish website that provides detailed information about housing associations. | "https://www.allabrf.se/association/123" |
| allabolag_url | URL to the "AllaBolag" page, a Swedish website that provides business information about companies, including housing associations. | "https://www.allabolag.se/bolag/123" |
| shore_distance_type | The classification of the property's distance to the shore or waterfront. | 4 |
| shore_distance_min | ||
| shore_distance_max | ||
| water_sewerage_type | The type of water and sewerage system available for the property | 11 |
| alteration_year | The year when significant alterations or renovations were made to the property. | 2018 |
| standard_points | A scoring system indicating the standard or quality level of the property, usually based on factors like condition, age, and amenities. | 75 |
| leasehold_fee | The annual fee paid by the property owner for leasehold land, if applicable. | 10000 |
| subdivision_type | FASTFOR in the Land Registry. Indicates whether the property can be split in two or otherwise subdivided. | 02 |
| ad_registered_date | The date when the property advertisement was first registered or posted online. | "2024-07-01" |
| ad_delete_date | The date when the property advertisement was removed or taken down. | "2024-08-01" |
| ad_advertising_days | The total number of days the property advertisement remained online or on the market. | 30 |
| ad_price | The asking price listed in the property advertisement. | 3000000 |
| ad_price_sqm | The asking price per square meter listed in the property advertisement. | 50000 |
| prospect_url | URL to the property's prospect or detailed information PDF. | "https://api.valueguard.se/v0/ad/pdf/123" |
| price_sqm | The final sale price per square meter of the property after the transaction is completed. | 48000 |
| price_taxation_ratio | The ratio between the property's sale price and its assessed tax value. | 1.2 |
| monthly_fee_sqm | The monthly association fee per square meter for properties like condominiums or cooperatives. | 5000 |
| source | The origin or data source of the property information. M = Data from the real estate agency. L = Data from Lantmäteriet. ML = combination of data from the real estate agency and Lantmäteriet | M |
| firm | The name of the real estate agency that listed the property advertisement. | "Real Estate Agency AB" |
| leasehold_period | The duration or term of the leasehold agreement, if applicable. | 10 |
| distance | The measured distance in meters from the property to a the reference object. | 500 |
| Field name | Description | Example |
|---|---|---|
| id | Id of the summary | 324234 |
| average_rooms | Average amount of rooms for all objects | 3 |
| average_living_area | Average living area in sqm for all objects | 72 |
| average_ancillary_area | Average ancillary area in sqm (not part of the primary building area) for all objects | 15 |
| average_construction_year | Average construction year for all objects | 1985 |
| average_price | Average price for all objects | 2100000 |
| average_price_today | Average price of all objects after indexation | 2600000 |
| average_contract_date | average time since the objects where sold | 3.4 years |
| average_price_sqm | Average price per square meter for all objects | 45 |
| average_plot_area | Average plot area for homes in m2, where applicable | 950 |
| average_taxation_value | Average taxation value of objects, set by the Swedish Tax Agency | 3500000 |
| average_taxation_year | Average time since tax assessment | 1.2 years |
| average_price_taxation_ratio | The average ratio between the sale price and assessed tax values for all objects. | 1.2 |
| average_ad_delete_date | Average time since shown ads where deleted | 2.6 years |
| average_ad_advertising_days | Average time shown ads spent on market | 21 |
| average_ad_price | Average ad price for all objects | 3500000 |
| average_ad_price_sqm | Average ad price per square meter for all objects | 49 000 |
| average_leasehold_fee | The average of annual fees for all objects paid by the property owner for leasehold land, if applicable. | 10000 |
| average_leasehold_period | The average duration or term of the leasehold agreement, where applicable. | 11 |
| average_monthly_fee | Average monthly fee for all objects | 2300 |
| average_ad_registered_date | Average registered date for all ads | "2024-02-02" |
| average_monthly_fee_sqm | Average monthly fee per sqm for all objects | 45 |
| average_distance | Average distance between all objects in meters | 28 |
| Field name | Description | Example |
|---|---|---|
| living_area_reference | Area of residence in sqm | 78 |
| wgs84lat | Y-coordinate (latitude) from WGS84. a global positioning system |
59.864908174031974 |
| wgs84lon | X-coordinate (longitude) from WGS84. a global positioning system |
17.648463519218435 |
| floor_reference | The floor of this particular residence | 3 |
| floors_reference | The highest floor on the address | 4 |
| rooms_reference | Number of rooms | 4 |
| construction_year_reference | Year it was built | 1976 |
| monthly_fee_reference | Monthly fee | 6000 |
| use_fpr_data | Use data from fastighetsprisregistret | False |
| Field name | Description | Example |
|---|---|---|
| home_type | List of form of ownership of residence | [apartment, house, farm, plot, terraced_house, townhouse] |
| ownership_type | List of type of ownership of residence | [co_operative_apartment, lease, property_rights, site_leasehold, unknown] |
| price_min | Lowest allowed price | 1900000 |
| price_max | Highest allowed price | 2900000 |
| living_area_min | Lowest allowed area of residence in sqm | 78 |
| living_area_max | Highest allowed area of residence in sqm | 88 |
| rooms_min | Lowest allowed number of rooms | 3 |
| rooms_max | Highest allowed number of rooms | 4 |
| construction_year_min | Earliest allowed year when the building was built | 1956 |
| construction_year_max | Latest allowed year when the building was built | 1986 |
| ad_advertising_days_min | Lowest amount of days the ad is allowed to have been active | 10 |
| ad_advertising_days_max | Highest amount of days the ad is allowed to have been active | 30 |
| error_code | 1 = suspected error in data 0 = no suspected error in data |
0 |
| is_close_to_population_centre | If the property needs to be in proximity to population centers. | 0 |
| is_new_construction | Show obejcts that are likely new construction. | 0 |
| excluded_ids | list of sales that have been filtered out | ["f840b503-7b97-11ef-b390-0242ac110006", "f840d718-0075-11ed-80f2-0242ac110002", "f840ff7e-7b97-11ef-b390-0242ac110006"] |
| limit | Maximum number of responses | 20 |
| Polygons | GeoJSON format for the search region | View Example |
Here is a simple example of a GeoJSON format that can be used for filtering.
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[17.5288, 59.7500],
[17.8094, 59.7500],
[17.8094, 60.0000],
[17.5288, 60.0000],
[17.5288, 59.7500]
]
]
},
"properties": {}
}
]
}{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "MultiPolygon",
"coordinates": [
[
[
[17.638927, 59.858562],
[17.641931, 59.858562],
[17.641931, 59.860562],
[17.638927, 59.860562],
[17.638927, 59.858562]
]
],
[
[
[17.650927, 59.857562],
[17.653931, 59.857562],
[17.653931, 59.859562],
[17.650927, 59.859562],
[17.650927, 59.857562]
]
]
]
},
"properties": {}
}
]
}Reflecting importance in the reference sales search, between 0 to 1000
| Field Name | Description | Default | Example |
|---|---|---|---|
| contract_date_weight | Weight assigned to the contract date. | 500 | 900 |
| living_area_weight | Weight given to the living area. | 500 | 500 |
| construction_year_weight | Weight allocated to the year of construction. | 500 | 350 |
| monthly_fee_weight | Weight for the monthly fee. | 500 | 600 |
| floor_weight | Weight of the property's floor level. | 500 | 500 |
| floors_weight | Weight for the total number of floors in the building. | 500 | 400 |
| rooms_weight | Weight assigned to the number of rooms. | 500 | 700 |
| population_center_weight | Weight for the property's proximity to population centers. | 500 | 500 |
| distance_weight | Weight for the distance to the reference sale. | 500 | 800 |
curl --location 'https://api-prod.valueguard.se/v1/sales/reference?access_token=<ACCESS_TOKEN>' \
-site' \
--header 'TE: trailers' \
--data '{"living_area_reference":81,"rooms_reference":2,"advertising_days_min":0,"advertising_days_max":500,"home_type":["apartment","house"],"construction_year_min":1850,"construction_year_max":2024,"contract_date_start":"1850-01-01","contract_date_end":"2024-08-05","error_code":0,"limit":15,"living_area_min":0,"living_area_max":500,"monthly_fee_min":0,"monthly_fee_max":12000,"new_constructions_conversions":false,price_min":0,"price_max":12000000,"rooms_min":0,"rooms_max":10,"registered_date_start":"1850-01-01","registered_date_end":"2024-08-05","selected_ids":null,"excluded_ids":null,"wgs84lat":"59.85856380000001","wgs84lon":"17.6389267"}'- General description
- Residential Registry
- Residential Registry Markups
- Residential Registry Valuations
- General description
- Index normalized
- Index definitions*
- Publishing calendar
- Best index
- Index recount
- Index volume
- General description
- Area
- Area polygon
- Area category
- Area information
- Area information field
- Area information tag
- Area information dates
- Area map
*= only for internal use