Shipyards API Examples

  1. Get a shipyard via ID
  2. List all shipyards
  3. Find shipyards in area
  4. Search for shipyards by name with a partial string

Get the information about a shipyard via its ID

Example getting information about a shipyard by querying the ID5002. The id for the shipyard can be retrieved by the other endpoints:

// initialisation with your API KEY
$MY_API_KEY_HERE = 'YOUR-API-KEY-HERE';
// base url for the subsequent requests
$base_url = "https://api.searoutes.com/ys/shipyard";
// send the API key in the request
$curl_headers = array(
    'accept: application/json ',
    'x-Api-key: '.$MY_API_KEY_HERE,
);
// initialize curl and pass the Api key in the header
$curl = curl_init();
curl_setopt($curl, CURLOPT_HTTPHEADER, $curl_headers);
// curl has been initialised and ready to be used

// define our search parameter
$requestParameters = array (
    'id' => 5002
);
// create the new url with the specific parameter
$url = $base_url . "?" . http_build_query($requestParameters, '', "&");
curl_setopt($curl, CURLOPT_URL, $url);
$response = curl_exec($curl);
curl_close($curl);
print ($response);
     

// initialisation with your API KEY
final String MY_API_KEY_HERE = "YOUR-API-KEY-HERE";
// base url for the subsequent requests
final String base_url = "https://api.searoutes.com/ys/shipyard";
// provide a search query
final String url = base_url +  "?id=5002";
HttpsURLConnection con = (HttpsURLConnection) new URL(url).openConnection();
// send the API key in the request
con.setRequestProperty("x-api-key", MY_API_KEY_HERE);
con.setRequestProperty("accept", "application/json");
ByteArrayOutputStream baos = new ByteArrayOutputStream();
byte[] buffer = new byte[4096];
InputStream is = con.getInputStream();
for (int nRead = is.read(buffer); nRead != -1; nRead = is.read(buffer)) {
    baos.write(buffer, 0, nRead);
}
is.close();
System.out.println(new String(baos.toByteArray(), "UTF8"));
}
     

# Python 3
import requests

# initialisation with your API KEY
MY_API_KEY_HERE = 'YOUR-API-KEY-HERE'

# base url for the subsequent requests
base_url = "https://api.searoutes.com/ys/shipyard"

# custom headers with our API key
request_headers = {
    'accept': 'application/json',
    'x-api-key': MY_API_KEY_HERE
}

# search term
request_params = {'id': 5002}

# create the new url with the specific parameter
url = base_url
response = requests.get(url, headers=request_headers, params=request_params)
print (response.text)

     

The returned object will be a JSON object that contains the information about the requested shipyard. For example the request above will return:

  {
    "shipyards": [
      {
        "id": 5002,
        "type_id": 3,
        "country_id": 16,
        "address_id": 4545,
        "services": "{NEW_BUILDINGS,DESIGNERS}",
        "name": "HANSEATIC MARINE",
        "web": "hanseaticmarine.eu",
        "cranage": 0,
        "ships_in_polygons": 0,
        "approved": false,
        "lon": 0,
        "lat": 0,
        "is_headoffice": false,
        "year_founded": 0,
        "employes": 0,
        "revenue": 0,
        "avg_stay": 0
      }
    ],
    "size": 1
  }

Get a list of all the shipyards

Example getting on how getting 2 shipyards and offset of 10 from the start of the results:

// initialisation with your API KEY
$MY_API_KEY_HERE = 'YOUR-API-KEY-HERE';
// base url for the subsequent requests
$base_url = "https://api.searoutes.com/ys/shipyards";
// send the API key in the request
$curl_headers = array(
    'accept: application/json ',
    'x-Api-key: '.$MY_API_KEY_HERE,
);
// initialize curl and pass the Api key in the header
$curl = curl_init();
curl_setopt($curl, CURLOPT_HTTPHEADER, $curl_headers);
// curl has been initialised and ready to be used

