Narodne novine API

Ova stranica dostupna je na hrvatskom.

Introduction


API (Application Programming Interface) is a set of protocols and tools that allows different software programs to interact with a web-based software application or service. It allows developers to access specific features or data from the application or service without needing to understand its underlying code or infrastructure. API calls that are implemented below allow you to fetch metadata from NN publications.

I - Act metadata


Retrieval of metadata of an act specified with a type (SL/MU), year, edition number and act number.

Endpoint: https://narodne-novine.nn.hr/api/act
Method: HTTP POST
Format: Input JSON, output JSON-LD or RDF/XML
Input parameters:
"part" (string) - can only be "SL" (sluzbeni) or "MU" (medunarodni)
"year" (int) - represents a four-digit number, and denotes the official year of journal publication
"number" (int) - represents positive number, denotes the number of the journal within the chosen year
"act_num" (string) - represents the number of the act (very rarely contains letter)
"format" (string) - represents the output format and can only be "JSON-LD" or "RDF/XML"
Output: JSON-LD or RDF/XML

This method only returns metadata for editions that are published and have ELI metadata. Does not work with part OG (ads). The allowed part is only "SL" or "MU" and format only "JSON-LD" or "RDF/XML". All input parameters are required.

Example 1: Input
{
 "part": "SL",
 "year": 2023,
 "number": 34,
 "act_num": "596",
 "format": "RDF/XML"
}

Example 1: Output
<?xml version="1.0" encoding="utf-8" ?>
 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:eli="http://data.europa.eu/eli/ontology#">
 <rdf:Description rdf:about="https://narodne-novine.nn.hr/eli/sluzbeni/2023/34/596">

   <rdf:type rdf:resource="http://data.europa.eu/eli/ontology#LegalResource"/>
   <eli:type_document rdf:resource="https://narodne-novine.nn.hr/resource/authority/document-type/UREDBA"/>
   <eli:number rdf:datatype="http://www.w3.org/2001/XMLSchema#string">596</eli:number>
   <eli:date_document rdf:datatype="http://www.w3.org/2001/XMLSchema#date">2023-03-27</eli:date_document>
   <eli:date_publication rdf:datatype="http://www.w3.org/2001/XMLSchema#date">2023-03-27</eli:date_publication>
   <eli:passed_by rdf:resource="https://narodne-novine.nn.hr/eli/vocabularies/nn-institutions/19560"/>
   <eli:is_realized_by rdf:resource="https://narodne-novine.nn.hr/eli/sluzbeni/2023/34/596/hrv"/>
   <eli:is_about rdf:resource="http://eurovoc.europa.eu/1072"/>
   <eli:is_about rdf:resource="http://eurovoc.europa.eu/2652"/>
   <eli:is_about rdf:resource="http://eurovoc.europa.eu/2679"/>
   <eli:is_about rdf:resource="http://eurovoc.europa.eu/2772"/>
   <eli:is_about rdf:resource="https://narodne-novine.nn.hr/eli/vocabularies/nn-legal-area/20"/>
   <eli:is_about rdf:resource="https://narodne-novine.nn.hr/eli/vocabularies/nn-legal-area/28"/>
   <eli:is_about rdf:resource="https://narodne-novine.nn.hr/eli/vocabularies/nn-content-type/1"/>
   <eli:is_about rdf:resource="https://narodne-novine.nn.hr/eli/vocabularies/nn-index-terms/288"/>
   <eli:is_about rdf:resource="https://narodne-novine.nn.hr/eli/vocabularies/nn-index-terms/2152"/>
   <eli:is_about rdf:resource="https://narodne-novine.nn.hr/eli/vocabularies/nn-index-terms/2312"/>
 </rdf:Description>

 <eli:LegalExpression rdf:about="https://narodne-novine.nn.hr/eli/sluzbeni/2023/34/596/hrv">
   <eli:publisher rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Narodne novine</eli:publisher>
   <eli:realizes rdf:resource="https://narodne-novine.nn.hr/eli/sluzbeni/2023/34/596"/>
   <eli:language rdf:resource="http://publications.europa.eu/resource/authority/language/HRV"/>
   <eli:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Uredba o utvrđivanju najviših maloprodajnih cijena naftnih derivata</eli:title>
   <eli:is_embodied_by>
    <eli:Format rdf:about="https://narodne-novine.nn.hr/eli/sluzbeni/2023/34/596/hrv/html">
     <eli:publisher rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Narodne novine</eli:publisher>
     <eli:embodies rdf:resource="https://narodne-novine.nn.hr/eli/sluzbeni/2023/34/596/hrv"/>
     <eli:format rdf:resource="http://www.iana.org/assignments/media-types/text/html"/>
    </eli:Format>
   </eli:is_embodied_by>
   <eli:is_embodied_by>
    <eli:Format rdf:about="https://narodne-novine.nn.hr/eli/sluzbeni/2023/34/596/hrv/printhtml">
     <eli:publisher rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Narodne novine</eli:publisher>
     <eli:embodies rdf:resource="https://narodne-novine.nn.hr/eli/sluzbeni/2023/34/596/hrv"/>
     <eli:format rdf:resource="http://www.iana.org/assignments/media-types/text/html"/>
    </eli:Format>
   </eli:is_embodied_by>
   <eli:is_embodied_by>
    <eli:Format rdf:about="https://narodne-novine.nn.hr/eli/sluzbeni/2023/34/596/hrv/pdf">
     <eli:publisher rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Narodne novine</eli:publisher>
     <eli:embodies rdf:resource="https://narodne-novine.nn.hr/eli/sluzbeni/2023/34/596/hrv"/>
     <eli:format rdf:resource="http://www.iana.org/assignments/media-types/application/pdf"/>
    </eli:Format>
   </eli:is_embodied_by>
 </eli:LegalExpression>
