RBA Cash Rate: 4.35% · 1AUD = 0.67 USD · Inflation: 4.1%  
Leading Digital Marketing Experts | 1300 235 433 | Aggregation Enquires Welcome | Book Appointment
Example Interest Rates: Home Loan Variable: 5.20% (5.24%*) • Home Loan Fixed: 5.48% (6.24%*) • Fixed: 5.48% (6.24%*) • Variable: 5.20% (5.24%*) • Investment IO: 5.78% (6.81%*) • Investment PI: 5.49% (6.32%*)

Australian National Archives “Memory of a Nation” API

Australian National Archives “Memory of a Nation” API

The National Archive's Memory of a Nation dataset includes a digitised version of items that were put on display in the Archives' permanent Memory of a Nation exhibition. The records include an original musical score of Waltzing Matilda, a petition for Aboriginal land rights from the Larrakia people of Darwin, and Charles Kingsford Smith's 1921 application for a pilot's licence. The record includes 529 records which translates to around 1968 images.

Of all the datasets we've ported over to a workable API, the raw data made available via the National Archives was a near-unworkable mess. If appears the data was a JSON file that was parsed by line or regular expression and them imported without consideration into a spreadsheet. The page URL references all linked to 404 pages and none of the images provided a full URL. Almost every field contained erroneous and poorly formatted data.

This article details rudimentary API usage for those current and former clients that hold an API key. Not unlike similar articles we've shared in the last couple of weeks, this API was designed to integrated into our social and marketing platform as 'social fuel'. That said, we've made a small WordPress plugin available for clients that'll give their website an archive of all content... although this particular collection doesn't have an enormous appeal.

The Result

Because of the limited data, we don't support searching records. The below example shows the first page of paginated (and truncated) results. Request: http://api.beliefmedia.com/nla/memories/memories.json?apikey=xxxxxxx&pg=1&number=20.

1
Array
2
(
3
    [code] => 200
4
    [status] => 200
5
    [message] => OK
6
    [source] => National Archives of Australia
7
    [page] => 1
8
    [number] => 20
9
    [pages] => 26
10
    [total] => 529
11
    [results] => Array
12
        (
13
            [0] => Array
14
                (
15
                    [id] => 1
16
                    [theme] => A collection like no other
17
                    [subtheme] => Of enduring value
18
                    [title] => Lighthouse plan
19
                    [tag_string] => Lighthouses; Port Adelaide;  South Australia
20
                    [short_description] => Proposed lighthouse plan for Port Adelaide, South Australia, 1866.
21
                    [year] => 1866
22
                    [number_images] => 1
23
                )
24
 
25
            [1] => Array
26
                (
27
                    [id] => 2
28
                    [theme] => A collection like no other
29
                    [subtheme] => Of enduring value
30
                    [title] => Lighthouse plan
31
                    [tag_string] => Lighthouses; Montague Island;  New South Wales
32
                    [short_description] => Plan for Montague Island Lighthouse and Quarters, NSW, 1878.
33
                    [year] => 1878
34
                    [number_images] => 1
35
                )
36
 
37
            [.. SNIP ..]
38
 
39
            [19] => Array
40
                (
41
                    [id] => 20
42
                    [theme] => A collection like no other
43
                    [subtheme] => Of enduring value
44
                    [title] => Douglas Mawson
45
                    [tag_string] => Douglas Mawson,  Prime Ministers,  Antarctica
46
                    [short_description] => Letter from Douglas Mawson to Prime Minister Andrew Fisher, 27 May 1911.
47
                    [year] => 1911
48
                    [number_images] => 1
49
                )
50
 
51
        )
52
 
53
)

Requesting data for a specific record yields far more information. For example, http://api.beliefmedia.com/nla/memories/memories.json?apikey=xxxxxxxxx&id=224 returns the following:

