Home

Introduction

Freight Index

version 1

Freight Index API allows user to get daily real-time changes in the market rates for shipments by sea/air/land to a wide range of global destinations.

OpenAPI Specification

Start designing your API in minutes. The OpenAPI specification file enables you to learn and interact with API elements, including all available endpoints, input and output representations.

General information

Freight Index API is organized around REST.
Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

API endpoint#

1https://rates.searates.com/api/v1/freight-index

All endpoints are only accessible via HTTPS and are located at rates.searates.com

Carriers list

get/dictionary/carriers

Find carriers by part of the name or retrieve the full list

Headers

Content-Typeapplication/json

Query Parameters
  • searchOptionalstring

    Text for searching in carriers' names

  • carrier_typeREQUIREDstring

    Carrier type

    Allowed values:SEALINEAIRLINELAND_SHIPPER

Response example
OK
1{
2  "data": [
3    {
4      "id": 10,
5      "name": "Maersk",
6      "short_name": "MAEU",
7      "type": "SEALINE"
8    },
9    {
10      "id": 137,
11      "name": "Maersk Spot",
12      "short_name": "MAEU",
13      "type": "SEALINE"
14    }
15  ]
16}

World regions hierarchy

get/dictionary/regions

Find world regions or retrieve their full list

Headers

Content-Typeapplication/json

Query Parameters
  • searchOptionalstring

    Text for searching in regions' names

  • include_childrenOptionalboolean

    Whether to include next level regions

    Default:false

  • include_parentOptionalboolean

    Whether to include parent region

    Default:false

Response example
OK
1{
2  "data": [
3    {
4      "id": 3,
5      "name": "Europe",
6      "short_name": "EU",
7      "level": 1,
8      "children": [
9        {
10          "id": 10,
11          "name": "Europe",
12          "short_name": "EU",
13          "level": 2,
14          "parent_id": 3
15        }
16      ],
17      "parent_id": null,
18      "parent": null
19    },
20    {
21      "id": 10,
22      "name": "Europe",
23      "short_name": "EU",
24      "level": 2,
25      "children": [
26        {
27          "id": 27,
28          "name": "Eastern Europe",
29          "short_name": "EEU",
30          "level": 3,
31          "parent_id": 10
32        },
33        {
34          "id": 28,
35          "name": "Northern Europe",
36          "short_name": "NEU",
37          "level": 3,
38          "parent_id": 10
39        },
40        {
41          "id": 29,
42          "name": "Southern Europe",
43          "short_name": "SEU",
44          "level": 3,
45          "parent_id": 10
46        },
47        {
48          "id": 30,
49          "name": "Western Europe",
50          "short_name": "WEU",
51          "level": 3,
52          "parent_id": 10
53        }
54      ],
55      "parent_id": 3,
56      "parent": {
57        "id": 3,
58        "name": "Europe",
59        "short_name": "EU",
60        "level": 1,
61        "parent_id": null
62      }
63    },
64    {
65      "id": 27,
66      "name": "Eastern Europe",
67      "short_name": "EEU",
68      "level": 3,
69      "children": [],
70      "parent_id": 10,
71      "parent": {
72        "id": 10,
73        "name": "Europe",
74        "short_name": "EU",
75        "level": 2,
76        "parent_id": 3
77      }
78    },
79    {
80      "id": 28,
81      "name": "Northern Europe",
82      "short_name": "NEU",
83      "level": 3,
84      "children": [],
85      "parent_id": 10,
86      "parent": {
87        "id": 10,
88        "name": "Europe",
89        "short_name": "EU",
90        "level": 2,
91        "parent_id": 3
92      }
93    },
94    {
95      "id": 29,
96      "name": "Southern Europe",
97      "short_name": "SEU",
98      "level": 3,
99      "children": [],
100      "parent_id": 10,
101      "parent": {
102        "id": 10,
103        "name": "Europe",
104        "short_name": "EU",
105        "level": 2,
106        "parent_id": 3
107      }
108    },
109    {
110      "id": 30,
111      "name": "Western Europe",
112      "short_name": "WEU",
113      "level": 3,
114      "children": [],
115      "parent_id": 10,
116      "parent": {
117        "id": 10,
118        "name": "Europe",
119        "short_name": "EU",
120        "level": 2,
121        "parent_id": 3
122      }
123    }
124  ]
125}

Get locations

get/dictionary/locations

Find locations by their name or code (countries, cities, ports, airports)

Headers

Content-Typeapplication/json