</rdf:RDF>

Example 2: Input
{
 "part": "SL",
 "year": 2023,
 "number": 34,
 "act_num": "596",
 "format": "JSON-LD"
}

Example 2: Output
[
 { "@id": "http://data.europa.eu/eli/ontology#LegalResource" },
 { "@id": "https://narodne-novine.nn.hr/resource/authority/document-type/UREDBA" },
 { "@id": "https://narodne-novine.nn.hr/eli/vocabularies/nn-institutions/19560" },
 { "@id": "http://data.europa.eu/eli/ontology#LegalExpression" },
 { "@id": "http://publications.europa.eu/resource/authority/language/HRV" },
 { "@id": "http://data.europa.eu/eli/ontology#Format" },
 { "@id": "http://www.iana.org/assignments/media-types/text/html" },
 { "@id": "http://www.iana.org/assignments/media-types/application/pdf" },
 { "@id": "http://eurovoc.europa.eu/1072" },
 { "@id": "http://eurovoc.europa.eu/2652" },
 { "@id": "http://eurovoc.europa.eu/2679" },
 { "@id": "http://eurovoc.europa.eu/2772" },
 { "@id": "https://narodne-novine.nn.hr/eli/vocabularies/nn-legal-area/20" },
 { "@id": "https://narodne-novine.nn.hr/eli/vocabularies/nn-legal-area/28" },
 { "@id": "https://narodne-novine.nn.hr/eli/vocabularies/nn-content-type/1" },
 { "@id": "https://narodne-novine.nn.hr/eli/vocabularies/nn-index-terms/288" },
 { "@id": "https://narodne-novine.nn.hr/eli/vocabularies/nn-index-terms/2152" },
 { "@id": "https://narodne-novine.nn.hr/eli/vocabularies/nn-index-terms/2312" },
 { "@id": "https://narodne-novine.nn.hr/eli/sluzbeni/2023/34/596",
   "@type": [ "http://data.europa.eu/eli/ontology#LegalResource" ],
   "http://data.europa.eu/eli/ontology#type_document": [
    { "@id": "https://narodne-novine.nn.hr/resource/authority/document-type/UREDBA" }
   ],
   "http://data.europa.eu/eli/ontology#number": [
    { "@value": "596" }
   ],
   "http://data.europa.eu/eli/ontology#date_document": [
    {
     "@value": "2023-03-27",
     "@type": "http://www.w3.org/2001/XMLSchema#date"
    }
   ],
   "http://data.europa.eu/eli/ontology#date_publication": [
    {
     "@value": "2023-03-27",
     "@type": "http://www.w3.org/2001/XMLSchema#date"
    }
   ],
   "http://data.europa.eu/eli/ontology#passed_by": [
    { "@id": "https://narodne-novine.nn.hr/eli/vocabularies/nn-institutions/19560" }
   ],
   "http://data.europa.eu/eli/ontology#is_realized_by": [
    { "@id": "https://narodne-novine.nn.hr/eli/sluzbeni/2023/34/596/hrv" }
   ],
   "http://data.europa.eu/eli/ontology#is_about": [
    { "@id": "http://eurovoc.europa.eu/1072" },
    { "@id": "http://eurovoc.europa.eu/2652" },
    { "@id": "http://eurovoc.europa.eu/2679" },
    { "@id": "http://eurovoc.europa.eu/2772" },
    { "@id": "https://narodne-novine.nn.hr/eli/vocabularies/nn-legal-area/20" },
    { "@id": "https://narodne-novine.nn.hr/eli/vocabularies/nn-legal-area/28" },
    { "@id": "https://narodne-novine.nn.hr/eli/vocabularies/nn-content-type/1" },
    { "@id": "https://narodne-novine.nn.hr/eli/vocabularies/nn-index-terms/288" },
    { "@id": "https://narodne-novine.nn.hr/eli/vocabularies/nn-index-terms/2152" },
    { "@id": "https://narodne-novine.nn.hr/eli/vocabularies/nn-index-terms/2312" }
   ]
  },
  {
   "@id": "https://narodne-novine.nn.hr/eli/sluzbeni/2023/34/596/hrv",
   "@type": [ "http://data.europa.eu/eli/ontology#LegalExpression" ],
   "http://data.europa.eu/eli/ontology#publisher": [
    { "@value": "Narodne novine" }
   ],
   "http://data.europa.eu/eli/ontology#realizes": [
    { "@id": "https://narodne-novine.nn.hr/eli/sluzbeni/2023/34/596" }
   ],
   "http://data.europa.eu/eli/ontology#language": [
    { "@id": "http://publications.europa.eu/resource/authority/language/HRV" }
   ],
   "http://data.europa.eu/eli/ontology#title": [
    { "@value": "Uredba o utvrđivanju najviših maloprodajnih cijena naftnih derivata" }
   ],
   "http://data.europa.eu/eli/ontology#is_embodied_by": [
    { "@id": "https://narodne-novine.nn.hr/eli/sluzbeni/2023/34/596/hrv/html" },
    { "@id": "https://narodne-novine.nn.hr/eli/sluzbeni/2023/34/596/hrv/printhtml" },
    { "@id": "https://narodne-novine.nn.hr/eli/sluzbeni/2023/34/596/hrv/pdf" }
   ]
  },
  {
   "@id": "https://narodne-novine.nn.hr/eli/sluzbeni/2023/34/596/hrv/html",
   "@type": [ "http://data.europa.eu/eli/ontology#Format" ],
   "http://data.europa.eu/eli/ontology#publisher": [
    { "@value": "Narodne novine" }
   ],
   "http://data.europa.eu/eli/ontology#embodies": [
    { "@id": "https://narodne-novine.nn.hr/eli/sluzbeni/2023/34/596/hrv" }
   ],
   "http://data.europa.eu/eli/ontology#format": [
    { "@id": "http://www.iana.org/assignments/media-types/text/html" }
   ]
  },
  {
   "@id": "https://narodne-novine.nn.hr/eli/sluzbeni/2023/34/596/hrv/printhtml",
   "@type": [ "http://data.europa.eu/eli/ontology#Format" ],
   "http://data.europa.eu/eli/ontology#publisher": [
    { "@value": "Narodne novine" }
   ],
   "http://data.europa.eu/eli/ontology#embodies": [
    { "@id": "https://narodne-novine.nn.hr/eli/sluzbeni/2023/34/596/hrv" }
   ],
   "http://data.europa.eu/eli/ontology#format": [
    { "@id": "http://www.iana.org/assignments/media-types/text/html" }
   ]
  },
  {
   "@id": "https://narodne-novine.nn.hr/eli/sluzbeni/2023/34/596/hrv/pdf",
   "@type": [ "http://data.europa.eu/eli/ontology#Format" ],
   "http://data.europa.eu/eli/ontology#publisher": [
    { "@value": "Narodne novine" }
   ],
   "http://data.europa.eu/eli/ontology#embodies": [
    { "@id": "https://narodne-novine.nn.hr/eli/sluzbeni/2023/34/596/hrv" }
   ],
   "http://data.europa.eu/eli/ontology#format": [
    { "@id": "http://www.iana.org/assignments/media-types/application/pdf" }
   ]
  }
]