1
Array
2
(
3
    [code] => 200
4
    [status] => 200
5
    [message] => OK
6
    [source] => National Archives of Australia
7
    [results] => Array
8
        (
9
            [id] => 224
10
            [theme] => Living democracy
11
            [subtheme] => Documenting a democracy
12
            [title] => Nationality and Citizenship Act
13
            [collection] => Attorney-General's Department records
14
            [short_description] => Signed assent copy of the Nationality and Citizenship Act 1948.
15
            [long_description] => This Act changed the system of citizenship, introducing the principle that Australians were citizens of Australia rather than of Britain. Before this Act was proclaimed, Australians, like the citizens of other countries in the British Commonwealth, were British subjects.
16
            [more_info] =>
17
            [year] => 1948
18
            [tags] => Array
19
                (
20
                    [tag_string] => Citizenship
21
                    [tag_array] => Array
22
                        (
23
                            [0] => Citizenship
24
                        )
25
 
26
                )
27
 
28
            [reference] => Array
29
                (
30
                    

  • No series tag provided.

 => A1559
31
                    [control_symbol] => 1948/83
32
                    [barcode] => 11418779
33
                )
34
 
35
            [images] => Array
36
                (
37
                    [naa] => Array
38
                        (
39
                            [0] => https://recordsearch.naa.gov.au/SearchNRetrieve/NaaMedia/ShowImage.aspx?B=11418779&S=1&T=P
40
                            [1] => https://recordsearch.naa.gov.au/SearchNRetrieve/NaaMedia/ShowImage.aspx?B=11418779&S=2&T=P
41
                            [2] => https://recordsearch.naa.gov.au/SearchNRetrieve/NaaMedia/ShowImage.aspx?B=11418779&S=3&T=P
42
                            [3] => https://recordsearch.naa.gov.au/SearchNRetrieve/NaaMedia/ShowImage.aspx?B=11418779&S=4&T=P
43
                            [4] => https://recordsearch.naa.gov.au/SearchNRetrieve/NaaMedia/ShowImage.aspx?B=11418779&S=5&T=P
44
                            [5] => https://recordsearch.naa.gov.au/SearchNRetrieve/NaaMedia/ShowImage.aspx?B=11418779&S=6&T=P
45
                            [6] => https://recordsearch.naa.gov.au/SearchNRetrieve/NaaMedia/ShowImage.aspx?B=11418779&S=7&T=P
46
                            [7] => https://recordsearch.naa.gov.au/SearchNRetrieve/NaaMedia/ShowImage.aspx?B=11418779&S=8&T=P
47
                            [8] => https://recordsearch.naa.gov.au/SearchNRetrieve/NaaMedia/ShowImage.aspx?B=11418779&S=9&T=P
48
                            [9] => https://recordsearch.naa.gov.au/SearchNRetrieve/NaaMedia/ShowImage.aspx?B=11418779&S=10&T=P
49
                            [10] => https://recordsearch.naa.gov.au/SearchNRetrieve/NaaMedia/ShowImage.aspx?B=11418779&S=11&T=P
50
                            [11] => https://recordsearch.naa.gov.au/SearchNRetrieve/NaaMedia/ShowImage.aspx?B=11418779&S=12&T=P
51
                            [12] => https://recordsearch.naa.gov.au/SearchNRetrieve/NaaMedia/ShowImage.aspx?B=11418779&S=13&T=P
52
                            [13] => https://recordsearch.naa.gov.au/SearchNRetrieve/NaaMedia/ShowImage.aspx?B=11418779&S=14&T=P
53
                            [14] => https://recordsearch.naa.gov.au/SearchNRetrieve/NaaMedia/ShowImage.aspx?B=11418779&S=15&T=P
54
                            [15] => https://recordsearch.naa.gov.au/SearchNRetrieve/NaaMedia/ShowImage.aspx?B=11418779&S=16&T=P
55
                            [16] => https://recordsearch.naa.gov.au/SearchNRetrieve/NaaMedia/ShowImage.aspx?B=11418779&S=17&T=P
56
                            [17] => https://recordsearch.naa.gov.au/SearchNRetrieve/NaaMedia/ShowImage.aspx?B=11418779&S=18&T=P
57
                            [18] => https://recordsearch.naa.gov.au/SearchNRetrieve/NaaMedia/ShowImage.aspx?B=11418779&S=19&T=P
58
                            [19] => https://recordsearch.naa.gov.au/SearchNRetrieve/NaaMedia/ShowImage.aspx?B=11418779&S=20&T=P
59
                            [20] => https://recordsearch.naa.gov.au/SearchNRetrieve/NaaMedia/ShowImage.aspx?B=11418779&S=21&T=P
60
                        )
61
 
62
                    [local] => Array
63
                        (
64
                            [0] => 11418779/a1559-1016.jpg
65
                            [1] => 11418779/a1559-1017.jpg
66
                            [2] => 11418779/a1559-1018.jpg
67
                            [3] => 11418779/a1559-1019.jpg
68
                            [4] => 11418779/a1559-1020.jpg
69
                            [5] => 11418779/a1559-1021.jpg
70
                            [6] => 11418779/a1559-1022.jpg
71
                            [7] => 11418779/a1559-1023.jpg
72
                            [8] => 11418779/a1559-1024.jpg
73
                            [9] => 11418779/a1559-1025.jpg
74
                            [10] => 11418779/a1559-1026.jpg
75
                            [11] => 11418779/a1559-1027.jpg
76
                            [12] => 11418779/a1559-1028.jpg
77
                            [13] => 11418779/a1559-1029.jpg
78
                            [14] => 11418779/a1559-1030.jpg
79
                            [15] => 11418779/a1559-1031.jpg
80
                            [16] => 11418779/a1559-1032.jpg
81
                            [17] => 11418779/a1559-1033.jpg
82
                            [18] => 11418779/a1559-1034.jpg
83
                            [19] => 11418779/a1559-1035.jpg
84
                            [20] => 11418779/a1559-1036.jpg
85
                        )
86
 
87
                )
88
 
89
        )
90
 
91
)

