Skip to content

ads reference

robert-valueguard edited this page May 22, 2024 · 33 revisions

Get ads reference

The code below gives an example of how to use the client to get ads references.

import valueguard

vgClient = valueguard.Client()
vgClient.authenticate("<username>", "<password>")


print(vgClient.ads_reference(search_criteria={
    "category":"apartment",
    "living_area_reference":"78",
    "wgs84lat":"59.864908174031974",
    "wgs84lon":"17.648463519218435"
}))

Field list

Field name Description Example
id Ad id 324234
residential_registry_id Residential registry id unique id (serial number) for all residences
source: Valueguard
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 5
living_area Area of residence in sqm 137
construction_year Year it was built 1920
ancillary_area Ancillary area in sqm, not part of the primary building area 23
category Apartment for apartments, house for detached houses, town houses etc. apartment
price Last price on the ad 1900000
monthly_fee Monthly fee 3654
error_code 1 = suspected error in data
0 = no suspected error in data
0
firm Firm notar
active That the ad is currently active True
has_pdf If the ad has and pdf snapshot True
registered_date When the ad was registered 2012-03-23
url Url of ad https://webpage.se/ad/2
rt90x X-coordinate (longitude) from RT90.
a Swedish positioning system by LMV used before 2007
6586700
rt90y Y-coordinate (latitude) from RT90.
a Swedish positioning system by LMV used before 2007
1367905

Search criteria fields

Reference object

Field name Description Example
registered_date_reference When the ad was registered 2012-03-23
price_reference Last price on the ad 1900000
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
ancillary_area_reference Ancillary area in sqm, not part of the primary building area 23
construction_year_reference Year it was built 1976
monthly_fee_reference Monthly fee 6000

Ad filter

Field name Description Example
category Category of residence [apartment]
ownership_type List of form of ownership of residence [co_operative, property_right]
registered_date_min Earliest date when the ad can be registered 2022-03-23
registered_date_max Latest date when the ad can be registered 2023-03-23
price_min Lowest allowed price on the ad 1900000
price_max Highest allowed price on the ad 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 nubmer of rooms 3
rooms_max Highest allowed nubmer 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
advertising_days_min Lowest amount of days the ad is allowed to have been active 10
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_constructions_conversions Show obejcts that are likely new constructions and conversions. 0

Weights

Reflecting importance in the reference ads search, between 0 to 1000

Field Name Description Default Example
registered_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
ancillary_area_weight Weight assigned to the ancillary_area. 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 ad. 500 800

Raw request

Get

curl https://api.valueguard.se/v1/ads/reference?access_token={access_token}&category={category}&living_area_reference={floor_area_reference}&wgs84lat={wgs84lat}&wgs84lon={wgs84lon}
Clone this wiki locally