// define our search parameter
$requestParameters = array (
    'offset' => 10,
    'size' => 2,
);
// create the new url with the specific parameter
$url = $base_url . "?" . http_build_query($requestParameters, '', "&");
curl_setopt($curl, CURLOPT_URL, $url);
$response = curl_exec($curl);
curl_close($curl);
print ($response);
     

// initialisation with your API KEY
final String MY_API_KEY_HERE = "YOUR-API-KEY-HERE";
// base url for the subsequent requests
  final String base_url = "https://api.searoutes.com/ys/shipyards";
// provide a search query
final String url = base_url +  "?offset=10&size=2";
HttpsURLConnection con = (HttpsURLConnection) new URL(url).openConnection();
// send the API key in the request
con.setRequestProperty("x-api-key", MY_API_KEY_HERE);
con.setRequestProperty("accept", "application/json");
ByteArrayOutputStream baos = new ByteArrayOutputStream();
byte[] buffer = new byte[4096];
InputStream is = con.getInputStream();
for (int nRead = is.read(buffer); nRead != -1; nRead = is.read(buffer)) {
    baos.write(buffer, 0, nRead);
}
is.close();
System.out.println(new String(baos.toByteArray(), "UTF8"));
}
     

# Python 3
import requests

# initialisation with your API KEY
MY_API_KEY_HERE = 'YOUR-API-KEY-HERE'

# base url for the subsequent requests
base_url = "https://api.searoutes.com/ys/shipyards"

# custom headers with our API key
request_headers = {
    'accept': 'application/json',
    'x-api-key': MY_API_KEY_HERE
}

# search term
request_params = {'offset': 10,'size': 2}

# create the new url with the specific parameter
url = base_url
response = requests.get(url, headers=request_headers, params=request_params)
print (response.text)

     

The returned object will be a JSON array that contains the list with all the shipyards. For example the request above will return 2 shipyards:

  {
    "shipyards": [
      {
        "id": 4985,
        "type_id": 3,
        "country_id": 16,
        "address_id": 4529,
        "services": "{NEW_BUILDINGS}",
        "name": "ZHEJIANG ZENGZHOU SHIPBUILDING CO., LTD",
        "web": "www.zszengzhou.cn",
        "cranage": 0,
        "ships_in_polygons": 0,
        "approved": false,
        "lon": 0,
        "lat": 0,
        "description": "Zhejiang Zengzhou Shipbuilding Co., Ltd. is the wholly-owned subsidiary of Zengzhou Group. Zengzhou Group is a joint-stock enterprise, located in Yuyao, Zhejiang, which is engaged in the production and trading of steel products. Affiliated enterprises: Yuyao Zengzhou Steel Pipe Factory, Tangshan Fengnan Zengzhou Steel Pipe Co., Ltd., Qian’an Liangang Zengzhou Steel Pipe Co., Ltd., Ningbo Zengzhou Import & Export Co., Ltd., Zhejiang Zengzhou Shipbuilding Co., Ltd. The main products as follows: hot-galvanized pipe, welded steel pipe for low pressure liquid delivery, and steel-plastic complex pipe, which are widely applied in various fields, such as water renovation, architecture, transportation, public utility, etc. Zengzhou Group has an annual output of 500,000 tons hot-galvanized pipe, 190,000 tons galvanized steel pipe, 60,000 tons steel-plastic complex pipe, with the brand of \"Zengzhou\". \"Zengzhou\" is one of the national best sellers in China, and is sold well abroad in dozens of Countries and Regions, such as South East Asia, Middle East, East Europe, South America, Africa, etc, which ranks third in China , with a 10% domestic market share.",
        "main_email": "business@zszengzhou.cn                                                                                                                                                                                                                                         ",
        "is_headoffice": false,
        "year_founded": 2007,
        "employes": 0,
        "revenue": 0,
        "avg_stay": 0
      },
      {
        "id": 4986,
        "type_id": 3,
        "country_id": 16,
        "address_id": 4530,
        "name": "AUSTAL",
        "web": "austal.com",
        "cranage": 0,
        "ships_in_polygons": 9,
        "approved": false,
        "lon": 115.76739016265164,
        "lat": -32.14765109076553,
        "is_headoffice": false,
        "year_founded": 1988,
        "employes": 0,
        "revenue": 0,
        "avg_stay": 0
      }
    ],
    "size": 2
  }

