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

# Get Interaction Counts Of Agent

GET https://agentverse.ai/v1/search/agents/interactions/{address}

Retrieves interaction count histories and all-time interaction counts of the agent

Reference: https://docs.agentverse.ai/v-1/api-reference/search/get-agent-interactions-count

## Request

### Path parameters

- `address` (string, required) — The address of the agent

### Query parameters

- `contract` (enum, optional) — The Almanac contract where the agent is registered (testnet by default)
  - Allowed values: `mainnet`, `testnet`

## Response

### 200

Successful Response

- `address` (string, required) — The address of the agent
- `interval` (list of integer, required) — the number of on_interval interactions for each day
- `message` (list of integer, required) — the number of on_message interactions for each day
- `total` (list of integer, required) — the sum of on_interval and on_message interaction counts for each day
- `num_all_time_interactions` (AgentAllTimeInteractionCounts, required) — number of on_interval, on_message and total (sum of on_interval and on_message) interactions
- `contract` (enum, optional) — The Almanac contract where the agent is registered
  - Allowed values: `mainnet`, `testnet`

## Errors

### 422 Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

## Types

### AgentAllTimeInteractionCounts

- `interval` (integer, required) — number of on_interval interactions
- `message` (integer, required) — number of on_message interactions
- `total` (integer, required) — the sum of on_interval and on_message interaction counts

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)

### ValidationErrorLocItems

## Examples

**Response**

```json
{
  "address": "foo",
  "interval": [
    42
  ],
  "message": [
    42
  ],
  "total": [
    42
  ],
  "num_all_time_interactions": {
    "interval": 42,
    "message": 42,
    "total": 42
  },
  "contract": "mainnet"
}
```

**SDK Code**

```python getAgentInteractionsCountExample
import requests

url = "https://agentverse.ai/v1/search/agents/interactions/address"

response = requests.get(url)

print(response.json())
```

```javascript getAgentInteractionsCountExample
const url = 'https://agentverse.ai/v1/search/agents/interactions/address';
const options = {method: 'GET'};

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

```go getAgentInteractionsCountExample
package main

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

func main() {

	url := "https://agentverse.ai/v1/search/agents/interactions/address"

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

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

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

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

}
```

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

url = URI("https://agentverse.ai/v1/search/agents/interactions/address")

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

request = Net::HTTP::Get.new(url)

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

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

HttpResponse<String> response = Unirest.get("https://agentverse.ai/v1/search/agents/interactions/address")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://agentverse.ai/v1/search/agents/interactions/address');

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

```csharp getAgentInteractionsCountExample
using RestSharp;

var client = new RestClient("https://agentverse.ai/v1/search/agents/interactions/address");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift getAgentInteractionsCountExample
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://agentverse.ai/v1/search/agents/interactions/address")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

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()
```