NPD I/O: Java library for accessing NPD information

The Norwegian Petroleum Directorate (NPD) maintains a comprehensive database of the activities in the North Sea. This is public real-time information, updated on a daily basis.

NPD offers an extensive online interface to this information through their NPD fact pages, but in order to get hold of the actual data for performing statistics, advanced computations, visualizations or create custom applications, a library like NPD I/O is required.

npdio.jar is light weight (< 100kB) and has no dependencies to any other libraries. It access data directly through HTTP - no login or password is required.


Illustrates the capabilities of NPD I/O and how the library is used in Log Studio. Shows the NPD data model and their associated views.


Full programming API documentation for the NPD I/O library is available in the Javadoc.

Coding example

Below are a few examples on how to access some of the main data types from the NPD database.

Correct URLs for each NPD data type is available through the NPD web page.

     import no.petroware.npdio.well.*;
     import no.petroware.npdio.field.*;

     // Read development NPD wellbores
     String url = "" + "&" +
                  "rs:Command=Render" + "&" +
                  "rc:Toolbar=false" + "&" +
                  "rc:Parameters=f" + "&" +
                  "rs:Format=CSV" + "&" +
                  "Top100=false" + "&" +
                  "IpAddress=" + "&" +
     List<NpdWellbore> npdWellbores = NpdWellDataReader.readDevelopmentWellbores(url);

     // Loop over the wellbores and write to stdout
     for (NpdWellbore npdWellbore : npdWellbores)


     // Read NPD fields
     String url = ...
     List<NpdField> npdFields = NpdFieldReader.readFields(url);

     // Read production data for all fields
     String url = ...
     ProductionReader.readProduction(url, npdFields);

     // Loop over the fields and write oil production to stdout
     for (NpdField npdField : fields) {
       Production production = field.getProduction();

       for (Production.Entry productionEntry : production.getEntries()) {
         int year = productionEntry.getYear();
         int month = productionEntry.getMonth();

         double oilProduction = productionEntry.getOil();

         System.out.println("Oil production: " + year + "/" + month + ": " + oilProduction);



Note that in an actual client implementation the reading process would better be done asynchronous in threads. The NPD I/O library is all thread-safe.

NPD I/O includes Java implementations for the NPD data types wellbore, license, field, company, survey, facility, discovery, business arrangement area, pipeline and stratigraphy.


Petroware AS does not currently have the resources to take on licensing of the NPD I/O library, but it may still be available on request.

For more information, please contact: