# Get Entity Details

## Observable: Get Entity Details

### User Intent

"I want to retrieve full details for a specific entity"

### Operation

* **SDK Method**: `graphlit.queryObservables()`
* **GraphQL**: `observables` query
* **Entity Type**: Observable
* **Common Use Cases**: View entity summary details, diagnose extraction, check occurrence counts

### TypeScript (Canonical)

```typescript
import { Graphlit } from 'graphlit-client';
import {
  ContentFilterInput,
  ObservableTypes,
} from 'graphlit-client/dist/generated/graphql-types';

const graphlit = new Graphlit();

const observableId = 'observable-id-here';

const response = await graphlit.queryObservables({
  contents: [{ id: 'content-id-here' }],
  observables: [{ id: observableId }],
});

const observable = response.observables?.results?.[0];

if (!observable) {
  console.log('Observable not found');
  process.exit(0);
}

console.log(`Entity: ${observable.observable.name}`);
console.log(`Type: ${observable.type}`);

if (observable.observable.description) {
  console.log(`Description: ${observable.observable.description}`);
}
```

## Query observable (snake\_case)

result = await graphlit.client.query\_observables( filter={ "observables": \[{"id": observable\_id}], "contents": \[{"id": content\_id}] } )

observable = (result.observables.results or \[None])\[0]

if observable: print(f"Entity: {observable.observable.name}") print(f"Type: {observable.type}") else: print("Observable not found")

````

**C#**:
```csharp
using Graphlit;

var client = new Graphlit();

var observableId = "observable-id-here";

var result = await graphlit.QueryObservables(new ContentFilter
{
    Observables = new[] { new EntityReferenceFilter { Id = observableId } },
    Contents = new[] { new EntityReferenceFilter { Id = contentId } }
});

var observable = result.Observables?.Results?.FirstOrDefault();

if (observable is null)
{
    Console.WriteLine("Observable not found");
    return;
}

Console.WriteLine($"Entity: {observable.Observable?.Name}");
Console.WriteLine($"Type: {observable.Type}");
````

### Parameters

* **`filter.observables`** (`EntityReferenceFilterInput[]`): One or more observable references (IDs, URIs, names)
* **`filter.contents`** (`EntityReferenceFilterInput[]`, optional): Scope to specific content items
* **`filter.types`** (`ObservableTypes[]`, optional): Restrict to certain entity types (Person, Organization, etc.)
* **`filter.search`** (string, optional): Keyword search across observable names

### Response

```typescript
{
  observables: {
    results: Array<{
      type: ObservableTypes;
      observable: {
        id: string;
        name?: string;
        description?: string;
      };
    }>;
  };
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.graphlit.dev/api-guides/use-cases/knowledge-graph/observable-get.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
