Skip to content
ZPG operates a number of property websites; the principal ones being Zoopla and PrimeLocation. This repository will provide a simple interface to the ZPG realtime feed for partners with access.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

ZPG Real-time Listings Service for PHP

Software License Build Status Coverage Status Code Quality

Todo (in order of priority)

  • Check enum's for their values on set instead of relying on JSON validation.
  • Introduce better built in exception types and error handling.
  • Use a JSON serialization library to create the request payloads instead of \JSONSerializable.
  • Look at a Rightmove RTDF equivalent. 😇


Via Composer

composer require lukeoliff/zpg-rtf-php

Certificate File

Before making calls to the ZPG API, you will need to follow Zoopla's instructions for generating a public-private key-pair with which to authenticate against Zoopla's servers.

Once you have provided Zoopla with the generated certificate signing request file, they will verify and provide you with a certificate by email. Combine the certificate with the private key you have generated:

cat zoopla_provided_certificate.crt private.pem > combined.pem

Change the $pathToZpgCert variable to the location of your combined.pem file and you will be ready to authenticate against the ZPG servers.

Update/Create a listing

This method allows you to describe a listing. It is used for both creation and update purposes and, in either case, the listing should be described in its entirety.

        use ZpgRtf\Methods\ListingMethod;
        use ZpgRtf\Objects\BranchObject;
        use ZpgRtf\Objects\ContentObject;
        use ZpgRtf\Objects\CoordinatesObject;
        use ZpgRtf\Objects\DescriptionObject;
        use ZpgRtf\Objects\EpcRatingsObject;
        use ZpgRtf\Objects\GoogleStreetViewObject;
        use ZpgRtf\Objects\ListingObject;
        use ZpgRtf\Objects\LocationObject;
        use ZpgRtf\Objects\PricingObject;

        $listing = new ListingObject();
            ->setConnectedUtilities(['electricity', 'fibre_optic', 'gas', 'satellite_cable_tv', 'water'])
            ->setDisplayAddress('Some Parade, Essex')
            ->setFeatureList(['Feature 1', 'Feature 2', 'Feature 3', 'Feature 4', 'Feature 5'])
            ->setFloorLevels(['ground', 1, 2])
            ->setOutsideSpace(['private_garden', 'terrace'])
            ->setParking(['single_garage', 'off_street_parking'])
            ->setSummaryDescription('A well decorated house.')

        $contentsImages = [

        $contents = [];

        foreach ($contentsImages as $key => $image) {
            $content = new ContentObject();
                ->setCaption('image: ' . $key)

            $contents[] = $content;


        $descriptionTexts = [
            'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec ut fermentum justo. Sed id magna eu ante 
mattis semper. Vivamus purus lectus, sollicitudin vitae velit feugiat, porttitor rhoncus elit.',
            'Integer rhoncus nulla quis nibh malesuada interdum. Nulla fermentum neque nec lacus ullamcorper fringilla. 
Mauris posuere quam nec erat accumsan, at sodales diam bibendum. Fusce vitae tortor purus.',

        $descriptions = [];

        foreach ($descriptionTexts as $text) {
            $description = new DescriptionObject();

            $descriptions[] = $description;


        $epcRatings = new EpcRatingsObject();


        $coordinates = new CoordinatesObject();

        $googleStreetView = new GoogleStreetViewObject();


        $location = new LocationObject();
            ->setStreetName('Some Road')
            ->setPostalCode('SO10 2YA')


        $pricing = new PricingObject();


        $pathToZpgCert = '../local/cert/file.pem';

        $method = new ListingMethod($pathToZpgCert);
        $response = $method->sendUpdate($listing);

Delete a listing

This method allows you to remove a listing from a branch's inventory list.

        use ZpgRtf\Methods\ListingMethod;
        use ZpgRtf\Objects\ListingDeleteObject;
        $listingDelete = new ListingDeleteObject();

        $pathToZpgCert = '../local/cert/file.pem';

        $method = new ListingMethod($pathToZpgCert);
        $response = $method->sendDelete($listingDelete);

List all listings

Because of the incremental nature of the service it is possible for the data that ZPG has to drift relative to yours (because of network problems or uncaught errors, for example). It is recommended that you periodically check the synchronisation of data between their system and yours. The listing/list method allows you retrieve a summary of the listing inventory for a branch and their state.

        use ZpgRtf\Methods\ListingMethod;
        use ZpgRtf\Objects\BranchObject;
        $branch = new BranchObject();

        $pathToZpgCert = '../local/cert/file.pem';

        $method = new ListingMethod($pathToZpgCert);
        $response = $method->getList($branch);

Update/Create a branch

This method allows you to describe a branch, to which listings are then associated. The address and other contact details allow ZPG to identify the equivalent branch on our system and map your branch_reference to theirs.

        use ZpgRtf\Methods\BranchMethod;
        use ZpgRtf\Objects\BranchObject;
        use ZpgRtf\Objects\CoordinatesObject;
        use ZpgRtf\Objects\LocationObject;
        use ZpgRtf\Objects\PafAddressObject;

        $branch = new BranchObject();

        $branchLocation = new LocationObject();
            ->setStreetName('Some Road')
            ->setPostalCode('SO10 2YA')

        $branchCoordinates = new CoordinatesObject();


        $branchPaf = new PafAddressObject();



        $pathToZpgCert = '../local/cert/file.pem';

        $method = new BranchMethod($pathToZpgCert);
        $response = $method->sendUpdate($branch);


It's worth mentioning that for no other reason than consistency that descriptions of methods and objects have been lifted straight from ZPG's Real-time Listing Service documentation.


Please see code of conduct and contributing guide if interested in contributing.


The MIT License (MIT). Please see License File for more information.

You can’t perform that action at this time.