Where to learn how to use APIs?

Hi everyone,

I’m after a good resource to learn how to use APIs please? I kind of know you need JavaScript or PHP to parse the information… I have no idea where to start for learning how to use an API or anything, really I’m just looking for a solid starting point.

APIs differ. They may be SOAP, REST, JSON …
i.e. how they are accessed and what they return differ.

IMHO the best way to learn is by doing. Is there an API you’re interested in using?
If not I think JSON might be the easiest to start with (can be used by JavaScript as opposed to SOAP and REST which return XML)

Interesting, I’m planning on using this - http://www.realestateview.com.au/docs/rev_api/

With some data feed details and agent authority access information.

I just don’t know where to start with this. I need 4 pages to display data from property searches (for sale, for rent, leased and sold).

Edit: I guess I should take a step back and ask, do I need to learn PHP to be able to achieve this?

Maybe not PHP, in particular, but you will need to parse XML - which PHP can do nicely (many other languages can as well) **

2.2 XML Response - Resonse to ‘search’ or ‘view’ requests.

You may be able to insert the XML into the DOM and style it with JavaScript,

Do you have a live host server or a localhost server yet?

You’re comfortable with HTML, CSS and JavaScript but know no PHP?

** I hadn’t seen
A.4 Search for listings (JSON)
Appendix A. Example XML Files

Try this in your browser (no server required , no PHP, HTML and JavaScript only)

<html lang="en">
<title>API test</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<style type="text/css">
<script type="text/javascript">
// this would be returned using XHR 
var realestateview_json = {
   "Pagination" : [
         "PageURL" : "",
         "PageNumber" : "1"
   "Listings" : [
         "CityStateText" : "New South Wales",
         "SaleLeaseAlertPriceText" : "Expressions of Interest",
         "ListingResultsCount" : "1",
         "ContactAgentOfficePhone" : [
            "9727 8822",
            "02 9727 6077"
         "CarportsCount" : "3",
         "SaleLeaseAlertText" : "For Sale",
         "AgentsGroupNameSuburbLink" : "http://www.realestateview.com.au/agents/raine+and+horne+r+and+h+cabramatta",
         "AuctionTime" : "12:00AM",
         "StreetType" : "St",
         "AvailableOnlyFlag" : "1",
         "LandSize" : "916.00",
         "TotalParkingCount" : "6",
         "PropertyTypeText" : "House",
         "ContactAgentMobilePhone" : [
            "0414 982 978"
         "ClientAddress" : "5 Arthur St",
         "SaleLeaseTypeText" : "for Sale",
         "GroupID" : "123",
         "ClientSuburb" : "CABRAMATTA",
         "PropertyType" : [
         "PriceText" : "Expressions of Interest",
         "ClientID" : "7373",
         "ForSale" : "1",
         "BedroomsCount" : "9",
         "PortalSection" : "buy",
         "FullDisplayLink" : "http://www.realestateview.com.au/Real-Estate/cabramatta/Property-Details-buy-residential-3328445.html",
         "PhotosCount" : "10",
         "GroupFontColor" : "000000",
         "PortalView" : "residential",
         "ClientState" : "NSW",
         "SaleLeaseText" : "Expressions of Interest",
         "OrderID" : "3328445",
         "Title" : "Rare Investment Opportunity!",
         "IsResidential" : "1",
         "GeocodeStatus" : "1",
         "Suburb" : "CABRAMATTA",
         "ContactAgentName" : [
            "Raine  Horne Cabramatta",
            "Peter Ly"
         "GroupFont" : "arial",
         "ClientLogoResultsURL" : "http://www.realestateview.com.au/logos/results/Raine-and-Horne-2.gif",
         "CityState" : "NSW",
         "ClientPostCode" : "2166",
         "PhotoFloorPlanUpdate" : "2011-11-23 18:28:08",
         "BathroomsCount" : "3",
         "ViewFullDisplayAltTag" : "View full details for  Cabramatta NSW 2166",
         "ClientLogoAltText" : "R&amp;H - Cabramatta",
         "ContactAgentEmail" : [
         "ClientName" : "R&amp;H Cabramatta",
         "HostName" : "www.realestateview.com.au",
         "LandSizeText" : "916",
         "LockUpGaragesCount" : "3",
         "FirstPropertyTypeOnly" : "House",
         "GroupBackgroundColor" : "FFCC00",
         "PostCode" : "2166",
         "PhotoThumbURL" : [
         "StreetNumber" : "2A",
         "StreetName" : "Levuka",
         "Description" : "3 units in one dwelling. All have separate entries and:\n*3 bedrooms, separate lounge and dining\n*Kitchen and bathroom\n*Single lock-up garage + car space\n\n*Ideal for investment/to live and collect income\n*Walk to Cabramatta school, station and shops\n*Current gross income of $46,000 p.a.\n*Ideal for 3 families"
   "Search" : 1,
   "ResponseStatus" : "OK",
   "TotalMatching" : "1",
   "SearchNumber" : "190232266"
var city_state = realestateview_json.Listings[0].CityStateText;
<h1>API test</h1>
<div id="test_div"></div>
<script type="text/javascript">
// now that the DOM is loaded
var display_div = document.getElementById("test_div");
display_div.textContent = city_state;

I have a live host. http://www.dbelldesign.com.au/steveway/html5

Fine with HTML and CSS, learning JavaScript and PHP through SP Premium. PHP seems easier than JavaScript. I’m taking my time learning these but am struggling a bit.

This I put here - http://www.dbelldesign.com.au/steveway/html5/rev.html

Shows API test and New South Wales.

The current site they use iframes for the searches, I’m trying to update this so that it just shows results for sold, for sale, leased and for rent. Not to mention iframes are bad and I’m trying to make this mobile responsive.

Another site the agent sent me to look at which would do the job fine is http://www.mpcmoss.com.au/.

From what I gather this uses Drupal and possibly php for the results.

Any more ideas please?

Sorry for the delay, the weekend happened.

Have you had a chance to look at PHP’s CURL, and XML fiunctions? Still think PHP would be the easier?


If XML looks too daunting maybe JSON instead?

Also I’m not sure about

Do you know what those are in what the API returns?
I don’t see them explicitly so I’m guessing one or more of the numeric vales in combination represent the status.

Haha that’s all good, I understand. Hope you had a good one.

Honestly I’m not 100 percent sure how I would go about this as I have never done it before. The code involved behind the current search has Javascript in it, and uses a few different codes to differentiate sales and rentals. See this:


I do not know what they are in the API. I have the agent authority access details and feed details. I do not know how to use these. I think I will email the API support.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.