Query Parameters
  • searchREQUIREDstring

    Text for searching in locations' names or codes

  • location_typeREQUIREDstring

    Type of location to search

    Allowed values:COUNTRYCITYPORTAIRPORT

  • countryOptionalstring

    Search within selected country (ISO-alpha-2 code)

Response example
OK
1{
2  "data": [
3    {
4      "id": "ChIJuRMYfoNhsUcRoDrWe_I9JgQ",
5      "name": "Hamburg, Germany",
6      "short_name": "DEHTJ",
7      "country": "DE",
8      "latitude": "53.5510846",
9      "longitude": "9.9936819"
10    }
11  ]
12}

Shipping types list

get/dictionary/shipping-types

Find shipping types by part of the name or retrieve the full list. Also includes transport unit types and bulk sizes

Headers

Content-Typeapplication/json

Query Parameters
  • searchOptionalstring

    Text for searching in shipping types' names

  • include_transport_unitsOptionalboolean

    Whether to include available transport unit types

    Default:false

  • include_bulk_sizesOptionalboolean

    Whether to include bulk sizes for available transport unit types

    Default:false

Response example
OK
1{
2  "data": [
3    {
4      "id": 3,
5      "name": "Bulk",
6      "short_name": "BLK",
7      "full_name": "Bulk",
8      "type": "sea",
9      "transport_unit_types": [
10        {
11          "id": 97,
12          "name": "Bulk carrier",
13          "type": "ship",
14          "short_name": "DB",
15          "category": "Ship",
16          "group": "Standard"
17        },
18        {
19          "id": 99,
20          "name": "General cargo vessel",
21          "type": "ship",
22          "short_name": "GCV",
23          "category": "Ship",
24          "group": "Standard"
25        },
26        {
27          "id": 167,
28          "name": "Product tanker",
29          "type": "ship",
30          "short_name": "PT",
31          "category": "Ship",
32          "group": "Tankers"
33        },
34        {
35          "id": 102,
36          "name": "Crude carrier",
37          "type": "ship",
38          "short_name": "CC",
39          "category": "Ship",
40          "group": "Tankers"
41        },
42        {
43          "id": 119,
44          "name": "Asphalt carrier",
45          "type": "ship",
46          "short_name": "AC",
47          "category": "Ship",
48          "group": "Tankers"
49        },
50        {
51          "id": 96,
52          "name": "Chemical tanker",
53          "type": "ship",
54          "short_name": "CT",
55          "category": "Ship",
56          "group": "Tankers"
57        },
58        {
59          "id": 103,
60          "name": "Gas carrier",
61          "type": "ship",
62          "short_name": "GC",
63          "category": "Ship",
64          "group": "Tankers"
65        },
66        {
67          "id": 120,
68          "name": "Heavy-lift",
69          "type": "ship",
70          "short_name": "HL",
71          "category": "Ship",
72          "group": "Specialized"
73        },
74        {
75          "id": 122,
76          "name": "Livestock",
77          "type": "ship",
78          "short_name": "LS",
79          "category": "Ship",
80          "group": "Specialized"
81        },
82        {
83          "id": 100,
84          "name": "Refrigerated",
85          "type": "ship",
86          "short_name": "RF",
87          "category": "Ship",
88          "group": "Specialized"
89        },
90        {
91          "id": 101,
92          "name": "Ro/Ro",
93          "type": "ship",
94          "short_name": "RR",
95          "category": "Ship",
96          "group": "Specialized"
97        },
98        {
99          "id": 121,
100          "name": "Wood chip",
101          "type": "ship",
102          "short_name": "WC",
103          "category": "Ship",
104          "group": "Specialized"
105        }
106      ]
107    }
108  ]
109}

Calculate Freight Index

post/calculate

Main request to calculate Freight index based on selected parameters and filters

Headers

Content-Typeapplication/json

