> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://documentation.sayari.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://documentation.sayari.com/_mcp/server.

# Get Relationships

GET https://api.sayari.com/v1/ontology/relationships

Get relationships from ontology data.

Reference: https://documentation.sayari.com/api/api-reference/ontology/get-relationships

## Authentication

- OAuth2 — send the obtained token as `Authorization: Bearer <token>`

## Servers

- `https://api.sayari.com` (Production, default)
- `https://api.internal.sayari.com` (Dev)
- `https://api.uk.sayari.com` (Production_UK)

## Request

### Query parameters

- `id` (list of enum, optional) — Relationship Id filter.
  - Allowed values: `associate_of`, `has_associate`, `auditor_of`, `has_auditor`, `awarder_of`, `awarded_by`, `beneficial_owner_of`, `has_beneficial_owner`, `branch_of`, `has_branch`, `carrier_of`, `has_carrier`, `client_of`, `has_client`, `credits_to`, `credited_by`, `debits_from`, `debited_by`, `director_of`, `has_director`, `employee_of`, `has_employee`, `executive_of`, `has_executive`, `family_of`, `founder_of`, `has_founder`, `generic`, `issuer_of`, `has_issuer`, `judicial_representative_of`, `has_judicial_representative`, `judidical_representative_of`, `lawyer_in`, `has_lawyer`, `lawyer_of`, `legal_predecessor_of`, `has_legal_predecessor`, `legal_representative_of`, `has_legal_representative`, `legal_successor_of`, `has_legal_successor`, `linked_to`, `liquidator_of`, `has_liquidator`, `manager_of`, `has_manager`, `member_of_the_board_of`, `has_member_of_the_board`, `notify_party_of`, `has_notify_party`, `officer_of`, `has_officer`, `owner_of`, `has_owner`, `partner_of`, `has_partner`, `party_to`, `has_party`, `procures_from`, `contracted_by`, `receiver_of`, `received_by`, `recipient_of`, `awarded_to`, `registered_agent_of`, `has_registered_agent`, `secretary_of`, `has_secretary`, `shareholder_of`, `has_shareholder`, `shipper_of`, `shipped_by`, `ships_to`, `receives_from`, `sole_proprietor_of`, `has_sole_proprietor`, `subsidiary_of`, `has_subsidiary`, `supervisor_of`, `has_supervisor`, `transfers_to`, `transfers_from`, `possibly_same_as`

## Response

### 200

- `filters` (OntologyRelationshipsFilters, required)
- `data` (list of OntologyRelationship, required)
- `total_count` (integer, required)

## Errors

### 400 Bad Request

- `any`

### 401 Unauthorized

- `any`

### 404 Not Found

- `status` (integer, required)
- `message` (list of string, required)
- `success` (boolean, required)

### 405 Method Not Allowed

- `status` (integer, required)
- `message` (list of string, required)
- `success` (boolean, required)

### 429 Rate Limit Exceeded

- `any`

### 500 Internal Server Error

- `any`

## Types

### OntologyRelationshipsFilters

- `id` (list of enum, optional) — Relationship Id filter.
  - Allowed values: `associate_of`, `has_associate`, `auditor_of`, `has_auditor`, `awarder_of`, `awarded_by`, `beneficial_owner_of`, `has_beneficial_owner`, `branch_of`, `has_branch`, `carrier_of`, `has_carrier`, `client_of`, `has_client`, `credits_to`, `credited_by`, `debits_from`, `debited_by`, `director_of`, `has_director`, `employee_of`, `has_employee`, `executive_of`, `has_executive`, `family_of`, `founder_of`, `has_founder`, `generic`, `issuer_of`, `has_issuer`, `judicial_representative_of`, `has_judicial_representative`, `judidical_representative_of`, `lawyer_in`, `has_lawyer`, `lawyer_of`, `legal_predecessor_of`, `has_legal_predecessor`, `legal_representative_of`, `has_legal_representative`, `legal_successor_of`, `has_legal_successor`, `linked_to`, `liquidator_of`, `has_liquidator`, `manager_of`, `has_manager`, `member_of_the_board_of`, `has_member_of_the_board`, `notify_party_of`, `has_notify_party`, `officer_of`, `has_officer`, `owner_of`, `has_owner`, `partner_of`, `has_partner`, `party_to`, `has_party`, `procures_from`, `contracted_by`, `receiver_of`, `received_by`, `recipient_of`, `awarded_to`, `registered_agent_of`, `has_registered_agent`, `secretary_of`, `has_secretary`, `shareholder_of`, `has_shareholder`, `shipper_of`, `shipped_by`, `ships_to`, `receives_from`, `sole_proprietor_of`, `has_sole_proprietor`, `subsidiary_of`, `has_subsidiary`, `supervisor_of`, `has_supervisor`, `transfers_to`, `transfers_from`, `possibly_same_as`

### OntologyRelationship

