Availability: From version 1
History:
Version 2: Changes to accepted parameters so that the call is identical to the search records API.
Method: GET
The custom search records API call is passed a search field and the name of a DigitalNZ custom search and returns results from within that custom search. The custom search records API and this documentation are still under development. Please pass any feedback to the developer forum.
This call is very similar to the search records call, the difference being it only returns results from within a predefined custom search. The power of this is that you can build up complex queries using the visual search builder tool, and then access the data via the API.
The following must be specified as query parameters:
will search for "war" over the Coming Home custom search.
The following may be specified as request parameters:
Version 2+ accepts the following extra parameters:
Appending an extension to a resource tells the API to use the requested format. Valid extensions are xml, json, rss.
You can also specify the format in the Accept header of the HTTP request, e.g. Accept: application/json in a request to http://api.digitalnz.org/records/v1/ tells the API to use JSON format. Valid Accept headers include application/json, application/js, application/xml, application/rss+xml
e.g. http://api.digitalnz.org/custom_searches/v2/coming_home.xml?search_text=war&api_key=[Your_API_key] e.g. http://api.digitalnz.org/custom_searches/v2/coming_home.json?search_text=war&api_key=[Your_API_key]The search results will return the same elements as the search records API If the jsonp parameter is supplied in the request, the response will be returned in the format jsonp_function_name(json_string)