Body Parameters
  • index_idOptionalstring

    String index identifier for searching particular index

  • shipping_typeOptionalinteger

    Shipping type id. Required if index_id is not provided. Can be obtained via /dictionary/shipping-types endpoint

  • transport_unit_typeOptionalinteger

    Transport unit type id. Can be obtained via /dictionary/shipping-types endpoint

  • bulk_sizeOptionalinteger or null

    Bulk size id. Used only with "Bulk" shipping type with corresponding transport unit types. Can be obtained via /dictionary/shipping-types endpoint

  • carrierOptionalinteger or null

    Carrier id. Can be obtained via /dictionary/carriers endpoint

  • origin_location_typeOptionalstring

    Origin location type

    Allowed values:REGIONCOUNTRYCITYPORTAIRPORT

  • origin_location_idOptionalinteger

    Origin location id. Can be obtained via /dictionary/regions or /dictionary/locations endpoints

  • destination_location_typeOptionalstring

    Destination location type

    Allowed values:REGIONCOUNTRYCITYPORTAIRPORT

  • destination_location_idOptionalinteger

    Destination location id. Can be obtained via /dictionary/regions or /dictionary/locations endpoints

  • date_fromOptionalstring

    Start of the period for index calculating. If not set, the day that is one month prior to today will be used.

    Example:2024-05-01

  • date_toOptionalstring

    End of the period for index calculating. If not set, yesterday will be used.

    Default:2024-05-31

  • group_byOptionalstring

    Whether to group date range by days or by months.

    Allowed values:DAYMONTH

Request sample
{
  "index_id": "Rkl8MnxSLTF8Qy1DTnwyfHx8RHwyNC0wMy0wMnwyNC0wMy0xMA==",
  "shipping_type": 2,
  "transport_unit_type": 2,
  "bulk_size": null,
  "carrier": null,
  "origin_location_type": "REGION",
  "origin_location_id": 10,
  "destination_location_type": "REGION",
  "destination_location_id": 11,
  "date_from": "2024-05-01",
  "date_to": "2024-05-07",
  "group_by": "DAY"
}
Response example
OK
1{
2  "success": true,
3  "data": {
4    "id": "Rkl8MnxSLTEwfFItMTF8Mnx8fER8MjQtMDUtMDF8MjQtMDUtMDc=",
5    "title": "FIX-FCL-EU-NAM-40ST",
6    "description": "Average FCL freight index on 40' Standard from Europe to North America",
7    "date_from": "2024-05-01",
8    "date_to": "2024-05-07",
9    "is_subscribed": false,
10    "origin": "Europe",
11    "destination": "North America",
12    "is_valid": false,
13    "chart_data": [
14      {
15        "date": "2024-05-01",
16        "value": 0
17      },
18      {
19        "date": "2024-05-02",
20        "value": 0
21      },
22      {
23        "date": "2024-05-03",
24        "value": 0
25      },
26      {
27        "date": "2024-05-04",
28        "value": 0
29      },
30      {
31        "date": "2024-05-05",
32        "value": 0
33      },
34      {
35        "date": "2024-05-06",
36        "value": 0
37      },
38      {
39        "date": "2024-05-07",
40        "value": 0
41      }
42    ],
43    "statistics": {
44      "min": 0,
45      "max": 0,
46      "average": 0,
47      "median": 0,
48      "first": 0,
49      "last": 0,
50      "change": 0
51    }
52  }
53}

Get user info

post/user

Get info about current user and API statistics

Headers

Content-Typeapplication/json

Body Parameters
  • profile_idOptionalintegerstring

    ID of current profile (user). Can be your SeaRates profile ID or your company's inner identifier. Used to separate different users with one API key.

Response example
OK
1{
2  "success": true,
3  "data": {
4    "profile_id": 111111,
5    "company_id": 222222,
6    "saved_indices": 1,
7    "status": "PREMIUM",
8    "expiration_date": "2024-07-31",
9    "api_calls": {
10      "used": 2,
11      "total": 30000,
12      "remaining": 29998
13    }
14  }
15}

Manage indices

post/manage

Add or remove a particular freight index to/from saved collection

Headers

Content-Typeapplication/json

Body Parameters
  • profile_idREQUIREDintegerstring

    ID of current profile (user). Can be your SeaRates profile ID or your company's inner identifier. Used to separate different users with one API key.

  • actionREQUIREDstring

    Whether to save index to the collection or remove it from.

    Allowed values:SAVEREMOVE

  • index_idREQUIREDstring

    String freight index identifier. Can be obtained as a part of of result of index calculation

Request sample
{
  "index_id": "Rkl8MnxSLTF8Qy1DTnwyfHx8RHwyNC0wMy0wMnwyNC0wMy0xMA==",
  "action": "REMOVE"
}
Response example
OK
1{
2  "success": true
3}

Saved indices

post/saved

Show previously stored indices

Headers

Content-Typeapplication/json

Body Parameters
  • profile_idREQUIREDintegerstring

    ID of current profile (user). Can be your SeaRates profile ID or your company's inner identifier. Used to separate different users with one API key.

  • date_fromOptionalstring

    Start dat to calculate indices. Default - one month prior to today

  • date_toOptionalstring

    End date to calculate indices. Default - yesterday