Get a list of all the shipyards within a given area by the area coordinates

Example getting the first 3 shipyards in a area defined by its coordinate:

// initialisation with your API KEY
$MY_API_KEY_HERE = 'YOUR-API-KEY-HERE';
// base url for the subsequent requests
  $base_url = "https://api.searoutes.com/ys/shipyards-in-area";
// send the API key in the request
$curl_headers = array(
    'accept: application/json ',
    'x-Api-key: '.$MY_API_KEY_HERE,
);
// initialize curl and pass the Api key in the header
$curl = curl_init();
curl_setopt($curl, CURLOPT_HTTPHEADER, $curl_headers);
// curl has been initialised and ready to be used

// define our search parameters
$requestParameters = array(
    'ullat' => 45.73,
    'ullon' => 4.24,
    'lrlat' => 35.81,
    'lrlon' => 19.05,
    'size' => 3,
);
// create the new url with the specific parameter
$url = $base_url . "?" . http_build_query($requestParameters, '', "&");
curl_setopt($curl, CURLOPT_URL, $url);
$response = curl_exec($curl);
curl_close($curl);
print ($response);
     

// initialisation with your API KEY
final String MY_API_KEY_HERE = "YOUR-API-KEY-HERE";
// base url for the subsequent requests
final String base_url = "https://api.searoutes.com/ys/shipyards-in-area";
// provide a search query
final String url = base_url +  "?ullat=45.73&ullon=4.24&lrlat=35.81&lrlon=19.05&size=3";
HttpsURLConnection con = (HttpsURLConnection) new URL(url).openConnection();
// send the API key in the request
con.setRequestProperty("x-api-key", MY_API_KEY_HERE);
con.setRequestProperty("accept", "application/json");
ByteArrayOutputStream baos = new ByteArrayOutputStream();
byte[] buffer = new byte[4096];
InputStream is = con.getInputStream();
for (int nRead = is.read(buffer); nRead != -1; nRead = is.read(buffer)) {
    baos.write(buffer, 0, nRead);
}
is.close();
System.out.println(new String(baos.toByteArray(), "UTF8"));
}
     

# Python 3
import requests

# initialisation with your API KEY
MY_API_KEY_HERE = 'YOUR-API-KEY-HERE'

# base url for the subsequent requests
base_url = "https://api.searoutes.com/ys/shipyards-in-area"

# custom headers with our API key
request_headers = {
    'accept': 'application/json',
    'x-api-key': MY_API_KEY_HERE
}

# search terms
request_params = {
    'ullat': 45.73,
    'ullon': 4.24,
    'lrlat': 35.81,
    'lrlon': 19.05,
    'size': 3,
}

# create the new url with the specific parameter
url = base_url
response = requests.get(url, headers=request_headers, params=request_params)
print (response.text)

     

The returned object will be a JSON array that contains the list with all the shipyards. For example the request above will return:

{
  "shipyards": [
    {
      "id": 5488,
      "type_id": 3,
      "country_id": 57,
      "address_id": 5013,
      "name": "ULJANIK SHIPYARD",
      "web": "uljanik.hr",
      "cranage": 0.0,
      "group_name": "ULJANIK                                                                                                                                                                                                                                                        ",
      "ships_in_polygons": 6,
      "approved": false,
      "lon": 13.8375,
      "lat": 44.8651,
      "description": "Since its foundation in 1856 the Shipyard has been developing the shipbuilding activity, the high technological level of which has been achieved and confirmed by generations of employees through many years and by the floating units of top quality built, thus procuring international references and reputation which should be further on increased through:\n\n    a profitable business activity;\n    the construction of ships to special orders of highest world's quality, low costs in service and long lifetime;\n    the construction of sophisticated ships for special purpose for dry and liquid cargo and for more demanding buyers on the world's market;\n    the construction of ships in competitive, shortest possible times with obligatory observing of the contractual delivery terms;\n    quality, terms and price and a further promotion of the international reputation and recognition of the Shipyard.",
      "main_email": "uljanik@uljanik.hr                                                                                                                                                                                                                                             ",
      "is_headoffice": false,
      "year_founded": 1856,
      "employes": 0,
      "revenue": 0,
      "avg_stay": 0
    },
    {
      "id": 5880,
      "type_id": 3,
      "country_id": 106,
      "address_id": 5371,
      "name": "T MARIOTTI SPA",
      "web": "mariottiyard.it",
      "cranage": 0.0,
      "ships_in_polygons": 12,
      "approved": false,
      "lon": 8.9314,
      "lat": 44.3977,
      "description": "T.Mariotti is an innovator, in both technology and design. Its environmental awareness ensures access to the restricted areas that won't admit others. The Shipyard has the vision to bring innovative solutions to life. Cruise ships and mega yachts instantly admired and recognized as a classic over time.\n\nAll T.Mariotti newbuildings adhere to the highest standards and have the most severe environmental certifications. These vessels will enjoy the cleanest seas, and leave them just as clean. Equally important is safety: both at sea and in the building yard, it is of paramount concern.\n\nThe reliability and financial health of the privately held company guarantees continuity of work from design to delivery. A technical team is dedicated to each project, for a tailored approach to perform engineering, manufacturing and construction with an overall view able to optimize each step of the whole project.\n\nDedicated professionals ensure daily updates of the Owners' Team, for full compliance with the Owner's desires. T.Mariotti network of specialized partners, suppliers and subcontractors, carefully selected to the standards of the luxury industry, allows for effective, time-tested joint work.",
      "is_headoffice": false,
      "year_founded": 1928,
      "employes": 0,
      "revenue": 0,
      "avg_stay": 0,
      "second_name": "T. Mariotti S.p.A."
    },
    {
      "id": 5848,
      "type_id": 3,
      "country_id": 106,
      "address_id": 5339,
      "name": "CANTIERI DEL MEDITERRANEO SPA",
      "web": "www.cantieridelmediterraneo.com",
      "cranage": 0.0,
      "ships_in_polygons": 31,
      "approved": false,
      "lon": 14.271,
      "lat": 40.8441,
      "description": "The Shipyard, founded in 1911, is located in the Port of Naples, Italy .\nIt is 6 Km far from Naples International Airport and in connection with road track to speedway. The Shipyard covers an area of 160.000 m2 including workshops, service buildings, drydocks and repair quay.\n\nThe Shipyard owns all infrastructures and equipment for the ship repair purpose including slop collection facilities.\nA total of four drydocks are available to dock ship up to 80.000 DWT.\n\nAll ship repair activities are covered through Shipyard personnel and Shipyard qualifed subcontractors.\n\n• Engine repair - Auxiliary machinery overhaul - Mechanical construction and repairs\n• Steel and piping fabrication\n• Painting - Sandblasting and Hydroblasting (up to 2.500 bar)\n• Boiler repair - Steam turbines overhaul\n• Air conditioning\n• Asbestos removal and site decontamination\n• Ship electrical equipment and machinery\n• Electronics and navigation aids instruments\n• Non destructive testings (NDT: LP/MT/UT/RT)\n• Interiors and outfitting\n\nThe Shipyard procedures are qualified in accordance with ISO 9002.",
      "main_email": "info@cantieridelmediterraneo.com                                                                                                                                                                                                                               ",
      "is_headoffice": false,
      "year_founded": 1911,
      "employes": 0,
      "revenue": 0,
      "avg_stay": 0,
      "second_name": "Cantieri del Mediterraneo"
    }
  ],
  "size": 3
}