You may download the entire low-quality image collection (or at least that part of the collection we were able to resolve) from our client area (630MB, zip file). Alternatively, images are hosted locally with us in the following format: {barcode}/{preg_replace("/[^ \w]+/", '', $series)}-{id).jpg as detailed in the resulting array above. The ID is assigned by us.

Sample PHP Functions

If you're unfamiliar with making JSON API requests, the following basic functions may assist.

Browsing Results

1
<?php 
2
/*
3
 Australian National Archives "Memory of a Nation" API
4
 https://www.beliefmedia.com.au/api-memory-of-nation
5
*/
6
 
7
function beliefmedia_naa_memories($page = '', $number = '', $apikey = 'xxxxxxxxxxxx') {
8
 
9
  if ($page == '') $page = '1';
10
  if ($number == '') $number = '20';
11
 
12
  $data = file_get_contents('http://api.beliefmedia.com/nla/memories/memories.json?apikey=' . $apikey . '&pg=' . $page . '&number=' . $number);
13
  if ($data === false) return false;
14
 
15
  $data = json_decode($data, true);
16
  if ($data === false) return false;
17
 
18
  /* Likely return array of errors with code & message */
19
  if ($data['code'] != '200') return $data['message'];
20
 
21
 return (array) $data;
22
}

Retrieving a Single Result

1
<?php 
2
/*
3
 Australian National Archives "Memory of a Nation" API
4
 https://www.beliefmedia.com.au/api-memory-of-nation
5
*/
6
 
7
function beliefmedia_naa_memory($id = '224', $apikey = 'xxxxxxxxxxxx') {
8
 
9
  $data = file_get_contents('http://api.beliefmedia.com/nla/memories/memories.json?apikey=' . $apikey . '&id=' . $id);
10
  if ($data === false) return false;
11
 
12
  $data = json_decode($data, true);
13
  if ($data === false) return false;
14
 
15
  /* Likely return array of errors with code & message */
16
  if ($data['code'] != '200') return $data['message'];
17
 
18
 return (array) $data;
19
}

Considerations

  • The NAA.gov.au images may be referenced as follows: https://recordsearch.naa.gov.au/SearchNRetrieve/NaaMedia/ShowImage.aspx?B={barcode}&{page_number}=60&T={image_size}. There's likely another format that we've yet to find that'll return a higher quality image. Image references in the NAA CSV file are invalid.
  • A link to the relevant page on the NAA website should normally be provided. While many links are broken, the SODA search format often works: http://soda.naa.gov.au/record/{barcode}/{page-number}.
  • The CC3 licence seems to apply only to the data - not the photographs. A copyright of sorts may still apply.

Download our 650-page guide on Finance Marketing. We'll show you exactly how we generate Billions in volume for our clients.

  E. Australia Standard Time [ UTC+10, Default ] [ CHECK TO CHANGE ]

  Want to have a chat?
 

RELATED READING

Like this article?

Share on Facebook
Share on Twitter
Share on Linkdin
Share on Pinterest

Leave a comment