Ad

Description:

The ad resource allows you to get all available data on one specific classified ad. The equivalent on www.finn.no is the well known ad-page.

Location:

An ad can be found by using the f:template element in the ad workspace in the Service Document:

<workspace>
    <atom:title>ad</atom:title>
    <f:template href="https://api.finn.no/iad/ad/{id}" rel="f:ad" />
</workspace>

The f:template element is a URI template formatted according to RFC6570. This approach is convenient if you only know the ad-id and not the ad-type. It will return 301 Moved Permanently, please follow the redirect to the final resource and cache the redirect if you can.

Most commonly you will simply follow the link identified by the rel="self" in the search resource entry element:

<entry>
    ...
    <link href="https://cache.api.finn.no/iad/ad/car-used-sale/12345678" rel="self" />
    ...
</entry>

Methods:

GET
HEAD

Parameters:

No parameters available.

Parsing the data:

The search entry element contain some basic data on the ad. By navigating the rel="self" resource, you'll get all available data. Let's compare the data. First the search entry:

<finn:adata model="https://cache.api.finn.no/iad/ad/model/bap">
    <finn:field name="category">
        <finn:field name="main" value="Antikviteter og kunst" />
            <finn:field name="sub" value="Kunst" />
        </finn:field>
    <finn:price name="main" value="1500" />
</finn:adata>

And now the ad resource, which is an Atom entry, without the Feed wrapping it:

<media:content height="800" medium="image" width="600" url="http://rickroll.com/rick.jpg" type="image/jpeg">
    <media:description>Look at this beautiful painting (NOT)</media:description>
</media:content>
...
<author>
    <name>Privat</name>
    ...
</author>
<finn:contact role="individual">
    <name>Ola Nordmanius</name>
    <email>ola@nordmanius.com</email>
    <finn:phone-number type="mobile">+47 123 45 678</finn:phone-number>
    <link href="http://<someserver>/ad/bap/123123123/contact" rel="http://api.finn.no/relations/contact" />
</finn:contact>
<finn:adata model="https://cache.api.finn.no/iad/ad/model/bap">
    <finn:field name="category">
        <finn:field name="main" value="Antikviteter og kunst" />
        <finn:field name="sub" value="Kunst" />
    </finn:field>
    <finn:field name="description">Will sell picture for butter</finn:field>
    <finn:price name="main" value="1500.0" />
</finn:adata>

Please also see the available sample code and our evolution strategy.

Sample:

Samples of ad outputs:

© 1996 - 2022 FINN.no AS