Get a list of shipyard by partial query on their name

Example getting on how getting the list of shipyard with the partial search string “palu”

// initialisation with your API KEY
$MY_API_KEY_HERE = 'YOUR-API-KEY-HERE';
// base url for the subsequent requests
  $base_url = "https://api.searoutes.com/ys/shipyards-suggest";
// send the API key in the request
$curl_headers = array(
    'accept: application/json ',
    'x-Api-key: '.$MY_API_KEY_HERE,
);
// initialize curl and pass the Api key in the header
$curl = curl_init();
curl_setopt($curl, CURLOPT_HTTPHEADER, $curl_headers);
// curl has been initialised and ready to be used

// define our search parameters
$requestParameters = array(
  'name' => 'palu'
);
// create the new url with the specific parameter
$url = $base_url . "?" . http_build_query($requestParameters, '', "&");
curl_setopt($curl, CURLOPT_URL, $url);
$response = curl_exec($curl);
curl_close($curl);
print ($response);
     

// initialisation with your API KEY
final String MY_API_KEY_HERE = "YOUR-API-KEY-HERE";
// base url for the subsequent requests
final String base_url = "https://api.searoutes.com/ys/shipyards-suggest";
// provide a search query
final String url = base_url +  "?name=palu";
HttpsURLConnection con = (HttpsURLConnection) new URL(url).openConnection();
// send the API key in the request
con.setRequestProperty("x-api-key", MY_API_KEY_HERE);
con.setRequestProperty("accept", "application/json");
ByteArrayOutputStream baos = new ByteArrayOutputStream();
byte[] buffer = new byte[4096];
InputStream is = con.getInputStream();
for (int nRead = is.read(buffer); nRead != -1; nRead = is.read(buffer)) {
    baos.write(buffer, 0, nRead);
}
is.close();
System.out.println(new String(baos.toByteArray(), "UTF8"));
}
     

# Python 3
import requests

# initialisation with your API KEY
MY_API_KEY_HERE = 'YOUR-API-KEY-HERE'

# base url for the subsequent requests
base_url = "https://api.searoutes.com/ys/shipyards-suggest"

# custom headers with our API key
request_headers = {
    'accept': 'application/json',
    'x-api-key': MY_API_KEY_HERE
}

# search terms
request_params = {
    'name': 'palu'
}

# create the new url with the specific parameter
url = base_url
response = requests.get(url, headers=request_headers, params=request_params)
print (response.text)

     

The returned object will be a JSON array that contains the list with all the shipyards. For example the request above will return:

{
  "shipyards": [
    {
      "id": 5872,
      "name": "PALUMBO SPA-NAPOLI",
      "group_name": "PALUMBO                                                                                                                                                                                                                                                        ",
      "lon": 14.2734,
      "lat": 40.8448,
      "second_name": "PALUMBO (ITALY / NAPLES)"
    },
    {
      "id": 5871,
      "name": "PALUMBO SPA - MESSINA",
      "group_name": "PALUMBO                                                                                                                                                                                                                                                        ",
      "lon": 15.569,
      "lat": 38.1921,
      "second_name": "PALUMBO (ITALY / MESSINA)"
    },
    {
      "id": 7744,
      "name": "PALUMBO(France/Marseille)",
      "short_name": "PALUMBO(France/Marseille)",
      "group_name": "PALUMBO                                                                                                                                                                                                                                                        ",
      "lon": 5.3616,
      "lat": 43.3211,
      "second_name": "PALUMBO(France/Marseille)"
    },
    {
      "id": 5997,
      "name": "PALUMBO MALTA SHIPYARD LTD",
      "group_name": "PALUMBO                                                                                                                                                                                                                                                        ",
      "lon": 14.5164,
      "lat": 35.8814,
      "second_name": "Palumbo Malta shipyard"
    }
  ],
  "size": 4
}

For more information about this API please refer to the Shipyards API Documentation.