canonical: https://jentic.com/apis/localytics.com/localytics

# Localytics Query API

Jentic publishes the only available OpenAPI specification for Localytics Query API, keeping it validated and agent-ready. Localytics is a mobile and web product analytics platform, and this Query API exposes the analytical data store to external tools. Endpoints cover listing apps, listing the attributes available on each app, and running custom queries against the data set. It is meant to be called from BI tools, scheduled reports, and agent workflows that need to read product usage data programmatically. Authentication is HTTP Basic.

## For AI agents

List Localytics apps, inspect the attributes available for each app, and run custom analytical queries to retrieve product usage data.

## Scope

Does not handle event ingestion, push notifications, or in-app messaging - use for reading apps, attributes, and running analytical queries on existing Localytics data only.

## Capabilities

- List the apps configured in a Localytics account
- Retrieve the attribute schema available for a specific app
- Run custom analytical queries against an app's event and attribute data
- Return aggregated metrics for use in dashboards and scheduled reports
- Authenticate via HTTP Basic with a Localytics API user credential
- Feed Localytics product analytics into external BI tools and agent workflows

## Use cases

### Scheduled Product Analytics Export

Product teams running on Localytics often need a daily export of key metrics into a data warehouse or BI tool. The `/v1/query` endpoint accepts custom queries and returns aggregated results. Combined with `/v1/apps` to enumerate apps and `/v1/apps/{app_id}/attributes` to enumerate filters, a scheduled job can keep the warehouse in sync without manual exports.

Example prompt: Loop GET `/v1/apps` to enumerate apps, then call GET `/v1/query` for each app with the metric query and load results into the warehouse table.

### Marketing Campaign Reporting

Marketing teams want to track event counts and conversions per campaign. Using `/v1/apps/{app_id}/attributes` to discover which attributes are available, an integration constructs a query against `/v1/query` to pull conversions broken down by campaign. The resulting numbers feed into the marketing team's reporting dashboards.

Example prompt: Call GET `/v1/apps/{app_id}/attributes` to confirm the campaign attribute exists, then GET `/v1/query` with the conversion event grouped by that attribute.

### AI Agent Product Analytics Q&A

An AI agent answering product manager questions like 'how many users opened the app yesterday?' can use Jentic to run Localytics queries directly. The agent searches Jentic for the query operation, executes it with the right metric and date filter, and returns the answer in plain language. The Localytics API credential stays in your Jentic One instance.

Example prompt: Use Jentic to call GET `/v1/query` with the daily active users metric for the relevant app and yesterday's date and return the count to the user.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/v1/apps` | List apps in the account |
| GET | `/v1/apps/{app_id}` | Retrieve a specific app |
| GET | `/v1/apps/{app_id}/attributes` | List attributes available on the app |
| GET | `/v1/query` | Run a custom analytical query |

## Key resources

- **Apps** — List apps configured in the Localytics account
- **Attributes** — Inspect the attributes available for a given app
- **Query** — Run custom analytical queries against app event data

## Why Jentic

- **Setup:** Wiring the Localytics Query API by hand means setting up HTTP Basic auth with your key and secret, building the Authorization header on every call, and shaping analytical query requests against api.localytics.com yourself. Through Jentic you install once, import Localytics from the API Directory, store the Basic credentials once, and your agent calls it.
- **Permission scoping:** Localytics puts the app id in the URL path (`/v1/apps/{app_id}/...`), so a rule can pin your agent to one app: it can read that app's attributes and run analytical queries against it and nothing else. You choose the operations it may call, and since this surface is read-only you can keep it to listing apps and running queries.
- **Credential handling:** Your Localytics username and password are stored once, encrypted, by your own Jentic One instance and injected into the Basic Authorization header at execution time. They never enter the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'run a product analytics query' or 'list app attributes', and Jentic returns the matching Localytics operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Mixpanel API** — Alternative product analytics platform with a richer query and export API surface
- **Amplitude API** — Alternative product analytics platform with strong behavioural cohort and funnel APIs
- **Segment API** — Use Segment to forward events into Localytics and then read them back via the Query API

## FAQ

### Why is there no official OpenAPI spec for Localytics Query API?

Localytics does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call Localytics Query API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the Localytics Query API use?

The Query API uses HTTP Basic authentication with a Localytics API username and password. Through Jentic, the credentials are stored encrypted in the vault and injected as the Authorization header at execution time, so the raw values never enter agent context.

### Can I run a custom analytical query directly via the API?

Yes. The `/v1/query` endpoint accepts a query specifying the app, metric, dimensions, and date range, and returns aggregated results. Use `/v1/apps/{app_id}/attributes` first to confirm which attributes are available for grouping or filtering.

### What are the rate limits for the Localytics Query API?

Rate limits are not declared in the spec. Localytics applies account-level rate limits and dataset-size guidance for the Query API; large historical pulls should be batched by date range to avoid timeouts.

### How do I run a Localytics query through Jentic?

Search Jentic for 'run a Localytics analytics query'. Jentic returns the GET `/v1/query` operation. Load the schema, supply the app ID, metric, and filters, and execute. The response is the aggregated result ready for downstream reporting.

### Which apps can I query?

You can query any app present in the authenticated account. Call GET `/v1/apps` to enumerate them, then pass the app_id of interest to `/v1/apps/{app_id}/attributes` and `/v1/query.`

### Can I limit what my agent is allowed to do with the Localytics Query API?

Yes. Jentic One runs on infrastructure you host, so your own rules decide which Localytics operations the agent may call and which credentials it may use. Because Localytics carries the app id in the URL path, you can pin the agent to a single app so it only reads that app's attributes and runs analytical queries against it. This surface is read-only, so you can keep the agent to listing apps, inspecting attributes, and running queries against GET `/v1/query` and nothing else.
