Wiki

Case Status
Log In

Wiki

 
List of API Calls»API Call - Port  - Search
  • RSS Feed

Last modified on 19/01/2023 11:02 by User.

Tags:

API Call - Port  - Search

Description:

This call is designed to produce a list of ports based on a set of search criteria.

Parameters:
format json, xml, html
results This sets the number of results per page (e.g. 20).
page This sets which page to display (e.g. 3).
search_criteria

Data search:
country=<locode>
port=<alpha characters>
locale=<locale_id>
facility[<facility>]=true

<facility> can be any one of

Port facilities

airport         ballast         banks         bulk         cont
cranes          cruise             fuel          garbage
isps               lpglng          medical     surveyor     tankers        tugs            wasteoil         water

Cargo facilities

bulk              cont (containers)         cranes         cruise
lpglng           tankers       offshore_terminal

Drydock facilities

   drydock1           drydock2         drydock3             drydock4

Multiple facilities are searched for by repeating the facility clause.

Location search:
distance=nn
distance_unit=nauticalmiles|kilometers|miles

[
    latitude_degrees=nn
    latitude_minutes=nn
    latitude_hemisphere=N|S
    longitude_degrees=nn
    longitude_minutes=nn
    longitude_hemisphere=E|W
] | [ 
    lat=[+|-]nn.ddddd
    lng=[+|-]nnn.ddddd
]

The "port=" search term contains an implicit wildcard at the end, thus "port=a" will return ports beginning a..., aa..., ab... to azzzzz

The "distance=" search term will order results by distance, ascending

Search criteria are ANDed together using the ampersand symbol ("&"). The first search term starts with the querystring symbol ("?"). An API key is required unless the search format is HTML 

sort

Sort by the stated criterion

sort=port                            sort by port name ASC
sort=port_reverse           sort by port name DESC
sort=country                     sort by country name ASC
sort=country_reverse     sort by country name  DESC

Note that a search by distance is automatically ordered by the distance from the stated position in ascending distance order

Call Format:

/api/port/search.<format>?results=<num>&page=<num>&<search_criteria>&sort=<sort_criterion>

Example 1:

Input: https://www.findaport.com/api/port/search.html?results=20&page=1&country=dz
Output: An HTML page showing the first 20 ports in Algeria (where "dz" is the country code for Algeria).

Example 2:

Input:
distance_unit=kilometers&
latitude_degrees=15&
latitude_minutes=0&
latitude_hemisphere=N&
longitude_degrees=16&
longitude_minutes=0&
longitude_hemisphere=W
Output: A JSON file showing all the port that are within 500 kilometers of 15°0N 16°0W.
 

See also 2. General Information for more examples of using the Port Search API Call

Output Fields:

Output Fields Descriptions Examples
search Search criteria used country=dz
total_results Number of hits returned 46
results Number of results on this page 20
page Current page of results 2
piuid Port identifier 1
port Port name Aabenraa
locode Country UN/LOCODE  DK
type Type of entry Port
port_lvl Port level 4
locale_id Locale identifier 99
unctad_port_code   AAB
symbol_id Port image symbol ID 807
lat Latitude of port 55.033333
lng Longitude of port 9.433333
parent_id PIUID of the port which contains the information about this port. 1
web Web address http://www.aabenraaport.dk
has_detail Whether port has detailed information (1 or 0). 1
has_summary Whether port has summary information (1 or 0). 1
plans_count Number of plans and photos available. 3
wx_id Weather identifier 4004
wx_name Name of nearest location where the weather information is available, when it is not available for the port location itself. Abenra
verified_date Date information was verified 2012-01-03
version Version 59893

Output example:

Example Output

Previous API Call: Port - View Table of Contents                 Next API Call: ACE Report Submissions                     Return to API Call Summary


Need an API Key? Click here here for more details.

 

If you would like to find out more about Findaport.com or our Findaport API service, please contact us at info@portinfo.co.uk. Shipping Guides Ltd are recognised industry specialists in publishing port and harbour information for your various port entry requirements. For more information on our products, please visit www.portinfo.co.uk.