Request sample
{
  "date_from": "2024-05-01",
  "date_to": "2024-05-07"
}
Response example
OK
1{
2  "success": true,
3  "data": [
4    {
5      "id": "Rkl8MnxSLTF8Qy1ERXwxfHx8RHwyNC0wNC0wMXwyNC0wNC0xMg==",
6      "title": "FIX-FCL-MEAF-DEU-20ST",
7      "description": "Average FCL freight index on 20' Standard from Middle East and Africa to Germany",
8      "date_from": "2024-04-01",
9      "date_to": "2024-04-12",
10      "is_subscribed": true,
11      "origin": "Middle East and Africa",
12      "destination": "Germany",
13      "is_valid": true,
14      "chart_data": [
15        {
16          "date": "2024-04-01",
17          "value": 2034.17
18        },
19        {
20          "date": "2024-04-02",
21          "value": 2034.17
22        },
23        {
24          "date": "2024-04-03",
25          "value": 2034.17
26        },
27        {
28          "date": "2024-04-04",
29          "value": 2034.17
30        },
31        {
32          "date": "2024-04-05",
33          "value": 2034.17
34        },
35        {
36          "date": "2024-04-06",
37          "value": 1835.31
38        },
39        {
40          "date": "2024-04-07",
41          "value": 1934.65
42        },
43        {
44          "date": "2024-04-08",
45          "value": 1932.48
46        },
47        {
48          "date": "2024-04-09",
49          "value": 1932.48
50        },
51        {
52          "date": "2024-04-10",
53          "value": 1932.48
54        },
55        {
56          "date": "2024-04-11",
57          "value": 1932.48
58        },
59        {
60          "date": "2024-04-12",
61          "value": 1932.48
62        }
63      ],
64      "statistics": {
65        "min": 1835.31,
66        "max": 2034.17,
67        "average": 1978.42,
68        "median": 2034.17,
69        "first": 2034.17,
70        "last": 1932.48,
71        "change": -5
72      }
73    }
74  ]
75}
post/trends

Show top trending indices

Headers

Content-Typeapplication/json

Body Parameters
  • date_fromOptionalstring

    Start dat to calculate indices. Default - one month prior to today

  • date_toOptionalstring

    End date to calculate indices. Default - yesterday

  • indices_numberOptionalinteger

    Number of TOP indices to display

    <= 15

Request sample
{
  "date_from": "2024-05-01",
  "date_to": "2024-05-07",
  "indices_number": 5
}
Response example
OK
1{
2  "success": true,
3  "data": [
4    {
5      "id": "Rkl8MnxSLTF8Qy1ERXwxfHx8RHwyNC0wNC0wMXwyNC0wNC0xMg==",
6      "title": "FIX-FCL-MEAF-DEU-20ST",
7      "description": "Average FCL freight index on 20' Standard from Middle East and Africa to Germany",
8      "date_from": "2024-04-01",
9      "date_to": "2024-04-12",
10      "is_subscribed": true,
11      "origin": "Middle East and Africa",
12      "destination": "Germany",
13      "is_valid": true,
14      "chart_data": [
15        {
16          "date": "2024-04-01",
17          "value": 2034.17
18        },
19        {
20          "date": "2024-04-02",
21          "value": 2034.17
22        },
23        {
24          "date": "2024-04-03",
25          "value": 2034.17
26        },
27        {
28          "date": "2024-04-04",
29          "value": 2034.17
30        },
31        {
32          "date": "2024-04-05",
33          "value": 2034.17
34        },
35        {
36          "date": "2024-04-06",
37          "value": 1835.31
38        },
39        {
40          "date": "2024-04-07",
41          "value": 1934.65
42        },
43        {
44          "date": "2024-04-08",
45          "value": 1932.48
46        },
47        {
48          "date": "2024-04-09",
49          "value": 1932.48
50        },
51        {
52          "date": "2024-04-10",
53          "value": 1932.48
54        },
55        {
56          "date": "2024-04-11",
57          "value": 1932.48
58        },
59        {
60          "date": "2024-04-12",
61          "value": 1932.48
62        }
63      ],
64      "statistics": {
65        "min": 1835.31,
66        "max": 2034.17,
67        "average": 1978.42,
68        "median": 2034.17,
69        "first": 2034.17,
70        "last": 1932.48,
71        "change": -5
72      }
73    }
74  ]
75}