This is in beta. If you find something wrong, let us know

ANZSIC code search

Getting Started

Using the API

Search

Search

The search service is available at this URL:

https://industrycoder.abs.gov.au/pocc

The service takes a single parameter s which is a string containing your search terms separated by spaces.

The service will return an array of JSON objects, ordered by relevance and limited to 20 results.

FieldDescription
codeThe 5-digit ANZSIC category code
parsedTextUnparsed text modified to allow efficient searching. This is what the query terms have been searched against
unparsedTextThe natural language description of the ANZSIC category
scoreWeighted closeness score, a decimal value between 0 and 10
rankInteger closeness ranking within the results

Example code

Here is a basic example webpage that uses AJAX to query the service and display the results.

Note that in this example, on the the 'code' and 'unparsedText' fields are displayed.

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
 <title>PoCC Search</title>
</head>
<body>
 <div>
 <h2>Search for a Classification</h2>
 <input type="text" id="search" size="20" />
 <input type="button" id="searchButton" value="Search" onclick="find();" />
 <ol id="results" />
 </div>
 <script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-2.0.3.min.js"></script>
 <script>
 var uri = 'https://industrycoder.abs.gov.au/pocc?s=';
 function formatItem(item) {
 return item.code + ": " + item.unparsedText;
 }
 function find() {
 var id = $('#search').val();
 $.getJSON(uri + id)
 .done(function (data) {
 $('#results').text(''); //clear previous search results
 $.each(data, function (key, item) {
 $('<li>', { text : formatItem(item) }).appendTo($('#results'));
 });
 })
 .fail(function (jqXHR, textStatus, err) {
 window.alert('Error: ' + err);
 });
 }
 </script>
 <script>
 $('#search').keyup(function(event) {
 if (event.keyCode === 13) {
 $('#searchButton').click();
 }
 });
 </script>
</body>
</html>


Last edited: 06 Jan 2020, 09:30:51