Skip to main content
POST
/
api
/
marinetraffic
/
companies
/
search
/marinetraffic/companies/search
curl --request POST \
  --url https://api.anysite.io/api/marinetraffic/companies/search \
  --header 'Content-Type: application/json' \
  --header 'access-token: <api-key>' \
  --data '
{
  "count": 2,
  "timeout": 300,
  "keyword": "<string>"
}
'
import requests

url = "https://api.anysite.io/api/marinetraffic/companies/search"

payload = {
    "count": 2,
    "timeout": 300,
    "keyword": "<string>"
}
headers = {
    "access-token": "<api-key>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
  method: 'POST',
  headers: {'access-token': '<api-key>', 'Content-Type': 'application/json'},
  body: JSON.stringify({count: 2, timeout: 300, keyword: '<string>'})
};

fetch('https://api.anysite.io/api/marinetraffic/companies/search', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.anysite.io/api/marinetraffic/companies/search",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'count' => 2,
    'timeout' => 300,
    'keyword' => '<string>'
  ]),
  CURLOPT_HTTPHEADER => [
    "Content-Type: application/json",
    "access-token: <api-key>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.anysite.io/api/marinetraffic/companies/search"

	payload := strings.NewReader("{\n  \"count\": 2,\n  \"timeout\": 300,\n  \"keyword\": \"<string>\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("access-token", "<api-key>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.anysite.io/api/marinetraffic/companies/search")
  .header("access-token", "<api-key>")
  .header("Content-Type", "application/json")
  .body("{\n  \"count\": 2,\n  \"timeout\": 300,\n  \"keyword\": \"<string>\"\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.anysite.io/api/marinetraffic/companies/search")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"count\": 2,\n  \"timeout\": 300,\n  \"keyword\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
[
  {
    "id": "<string>",
    "name": "<string>",
    "url": "<string>",
    "@type": "MarinetrafficCompanySearchResult",
    "trading_name": "<string>",
    "sector": "<string>",
    "tagline": "<string>",
    "website_url": "<string>",
    "city": "<string>",
    "country": "<string>",
    "image": "<string>"
  }
]
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>",
      "input": "<unknown>",
      "ctx": {}
    }
  ]
}

Authorizations

access-token
string
header
required

API token from the dashboard

Headers

access-token
string
required

Body

application/json
count
integer
required
Required range: x >= 1
timeout
integer
default:300
Required range: 20 <= x <= 1500
keyword
string | null
Minimum string length: 1
sector
enum<string> | null
Available options:
Agriculture,
Automotive,
Aviation,
Brokerage,
Bunker & Oil Supplies,
Cargo Shippers,
Charterers,
Chartering,
Charts,
Chemicals,
Classification Societies / Flag States,
Cleaning Services,
Coast Guard,
Commodity Trading,
Construction,
Container Sales and Trading,
Crewing Services,
Diving and Underwater Services,
Dredging,
Education / Research / Consultancy,
Electronics,
Energy,
Engine Builders,
Environmental / NGO,
Fishing,
Flag Administration,
Freight Forwarder,
Fresh Water Supply,
Government / Military,
Healthcare,
Heavy Lifting,
Hydrographic Services,
Information Technology,
Insurance / Finance / Legal,
Legal Services,
Logistics / Transport / Freight,
Manufacturing,
Marina,
Marine Equipment Suppliers,
Medical,
Metals and Mining,
Offshore Services,
Oil and Gas,
Other,
P&I Clubs & Correspondents,
Pilots,
Port / Terminal Services,
Port Agents,
Port Authorities,
Port Police,
Publications,
Real Estate,
Retail and Consumer,
Sale and Purchase,
Search and Rescue,
Security,
Ship Breakers,
Ship Builders / Engineering,
Ship Chandlers,
Ship Owners / Managers / Operators,
Ship Repairs,
Ship Services / Suppliers,
Ship Tracking,
Shipping Lines,
Software / Technology,
Sports,
Surveyors,
Taxi,
Telecommunications,
Tourism & Hospitality,
Towage & Salvage,
Transportation,
Travel / Entertainment,
Underwater Cable Operators,
Warehousing,
Waste Disposal,
Weather & Routing Services,
Yacht & Pleasure Craft Builders,
Yacht Chartering,
Yacht Equipment

Response

Successful Response

id
string
required
name
string
required
url
string
required
@type
string
default:MarinetrafficCompanySearchResult
trading_name
string | null
sector
string | null
tagline
string | null
website_url
string | null
city
string | null
country
string | null
image
string | null