# Get Transactions Details

```typescript
import 'dotenv/config';
import { DataService } from '@kanalabs/mirai';

(async () => {

   // Define the transaction hash and chainId
   const hash = '';
   const chainId = 80001;
   const dataApiKey = process.env.DATASERVICE_API_KEY || '' as string;
   
  // initializating DataService...
  const dataService = new DataService();
   
   // Retrieve transaction details using the specified hash and chainId with your api key
   const response = await dataService.getTransaction(hash, chainId, dataApiKey);
   
   // Log the transaction response
   console.log('response', response);
})()
```


---

# 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.kanalabs.io/smart-wallet-sdk/mirai-sdk-the-evm-smart-wallet-and-paymaster/data-service/get-transactions-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.