- `id` (enum, required)
  - Allowed values: `associate_of`, `has_associate`, `auditor_of`, `has_auditor`, `awarder_of`, `awarded_by`, `beneficial_owner_of`, `has_beneficial_owner`, `branch_of`, `has_branch`, `carrier_of`, `has_carrier`, `client_of`, `has_client`, `credits_to`, `credited_by`, `debits_from`, `debited_by`, `director_of`, `has_director`, `employee_of`, `has_employee`, `executive_of`, `has_executive`, `family_of`, `founder_of`, `has_founder`, `generic`, `issuer_of`, `has_issuer`, `judicial_representative_of`, `has_judicial_representative`, `judidical_representative_of`, `lawyer_in`, `has_lawyer`, `lawyer_of`, `legal_predecessor_of`, `has_legal_predecessor`, `legal_representative_of`, `has_legal_representative`, `legal_successor_of`, `has_legal_successor`, `linked_to`, `liquidator_of`, `has_liquidator`, `manager_of`, `has_manager`, `member_of_the_board_of`, `has_member_of_the_board`, `notify_party_of`, `has_notify_party`, `officer_of`, `has_officer`, `owner_of`, `has_owner`, `partner_of`, `has_partner`, `party_to`, `has_party`, `procures_from`, `contracted_by`, `receiver_of`, `received_by`, `recipient_of`, `awarded_to`, `registered_agent_of`, `has_registered_agent`, `secretary_of`, `has_secretary`, `shareholder_of`, `has_shareholder`, `shipper_of`, `shipped_by`, `ships_to`, `receives_from`, `sole_proprietor_of`, `has_sole_proprietor`, `subsidiary_of`, `has_subsidiary`, `supervisor_of`, `has_supervisor`, `transfers_to`, `transfers_from`, `possibly_same_as`
- `label` (string, required)
- `description` (string, required)
- `comment` (string, required)
- `type` (string, required)
- `inverse` (enum, required)
  - Allowed values: `associate_of`, `has_associate`, `auditor_of`, `has_auditor`, `awarder_of`, `awarded_by`, `beneficial_owner_of`, `has_beneficial_owner`, `branch_of`, `has_branch`, `carrier_of`, `has_carrier`, `client_of`, `has_client`, `credits_to`, `credited_by`, `debits_from`, `debited_by`, `director_of`, `has_director`, `employee_of`, `has_employee`, `executive_of`, `has_executive`, `family_of`, `founder_of`, `has_founder`, `generic`, `issuer_of`, `has_issuer`, `judicial_representative_of`, `has_judicial_representative`, `judidical_representative_of`, `lawyer_in`, `has_lawyer`, `lawyer_of`, `legal_predecessor_of`, `has_legal_predecessor`, `legal_representative_of`, `has_legal_representative`, `legal_successor_of`, `has_legal_successor`, `linked_to`, `liquidator_of`, `has_liquidator`, `manager_of`, `has_manager`, `member_of_the_board_of`, `has_member_of_the_board`, `notify_party_of`, `has_notify_party`, `officer_of`, `has_officer`, `owner_of`, `has_owner`, `partner_of`, `has_partner`, `party_to`, `has_party`, `procures_from`, `contracted_by`, `receiver_of`, `received_by`, `recipient_of`, `awarded_to`, `registered_agent_of`, `has_registered_agent`, `secretary_of`, `has_secretary`, `shareholder_of`, `has_shareholder`, `shipper_of`, `shipped_by`, `ships_to`, `receives_from`, `sole_proprietor_of`, `has_sole_proprietor`, `subsidiary_of`, `has_subsidiary`, `supervisor_of`, `has_supervisor`, `transfers_to`, `transfers_from`, `possibly_same_as`
- `between` (list of OntologyRelationshipBetween, required)
- `attributes` (list of enum, required)
  - Allowed values: `additional_information`, `address`, `business_purpose`, `company_type`, `contact`, `country`, `date_of_birth`, `finances`, `financials`, `gender`, `generic`, `identifier`, `measurement`, `monetary_value`, `name`, `person_status`, `position`, `risk_event`, `risk_intelligence`, `shares`, `status`, `translated_name`, `weak_identifier`

### OntologyRelationshipBetween

- `from` (enum, required) — This represents which type of entity is being returned.
  - Allowed values: `account`, `aircraft`, `company`, `contract`, `generic`, `government_organization`, `intellectual_property`, `legal_matter`, `person`, `property`, `security`, `shipment`, `tradename`, `transaction`, `unknown`, `vessel`
- `to` (enum, required) — This represents which type of entity is being returned.
  - Allowed values: `account`, `aircraft`, `company`, `contract`, `generic`, `government_organization`, `intellectual_property`, `legal_matter`, `person`, `property`, `security`, `shipment`, `tradename`, `transaction`, `unknown`, `vessel`

## Examples

**Response**

```json
{
  "filters": {
    "id": [
      "auditor_of"
    ]
  },
  "data": [
    {
      "id": "auditor_of",
      "label": "Auditor Of",
      "description": "Companies audited by this entity",
      "comment": "The source entity is reported to be the auditor of a company",
      "type": "forward",
      "inverse": "has_auditor",
      "between": [
        {
          "from": "person",
          "to": "company"
        },
        {
          "from": "company",
          "to": "company"
        }
      ],
      "attributes": [
        "additional_information",
        "position"
      ]
    }
  ],
  "total_count": 1234
}
```

**SDK Code**

```python
import requests

url = "https://api.sayari.com/v1/ontology/relationships"

querystring = {"id":"[\"auditor_of\"]"}

headers = {"Authorization": "<token>."}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript
const url = 'https://api.sayari.com/v1/ontology/relationships?id=%5B%22auditor_of%22%5D';
const options = {method: 'GET', headers: {Authorization: '<token>.'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

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

func main() {

	url := "https://api.sayari.com/v1/ontology/relationships?id=%5B%22auditor_of%22%5D"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "<token>.")

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.sayari.com/v1/ontology/relationships?id=%5B%22auditor_of%22%5D")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = '<token>.'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.sayari.com/v1/ontology/relationships?id=%5B%22auditor_of%22%5D")
  .header("Authorization", "<token>.")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.sayari.com/v1/ontology/relationships?id=%5B%22auditor_of%22%5D', [
  'headers' => [
    'Authorization' => '<token>.',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.sayari.com/v1/ontology/relationships?id=%5B%22auditor_of%22%5D");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "<token>.");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "<token>."]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.sayari.com/v1/ontology/relationships?id=%5B%22auditor_of%22%5D")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```