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

# Get related records

GET https://app.defdex.io/api/v1/entities/{collection}/{identifier}/{relationship}

Read an allowlisted relationship with a server-enforced parent filter. Organization awards mean direct recipient; agency awards mean awarding agency; funded-awards means funding agency. Program participant/system relations return relationship rows. Requires data:read. See the entity access guide for the complete relationship map. Parent/child reads must observe the same build.

Reference: https://docs.defdex.io/api-reference/entity-lookup-and-relationships/get-related-records

## Authentication

- `Authorization` header (bearer token, required) — Create a scoped key at https://app.defdex.io/developer/keys. Keep it private.

## Request

### Path parameters

- `collection` (enum, required) — Exact identifier; not a website URL.
  - Allowed values: `organizations`, `agencies`, `programs`, `technologies`, `systems`, `sources`
- `identifier` (string, required) — Exact identifier; not a website URL.
- `relationship` (string, required) — Exact identifier; not a website URL.

### Query parameters

- `by` (enum, optional) — Default: UUID-like identifiers use id; otherwise slug. External organization identifiers require scheme.
  - Allowed values: `id`, `slug`, `external`
- `scheme` (string, optional) — Exact published organization-identifiers scheme, required for by=external.
- `limit` (integer, optional, default: 25) — Maximum records per page.
- `cursor` (string, optional) — Opaque next_cursor from the preceding page. Keep dataset, q and filters unchanged.
- `q` (string, optional) — Case-insensitive substring on available name, title, description, summary or recipient_name fields; no ranked or fuzzy search.
- `where` (string, optional) — URL-encoded JSON object, at most 12 fields. Numeric/date gt, gte, lt, lte bounds; in accepts 1–20 non-null scalar values. Predicates are AND-combined.
- `sort` (string, optional) — Published scalar field with :asc or :desc. NULLS LAST with deterministic tie-breaker. Custom-sorted pagination is build-bound and capped at 10,000 matches.
- `filters` (string, optional) — URL-encoded JSON object; exact equality on up to 12 published fields, AND-combined. Primitive or null values only; strings at most 500 characters. For ranges and scalar membership use where; for ordering use sort. No array-containment or OR operators.

## Response

### 200

Success

- `data` (list of Record, required)
- `next_cursor` (string, required, nullable)
- `build_id` (string, required) — Publication observed for this response; compare across related reads.
- `truncated` (boolean, optional) — True when more matches exist past the 10,000-position cap. Narrow exact filters; null next_cursor alone does not prove a complete export.
- `dataset` (string, optional)
- `relationship` (string, optional)
- `parent_id` (string, optional)

## Errors

### 400 Bad Request Error

Invalid query, typed filter, cursor or query exceeds the database budget. Narrow exact filters.

- `error` (string, required)

### 401 Unauthorized Error

Missing, invalid or revoked key.

- `error` (string, required)

### 403 Forbidden Error

Key lacks the required scope.

- `error` (string, required)

### 404 Not Found Error

Unknown dataset, record or account-owned proposal.

- `error` (string, required)

### 409 Conflict Error

Build changed during a read, a build-scoped cursor expired, or an idempotency key conflicts.

- `error` (string, required)

### 429 Too Many Requests Error

Account request limit or correction submission limit reached.

- `error` (string, required)

### 503 Service Unavailable Error

Service temporarily unavailable.

- `error` (string, required)

## Types

### Record

- `record_id` (string, required) — Opaque record lookup ID; distinct from attributes.id and award convenience IDs.
- `attributes` (map from string to any, required)

## Examples

**Response**

```json
{
  "data": [
    {
      "record_id": "string",
      "attributes": {}
    }
  ],
  "next_cursor": "string",
  "build_id": "string",
  "truncated": true,
  "dataset": "string",
  "relationship": "string",
  "parent_id": "string"
}
```

**SDK Code**

```python
import requests

url = "https://app.defdex.io/api/v1/entities/organizations/identifier/relationship"

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

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

print(response.json())
```

```javascript
const url = 'https://app.defdex.io/api/v1/entities/organizations/identifier/relationship';
const options = {method: 'GET', headers: {Authorization: 'Bearer <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://app.defdex.io/api/v1/entities/organizations/identifier/relationship"

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

	req.Header.Add("Authorization", "Bearer <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://app.defdex.io/api/v1/entities/organizations/identifier/relationship")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <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://app.defdex.io/api/v1/entities/organizations/identifier/relationship")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://app.defdex.io/api/v1/entities/organizations/identifier/relationship', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://app.defdex.io/api/v1/entities/organizations/identifier/relationship");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://app.defdex.io/api/v1/entities/organizations/identifier/relationship")! 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()
```