# Get Observable Entity Details

## User Intent

"How do I retrieve entity details? Show me observable retrieval."

## Operation

**SDK Method**: `queryObservables()`\
**Use Case**: Fetch entity information

***

## Code Example (TypeScript)

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

const graphlit = new Graphlit();

// Get observable details
const result = await graphlit.queryObservables({
  observables: [{ id: 'observable-id' }]
});

const entity = result.observables?.results?.[0];

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

console.log('Entity Details:');
console.log(`Name: ${entity.observable.name}`);
console.log(`Type: ${entity.type}`);
console.log(`ID: ${entity.observable.id}`);

// Properties vary by type
if (entity.observable.properties) {
  console.log('\nProperties:');
  console.log(JSON.stringify(entity.observable.properties, null, 2));
}

// Count mentions
const mentions = await graphlit.queryContents({
  observations: [{ observable: { id: entity.observable.id } }]
});

console.log(`\nMentioned in ${mentions.contents.results.length} documents`);
```

***


---

# 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-details.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.
