> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# List Instagram accounts

> Lists managed Facebook Pages with their linked Instagram professional accounts.

`metaAds.listInstagramAccounts` lists the Facebook Pages the connected identity manages and the Instagram professional account linked to each one.

```ts automations/meta-ads-list-instagram-accounts.automation.ts theme={null}
import { automation, onDashboardRun } from "automate.ax"
import { metaAds } from "automate.ax/meta-ads"

export default automation("List Instagram accounts", () => {
  onDashboardRun({ title: "List Instagram accounts" })
  const accounts = metaAds.listInstagramAccounts()
  // Copy an Instagram account ID into an Instagram comment or message trigger.
})
```

Pass `instagramBusinessAccount.id` as `instagramAccountId` to Instagram actions and triggers. Pages without a linked Instagram account omit `instagramBusinessAccount`. `limit` defaults to `25`; pass `after` or `before` from `pageInfo` to page through results. Optional second argument `{ account }` selects a static project account binding.

Each item includes the Page's `id` and `name` and `instagramBusinessAccount` with `id` and `username`. The action never returns Page access tokens. It needs `instagram_basic` and `pages_show_list`; use [List Pages](https://docs.automate.ax/reference/integrations/meta-ads/actions/list-pages.md) when you only need Facebook Pages.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.