GETInsights3–7 credits

DM opener

GET https://api.instagramapi.dev/v1/insights/profile/dm-opener

Writes 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

NameTypeRequiredDescription
handlestringyesAn Instagram account. Accepts a username (`nike`), a numeric user id (`13460080`), or a full profile URL (`https://instagram.com/nike`). We resolve it automatically.
offerstringnoWhat you're reaching out about (your product/offer).
tonestringnoDesired tone. Defaults to friendly and professional.
postsnumbernoRecent 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 credits

Example 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.

FieldTypeDescription
usernamestringThe account's @handle.
openerstringThe recommended DM opener.
alternativesarray<string>Alternative opener options.
personalization_notesarray<string>What the opener personalized on.