Neynar Documentation
fetchValidateFrameAnalytics
Analytics for the mini app
Group: Frame APIs
Use this when you need: Analytics for the mini app.
Usage
import { NeynarAPIClient, Configuration } from "@neynar/nodejs-sdk";
const client = new NeynarAPIClient(
new Configuration({ apiKey: "YOUR_NEYNAR_API_KEY" })
);
const res = await client.fetchValidateFrameAnalytics({
frameUrl: "example", // URL of the mini app to fetch analytics for
analyticsType: "value", // Type of analytics to fetch
start: "example", // required
stop: "example", // required
// aggregateWindow: "value",
});
console.log(res);
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
frameUrl |
string |
✅ | URL of the mini app to fetch analytics for |
analyticsType |
FetchValidateFrameAnalyticsAnalyticsTypeEnum |
✅ | Type of analytics to fetch |
start |
string |
✅ | - |
stop |
string |
✅ | - |
aggregateWindow |
FetchValidateFrameAnalyticsAggregateWindowEnum |
❌ | - |
Response
Returns a RequestArgs object.
Error Handling
try {
const res = await client.fetchValidateFrameAnalytics({ /* required fields */ });
// use res
} catch (err) {
// Axios/HTTP errors, invalid params, auth issues, etc.
console.error(err);
}
Tips
- Provide a viewerFid when supported to respect mutes/blocks and include
viewer_context. - Keep requests scoped (e.g., use
limit) to improve latency. - Cache results where sensible.