Getting started with the Daft.ie API
What is the Daft API?
The Daft API is a private service that allows developers to build tools and websites powered by Daft.ie. It is not open to the public.
How do I use the Daft API?
To use the Daft API, you're going to need a few things:
- An API key - a unique identifier that links you with your Daft.ie account.
- A programming environment capable of using the SOAP protocol. Most major programming languages support SOAP, including PHP, Perl, ASP, Java and Python.
Can I see an example?
Sure! Here's a quick example using PHP5. It uses the
areas
request to fetch a list of counties in Ireland.
<?php
/**
* This example will produce a list of the counties in Ireland.
*/
$DaftAPI = new SoapClient("http://api.daft.ie/v2/wsdl.xml");
$parameters = array(
'api_key' => "4039260_invalid_example_key_87b7c7c267fa"
, 'area_type' => "county"
);
$response = $DaftAPI->areas($parameters);
foreach($response->areas as $county)
{
print $county->name . "<br />\n";
}
?>
If PHP5 isn't your language of choice, we also have sample code for other languages, including .NET
What else can the Daft API do?
Here's a quick list of commands the Daft API supports:
-
search_sale
- Perform a search for residential "for sale" property. -
search_rental
- Perform a search for residential "to let" property. -
search_commercial
- Perform a search for commercial property. -
search_new_development
- Perform a search for new development property. -
areas
- Look up areas, counties, cities, postcodes, etc. -
media
- Find media (images, virtual tours, etc) for property ads. -
ad_types
- List all the ad types, like sale ads, rental ads, sharing ads, commercial, etc. -
property_types
- List the property types (house, apartment, bungalow, etc) for a particular ad type. -
features
- List the features (like parking, central heating, etc) for a particular ad type.
Where can I learn more?
Much more information is available from the full documentation and reference.
Where can I get help?
Contact us at support@helpdaft.zendesk.com with further enquiries.