GETInsights3–7 credits
DM opener
GET https://api.instagramapi.dev/v1/insights/profile/dm-openerWrites a short, genuine, non-spammy DM opener personalized to an account, referencing something specific from its profile and recent posts. Pass `offer` (what you're pitching) and optional `tone`. Pairs with `insights/profile/qualify`: qualify a lead, then write the opener. Cost: 3–7 credits depending on the sample window.
Build this with an AI agent
Paste this prompt into Claude, Codex, or any coding agent.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| handle | string | yes | An Instagram account. Accepts a username (`nike`), a numeric user id (`13460080`), or a full profile URL (`https://instagram.com/nike`). We resolve it automatically. |
| offer | string | no | What you're reaching out about (your product/offer). |
| tone | string | no | Desired tone. Defaults to friendly and professional. |
| posts | number | no | Recent posts to personalize from (1–50). Defaults to 6. |
Example request
curl "https://api.instagramapi.dev/v1/insights/profile/dm-opener?handle=nike&offer=our%20influencer%20marketing%20platform&tone=casual&posts=6" \
-H "Authorization: Bearer $INSTAGRAMAPI_KEY"Try it
Live request · uses 3 creditsExample responses
Switch tabs to see the body shape for success and each error status.
{
"data": {
"username": "nike",
"opener": "Loved your sunrise track series, the way you tie product to athlete stories is unreal…",
"alternatives": [
"Your latest carousel on summer training really stood out…"
],
"personalization_notes": [
"References recent athlete-story posts",
"Notes their carousel format"
]
},
"meta": {
"endpoint": "insights/profile/dm-opener",
"request_id": "req_3f8a1c9e",
"credits_charged": 3,
"credits_remaining": 4987,
"ms": 412
}
}Response fields
Fields returned under data on a 200 response. Every response also includes a meta object with billing info.
| Field | Type | Description |
|---|---|---|
| username | string | The account's @handle. |
| opener | string | The recommended DM opener. |
| alternatives | array<string> | Alternative opener options. |
| personalization_notes | array<string> | What the opener personalized on. |