II - Years with available ELI metadata


Retrieval of the range of years for which ELI metadata is available.

Endpoint: https://narodne-novine.nn.hr/api/index
Method: HTTP GET
Format: Output JSON
Input parameters: None
Output: List of years

This method only returns a range of years for editions that are published and have ELI metadata. Does not work with part OG (ads). It does not require any input parameters.

Example: Output
[2015,2016,2017,2018,2019,2020,2021,2022,2023]

III - Editions with available ELI metadata


Retrieval of a list of all edition numbers for the requested year.

Endpoint: https://narodne-novine.nn.hr/api/editions
Method: HTTP POST
Format: Input JSON, Output JSON
Input parameters:
"part" (string) - can only be "SL" (sluzbeni) or "MU" (medunarodni)
"year" (int) - represents a four-digit number, and denotes the official year of journal publication
Output: List of edition numbers

This method only returns a range of years for editions that are published and have ELI metadata. Does not work with part OG (ads). It does not require any input parameters.

Example: Input
{
 "part": "SL",
 "year": 2023,
}

Example: Output
[1,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,19,20,21,22,23,24,25,26,27,28,29,30,31,32,35,33,34,36]

IV - Acts with available ELI metadata


Retrieval of a list of all act numbers that appear in a particular edition that has ELI metadata.

Endpoint: https://narodne-novine.nn.hr/api/acts
Method: HTTP POST
Format: Input JSON, Output JSON
Input parameters:
"part" (string) - can only be "SL" (sluzbeni) or "MU" (medunarodni)
"year" (int) - represents a four-digit number, and denotes the official year of journal publication
"number" (int) - represents positive number, denotes the number of the journal within the chosen year
Output: List of act numbers

This method only returns all acts that are in the published edition and have ELI metadata. Does not work with part OG (ads). The allowed part is only "SL" or "MU". All input parameters are required.

Example: Input
{
 "part": "SL",
 "year": 2023,
 "number": 34
}

Example: Output
["602","601","598","597","599","600","596"]

V - API restrictions


Input parameters for each call are validated and will return an error if they are not valid or empty.

The API call has a limit of 3 requests per second, meaning that any additional requests made beyond this limit will not be processed. This limit is in place to prevent server overload and ensure fair usage for all users.




Document version 1.0, 18 Apr 2023