@superagnt/instagram-data 2.0.2 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -11
- package/index.js +45 -257
- package/openclaw.plugin.json +27 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,21 +8,20 @@ Use one API key to pull Instagram data (profiles, media, and discovery) for agen
|
|
|
8
8
|
openclaw plugins install @superagnt/instagram-data
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
This package is the official **OpenClaw** plugin for **Instagram** social and public data via [superagnt](https://superagnt.com). Pair it with the [documentation](https://superagnt.com) and your superagnt API key.
|
|
11
|
+
This package is the official **OpenClaw** plugin for **Instagram** social and public data via [superagnt](https://superagnt.com). Pair it with the [documentation](https://superagnt.com/docs) and your superagnt API key.
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## Want the live MCP surface instead?
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
the live tool
|
|
17
|
-
|
|
15
|
+
This plugin ships a fixed, baked-in toolset that only needs your
|
|
16
|
+
`SUPERAGNT_API_KEY`. For the live workspace tool surface — the full value
|
|
17
|
+
layer (data sources plus workspace Postgres, schedules, canvases,
|
|
18
|
+
enrichment), growing server-side with no plugin update — install the
|
|
19
|
+
primary superagnt plugin instead:
|
|
18
20
|
|
|
19
21
|
```bash
|
|
20
|
-
|
|
22
|
+
openclaw plugins install @superagnt/superagnt
|
|
21
23
|
```
|
|
22
24
|
|
|
23
|
-
Without the token the plugin uses its built-in toolset with your
|
|
24
|
-
`SUPERAGNT_API_KEY` — no behavior change from previous versions.
|
|
25
|
-
|
|
26
25
|
## Overview
|
|
27
26
|
|
|
28
27
|
Unified access to user profiles, reels, explore, locations, and hashtag media. Built for LLMs and automation — not one-off scraping.
|
|
@@ -58,8 +57,8 @@ Use a single **superagnt API key** (Bearer token). Set `SUPERAGNT_API_KEY` in yo
|
|
|
58
57
|
|
|
59
58
|
## Documentation
|
|
60
59
|
|
|
61
|
-
- [Documentation](https://superagnt.com) — getting started and concepts
|
|
62
|
-
- [API reference (Instagram)](https://superagnt.com/apis/social/instagram) — endpoints and schemas
|
|
60
|
+
- [Documentation](https://superagnt.com/docs) — getting started and concepts
|
|
61
|
+
- [API reference (Instagram)](https://superagnt.com/docs/apis/social/instagram) — endpoints and schemas
|
|
63
62
|
- [Dashboard](https://app.superagnt.com/dashboard) — API keys and usage
|
|
64
63
|
|
|
65
64
|
## Related
|
package/index.js
CHANGED
|
@@ -28,194 +28,6 @@ function readAgntConfig() {
|
|
|
28
28
|
|
|
29
29
|
// ── End Auth Module ──────────────────────────────────────────────────────────
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
// ── CLI Module (inlined) ─────────────────────────────────────────────────────
|
|
33
|
-
|
|
34
|
-
function maskApiKey(key) {
|
|
35
|
-
if (!key || typeof key !== 'string') return '(none)'
|
|
36
|
-
const k = key.trim()
|
|
37
|
-
if (k.length <= 8) return k.slice(0, 2) + '…'
|
|
38
|
-
return k.slice(0, 6) + '…' + k.slice(-4)
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function registerAgntCli(api) {
|
|
42
|
-
api.registerCli(
|
|
43
|
-
({ program }) => {
|
|
44
|
-
const cmd = program
|
|
45
|
-
.command('superagnt')
|
|
46
|
-
.description('superagnt social data API (status, doctor)')
|
|
47
|
-
|
|
48
|
-
cmd
|
|
49
|
-
.command('status')
|
|
50
|
-
.description('Show whether an API key is configured (masked)')
|
|
51
|
-
.action(async () => {
|
|
52
|
-
const cfg = readAgntConfig()
|
|
53
|
-
const key = cfg?.apiKey
|
|
54
|
-
|
|
55
|
-
console.log('\nsuperagnt status\n')
|
|
56
|
-
if (!key) {
|
|
57
|
-
console.log(' API key: not configured')
|
|
58
|
-
console.log(' Workspace: —')
|
|
59
|
-
console.log('\n Get your API key at: https://app.superagnt.com/dashboard\n')
|
|
60
|
-
return
|
|
61
|
-
}
|
|
62
|
-
console.log(' API key: ' + maskApiKey(key) + ' (from ~/.superagnt/config.json)')
|
|
63
|
-
console.log(' Workspace: ' + (cfg?.workspaceId ?? '—'))
|
|
64
|
-
console.log('')
|
|
65
|
-
})
|
|
66
|
-
|
|
67
|
-
cmd
|
|
68
|
-
.command('doctor')
|
|
69
|
-
.description('Check connectivity and validate API key against api.superagnt.dev')
|
|
70
|
-
.action(async () => {
|
|
71
|
-
console.log('\nsuperagnt doctor\n')
|
|
72
|
-
|
|
73
|
-
try {
|
|
74
|
-
const publicRes = await fetch('https://api.superagnt.com/v1/platforms')
|
|
75
|
-
console.log(' Public API: ' + (publicRes.ok ? 'OK (' + publicRes.status + ')' : 'HTTP ' + publicRes.status))
|
|
76
|
-
} catch (err) {
|
|
77
|
-
const msg = err instanceof Error ? err.message : String(err)
|
|
78
|
-
console.log(' Public API: failed — ' + msg)
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
const cfg = readAgntConfig()
|
|
82
|
-
const key = cfg?.apiKey
|
|
83
|
-
|
|
84
|
-
if (!key) {
|
|
85
|
-
console.log('\n Authenticated: skipped (no API key)')
|
|
86
|
-
console.log(' Get your API key at: https://app.superagnt.com/dashboard\n')
|
|
87
|
-
return
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
try {
|
|
91
|
-
const res = await fetch('https://api.superagnt.com/v1/platforms', {
|
|
92
|
-
headers: { Authorization: 'Bearer ' + key },
|
|
93
|
-
})
|
|
94
|
-
const text = await res.text()
|
|
95
|
-
let summary = 'HTTP ' + res.status
|
|
96
|
-
if (res.ok) {
|
|
97
|
-
try {
|
|
98
|
-
const json = JSON.parse(text)
|
|
99
|
-
const n = Array.isArray(json?.data) ? json.data.length : (json?.data ? Object.keys(json.data).length : 'ok')
|
|
100
|
-
summary = 'OK — platforms payload received (' + (typeof n === 'number' ? n + ' entries' : String(n)) + ')'
|
|
101
|
-
} catch {
|
|
102
|
-
summary = 'OK (' + res.status + ')'
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
console.log(' Authenticated: ' + summary)
|
|
106
|
-
if (!res.ok) {
|
|
107
|
-
console.log(' If 401, get a new key at: https://app.superagnt.com/dashboard')
|
|
108
|
-
}
|
|
109
|
-
} catch (err) {
|
|
110
|
-
const msg = err instanceof Error ? err.message : String(err)
|
|
111
|
-
console.log(' Authenticated: failed — ' + msg)
|
|
112
|
-
}
|
|
113
|
-
console.log('')
|
|
114
|
-
})
|
|
115
|
-
},
|
|
116
|
-
{ commands: ['superagnt'] },
|
|
117
|
-
)
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
// ── End CLI Module ───────────────────────────────────────────────────────────
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
// ── System prompt (inlined) ─────────────────────────────────────────────────
|
|
124
|
-
|
|
125
|
-
function getSystemPrompt(state) {
|
|
126
|
-
const scope = "Only the Instagram API (instagram)."
|
|
127
|
-
if (state.ready && state.toolCount > 0) {
|
|
128
|
-
return (
|
|
129
|
-
'<superagnt>\n' +
|
|
130
|
-
'Ignore pretrained knowledge about superagnt tool names — use only tools that exist in this session.\n' +
|
|
131
|
-
'\n' +
|
|
132
|
-
'## What superagnt is\n' +
|
|
133
|
-
'superagnt exposes **structured social-data HTTP APIs** behind OpenClaw tools. Scope for this plugin: **' + scope + '**.\n' +
|
|
134
|
-
'\n' +
|
|
135
|
-
'## When to use superagnt tools\n' +
|
|
136
|
-
'- Use superagnt when the user needs **live social/network data** (profiles, posts, companies, comments, etc.) from supported platforms.\n' +
|
|
137
|
-
'- Prefer **discovery** when unsure which endpoint fits: call public discovery (GET /v1/platforms and GET /v1/platforms/{slug}) or read tool descriptions; do not invent endpoints or parameters.\n' +
|
|
138
|
-
'\n' +
|
|
139
|
-
'## Platform selection (high level)\n' +
|
|
140
|
-
'- **linkedin** — B2B enrichment, org/person research, hiring/sales workflows\n' +
|
|
141
|
-
'- **youtube** / **tiktok** — video/creator/channel metadata and content signals\n' +
|
|
142
|
-
'- **x** / **reddit** — short-form social and community threads\n' +
|
|
143
|
-
'- **instagram** — visual/creator discovery where Instagram is the source of truth\n' +
|
|
144
|
-
'- **facebook** — pages/groups/marketplace/adjacent Facebook surface areas exposed by the API\n' +
|
|
145
|
-
'\n' +
|
|
146
|
-
'## Rules\n' +
|
|
147
|
-
'- Do **not** fabricate tool names — pick from the registered superagnt_* tools only.\n' +
|
|
148
|
-
'- If authentication fails (401), tell the user to get a new key at https://app.superagnt.com/dashboard\n' +
|
|
149
|
-
'</superagnt>'
|
|
150
|
-
)
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
if (state.ready && state.toolCount === 0) {
|
|
154
|
-
return (
|
|
155
|
-
'<superagnt>\n' +
|
|
156
|
-
'The superagnt plugin loaded but registered **zero** API tools. Check your OpenClaw plugin packaging and regenerate the plugin from @superagnt/clawhub.\n' +
|
|
157
|
-
'</superagnt>'
|
|
158
|
-
)
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
if (state.error) {
|
|
162
|
-
return (
|
|
163
|
-
'<superagnt>\n' +
|
|
164
|
-
'superagnt plugin diagnostic: ' + state.error + '\n' +
|
|
165
|
-
'Do not pretend superagnt tools exist. Ask the user to fix configuration and restart the gateway.\n' +
|
|
166
|
-
'</superagnt>'
|
|
167
|
-
)
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
return (
|
|
171
|
-
'<superagnt>\n' +
|
|
172
|
-
'superagnt tools are still loading. If the user asks for social data right now, ask them to wait a moment and retry.\n' +
|
|
173
|
-
'</superagnt>'
|
|
174
|
-
)
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
// ── End System prompt ────────────────────────────────────────────────────────
|
|
178
|
-
|
|
179
|
-
const MCP_URL = 'https://mcp.superagnt.com/mcp/instagram'
|
|
180
|
-
|
|
181
|
-
async function mcpRpc(token, method, params) {
|
|
182
|
-
const res = await fetch(MCP_URL, {
|
|
183
|
-
method: 'POST',
|
|
184
|
-
headers: {
|
|
185
|
-
Authorization: `Bearer ${token}`,
|
|
186
|
-
'Content-Type': 'application/json',
|
|
187
|
-
Accept: 'application/json, text/event-stream',
|
|
188
|
-
},
|
|
189
|
-
body: JSON.stringify({ jsonrpc: '2.0', id: Date.now(), method, params }),
|
|
190
|
-
})
|
|
191
|
-
if (!res.ok) throw new Error(`MCP ${method} failed: HTTP ${res.status}`)
|
|
192
|
-
const data = await res.json()
|
|
193
|
-
if (data.error) throw new Error(`MCP ${method} error: ${data.error.message}`)
|
|
194
|
-
return data.result
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
async function registerLiveMcpTools(api, token) {
|
|
198
|
-
const result = await mcpRpc(token, 'tools/list', {})
|
|
199
|
-
const tools = Array.isArray(result?.tools) ? result.tools : []
|
|
200
|
-
if (tools.length === 0) throw new Error('MCP tools/list returned no tools')
|
|
201
|
-
for (const t of tools) {
|
|
202
|
-
api.registerTool({
|
|
203
|
-
name: t.name,
|
|
204
|
-
description: t.description,
|
|
205
|
-
inputSchema: t.inputSchema,
|
|
206
|
-
execute: async (input) => {
|
|
207
|
-
const args = parseToolInput(input)
|
|
208
|
-
const r = await mcpRpc(token, 'tools/call', { name: t.name, arguments: args })
|
|
209
|
-
if (r && r.structuredContent !== undefined) return r.structuredContent
|
|
210
|
-
const text = Array.isArray(r?.content) ? r.content.find((c) => c.type === 'text')?.text : undefined
|
|
211
|
-
if (text === undefined) return r
|
|
212
|
-
try { return JSON.parse(text) } catch { return text }
|
|
213
|
-
},
|
|
214
|
-
})
|
|
215
|
-
}
|
|
216
|
-
return tools.length
|
|
217
|
-
}
|
|
218
|
-
|
|
219
31
|
function parseToolInput(input) {
|
|
220
32
|
if (input == null) return {}
|
|
221
33
|
if (typeof input === 'object' && !Array.isArray(input)) return input
|
|
@@ -267,9 +79,8 @@ async function callSuperagnt(apiKey, method, path, query, body) {
|
|
|
267
79
|
return res.json()
|
|
268
80
|
}
|
|
269
81
|
|
|
270
|
-
export default
|
|
82
|
+
export default function register(api) {
|
|
271
83
|
const apiKey = api.pluginConfig.apiKey || process.env.SUPERAGNT_API_KEY || readAgntConfig()?.apiKey
|
|
272
|
-
const mcpToken = api.pluginConfig.mcpToken || process.env.SUPERAGNT_MCP_TOKEN
|
|
273
84
|
|
|
274
85
|
function ensureApiKey() {
|
|
275
86
|
if (apiKey) return apiKey
|
|
@@ -281,30 +92,10 @@ export default async function register(api) {
|
|
|
281
92
|
)
|
|
282
93
|
}
|
|
283
94
|
|
|
284
|
-
registerAgntCli(api)
|
|
285
|
-
|
|
286
|
-
const promptState = { toolCount: 0, error: '', ready: false }
|
|
287
|
-
api.on('before_prompt_build', () => ({
|
|
288
|
-
prependSystemContext: getSystemPrompt(promptState),
|
|
289
|
-
}))
|
|
290
|
-
|
|
291
|
-
// Live MCP mode: a workspace MCP token upgrades this plugin to the server's
|
|
292
|
-
// own tool surface, fetched fresh at load — it grows with agnt_tools_enable
|
|
293
|
-
// and never goes stale. Any failure falls back to the baked toolset below.
|
|
294
|
-
if (mcpToken) {
|
|
295
|
-
try {
|
|
296
|
-
promptState.toolCount = await registerLiveMcpTools(api, mcpToken)
|
|
297
|
-
promptState.ready = true
|
|
298
|
-
return
|
|
299
|
-
} catch (err) {
|
|
300
|
-
promptState.error = 'Live MCP connect failed (' + (err && err.message ? err.message : err) + '); using the built-in toolset.'
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
|
|
304
95
|
api.registerTool({
|
|
305
96
|
name: 'superagnt_instagram_Search_users_by_keyword',
|
|
306
97
|
description: "Search users by keyword",
|
|
307
|
-
|
|
98
|
+
parameters: {
|
|
308
99
|
"type": "object",
|
|
309
100
|
"properties": {
|
|
310
101
|
"fields": {
|
|
@@ -326,7 +117,7 @@ export default async function register(api) {
|
|
|
326
117
|
]
|
|
327
118
|
},
|
|
328
119
|
execute: async (input) => {
|
|
329
|
-
const key =
|
|
120
|
+
const key = ensureApiKey()
|
|
330
121
|
const params = parseToolInput(input)
|
|
331
122
|
return callSuperagnt(key, 'GET', '/search', params)
|
|
332
123
|
},
|
|
@@ -335,7 +126,7 @@ export default async function register(api) {
|
|
|
335
126
|
api.registerTool({
|
|
336
127
|
name: 'superagnt_instagram_Media_by_explore_section_ID',
|
|
337
128
|
description: "Media by explore section ID",
|
|
338
|
-
|
|
129
|
+
parameters: {
|
|
339
130
|
"type": "object",
|
|
340
131
|
"properties": {
|
|
341
132
|
"fields": {
|
|
@@ -361,7 +152,7 @@ export default async function register(api) {
|
|
|
361
152
|
]
|
|
362
153
|
},
|
|
363
154
|
execute: async (input) => {
|
|
364
|
-
const key =
|
|
155
|
+
const key = ensureApiKey()
|
|
365
156
|
const params = parseToolInput(input)
|
|
366
157
|
return callSuperagnt(key, 'GET', '/section', params)
|
|
367
158
|
},
|
|
@@ -370,7 +161,7 @@ export default async function register(api) {
|
|
|
370
161
|
api.registerTool({
|
|
371
162
|
name: 'superagnt_instagram_Explore_sections_list',
|
|
372
163
|
description: "Explore sections list",
|
|
373
|
-
|
|
164
|
+
parameters: {
|
|
374
165
|
"type": "object",
|
|
375
166
|
"properties": {
|
|
376
167
|
"fields": {
|
|
@@ -380,7 +171,7 @@ export default async function register(api) {
|
|
|
380
171
|
}
|
|
381
172
|
},
|
|
382
173
|
execute: async (input) => {
|
|
383
|
-
const key =
|
|
174
|
+
const key = ensureApiKey()
|
|
384
175
|
const params = parseToolInput(input)
|
|
385
176
|
return callSuperagnt(key, 'GET', '/sections', params)
|
|
386
177
|
},
|
|
@@ -389,7 +180,7 @@ export default async function register(api) {
|
|
|
389
180
|
api.registerTool({
|
|
390
181
|
name: 'superagnt_instagram_Cities_by_country_code',
|
|
391
182
|
description: "Cities by country code",
|
|
392
|
-
|
|
183
|
+
parameters: {
|
|
393
184
|
"type": "object",
|
|
394
185
|
"properties": {
|
|
395
186
|
"fields": {
|
|
@@ -410,7 +201,7 @@ export default async function register(api) {
|
|
|
410
201
|
]
|
|
411
202
|
},
|
|
412
203
|
execute: async (input) => {
|
|
413
|
-
const key =
|
|
204
|
+
const key = ensureApiKey()
|
|
414
205
|
const params = parseToolInput(input)
|
|
415
206
|
return callSuperagnt(key, 'GET', '/cities', params)
|
|
416
207
|
},
|
|
@@ -419,7 +210,7 @@ export default async function register(api) {
|
|
|
419
210
|
api.registerTool({
|
|
420
211
|
name: 'superagnt_instagram_Media_by_location_ID',
|
|
421
212
|
description: "Media by location ID",
|
|
422
|
-
|
|
213
|
+
parameters: {
|
|
423
214
|
"type": "object",
|
|
424
215
|
"properties": {
|
|
425
216
|
"fields": {
|
|
@@ -445,7 +236,7 @@ export default async function register(api) {
|
|
|
445
236
|
]
|
|
446
237
|
},
|
|
447
238
|
execute: async (input) => {
|
|
448
|
-
const key =
|
|
239
|
+
const key = ensureApiKey()
|
|
449
240
|
const params = parseToolInput(input)
|
|
450
241
|
return callSuperagnt(key, 'GET', '/location-feeds', params)
|
|
451
242
|
},
|
|
@@ -454,7 +245,7 @@ export default async function register(api) {
|
|
|
454
245
|
api.registerTool({
|
|
455
246
|
name: 'superagnt_instagram_Download_link_by_media_ID_or_URL',
|
|
456
247
|
description: "Download link by media ID or URL",
|
|
457
|
-
|
|
248
|
+
parameters: {
|
|
458
249
|
"type": "object",
|
|
459
250
|
"properties": {
|
|
460
251
|
"fields": {
|
|
@@ -471,7 +262,7 @@ export default async function register(api) {
|
|
|
471
262
|
]
|
|
472
263
|
},
|
|
473
264
|
execute: async (input) => {
|
|
474
|
-
const key =
|
|
265
|
+
const key = ensureApiKey()
|
|
475
266
|
const params = parseToolInput(input)
|
|
476
267
|
return callSuperagnt(key, 'GET', '/post-dl', params)
|
|
477
268
|
},
|
|
@@ -480,7 +271,7 @@ export default async function register(api) {
|
|
|
480
271
|
api.registerTool({
|
|
481
272
|
name: 'superagnt_instagram_Media_info_by_URL',
|
|
482
273
|
description: "Media info by URL",
|
|
483
|
-
|
|
274
|
+
parameters: {
|
|
484
275
|
"type": "object",
|
|
485
276
|
"properties": {
|
|
486
277
|
"fields": {
|
|
@@ -497,7 +288,7 @@ export default async function register(api) {
|
|
|
497
288
|
]
|
|
498
289
|
},
|
|
499
290
|
execute: async (input) => {
|
|
500
|
-
const key =
|
|
291
|
+
const key = ensureApiKey()
|
|
501
292
|
const params = parseToolInput(input)
|
|
502
293
|
return callSuperagnt(key, 'GET', '/post', params)
|
|
503
294
|
},
|
|
@@ -506,7 +297,7 @@ export default async function register(api) {
|
|
|
506
297
|
api.registerTool({
|
|
507
298
|
name: 'superagnt_instagram_Related_profiles_by_user_ID',
|
|
508
299
|
description: "Related profiles by user ID",
|
|
509
|
-
|
|
300
|
+
parameters: {
|
|
510
301
|
"type": "object",
|
|
511
302
|
"properties": {
|
|
512
303
|
"fields": {
|
|
@@ -523,7 +314,7 @@ export default async function register(api) {
|
|
|
523
314
|
]
|
|
524
315
|
},
|
|
525
316
|
execute: async (input) => {
|
|
526
|
-
const key =
|
|
317
|
+
const key = ensureApiKey()
|
|
527
318
|
const params = parseToolInput(input)
|
|
528
319
|
return callSuperagnt(key, 'GET', '/related-profiles', params)
|
|
529
320
|
},
|
|
@@ -532,7 +323,7 @@ export default async function register(api) {
|
|
|
532
323
|
api.registerTool({
|
|
533
324
|
name: 'superagnt_instagram_Reels_by_user_ID',
|
|
534
325
|
description: "Reels by user ID",
|
|
535
|
-
|
|
326
|
+
parameters: {
|
|
536
327
|
"type": "object",
|
|
537
328
|
"properties": {
|
|
538
329
|
"max_id": {
|
|
@@ -558,7 +349,7 @@ export default async function register(api) {
|
|
|
558
349
|
]
|
|
559
350
|
},
|
|
560
351
|
execute: async (input) => {
|
|
561
|
-
const key =
|
|
352
|
+
const key = ensureApiKey()
|
|
562
353
|
const params = parseToolInput(input)
|
|
563
354
|
return callSuperagnt(key, 'GET', '/reels', params)
|
|
564
355
|
},
|
|
@@ -567,7 +358,7 @@ export default async function register(api) {
|
|
|
567
358
|
api.registerTool({
|
|
568
359
|
name: 'superagnt_instagram_Media_list__V2__by_user_ID',
|
|
569
360
|
description: "Media list (V2) by user ID",
|
|
570
|
-
|
|
361
|
+
parameters: {
|
|
571
362
|
"type": "object",
|
|
572
363
|
"properties": {
|
|
573
364
|
"end_cursor": {
|
|
@@ -593,7 +384,7 @@ export default async function register(api) {
|
|
|
593
384
|
]
|
|
594
385
|
},
|
|
595
386
|
execute: async (input) => {
|
|
596
|
-
const key =
|
|
387
|
+
const key = ensureApiKey()
|
|
597
388
|
const params = parseToolInput(input)
|
|
598
389
|
return callSuperagnt(key, 'GET', '/user-feeds2', params)
|
|
599
390
|
},
|
|
@@ -602,7 +393,7 @@ export default async function register(api) {
|
|
|
602
393
|
api.registerTool({
|
|
603
394
|
name: 'superagnt_instagram_Media_list_by_user_ID',
|
|
604
395
|
description: "Media list by user ID",
|
|
605
|
-
|
|
396
|
+
parameters: {
|
|
606
397
|
"type": "object",
|
|
607
398
|
"properties": {
|
|
608
399
|
"count": {
|
|
@@ -632,7 +423,7 @@ export default async function register(api) {
|
|
|
632
423
|
]
|
|
633
424
|
},
|
|
634
425
|
execute: async (input) => {
|
|
635
|
-
const key =
|
|
426
|
+
const key = ensureApiKey()
|
|
636
427
|
const params = parseToolInput(input)
|
|
637
428
|
return callSuperagnt(key, 'GET', '/user-feeds', params)
|
|
638
429
|
},
|
|
@@ -641,7 +432,7 @@ export default async function register(api) {
|
|
|
641
432
|
api.registerTool({
|
|
642
433
|
name: 'superagnt_instagram_User_info__V2__by_username',
|
|
643
434
|
description: "User info (V2) by username",
|
|
644
|
-
|
|
435
|
+
parameters: {
|
|
645
436
|
"type": "object",
|
|
646
437
|
"properties": {
|
|
647
438
|
"fields": {
|
|
@@ -658,7 +449,7 @@ export default async function register(api) {
|
|
|
658
449
|
]
|
|
659
450
|
},
|
|
660
451
|
execute: async (input) => {
|
|
661
|
-
const key =
|
|
452
|
+
const key = ensureApiKey()
|
|
662
453
|
const params = parseToolInput(input)
|
|
663
454
|
return callSuperagnt(key, 'GET', '/profile2', params)
|
|
664
455
|
},
|
|
@@ -667,7 +458,7 @@ export default async function register(api) {
|
|
|
667
458
|
api.registerTool({
|
|
668
459
|
name: 'superagnt_instagram_User_info_by_user_ID',
|
|
669
460
|
description: "User info by user ID",
|
|
670
|
-
|
|
461
|
+
parameters: {
|
|
671
462
|
"type": "object",
|
|
672
463
|
"properties": {
|
|
673
464
|
"fields": {
|
|
@@ -684,7 +475,7 @@ export default async function register(api) {
|
|
|
684
475
|
]
|
|
685
476
|
},
|
|
686
477
|
execute: async (input) => {
|
|
687
|
-
const key =
|
|
478
|
+
const key = ensureApiKey()
|
|
688
479
|
const params = parseToolInput(input)
|
|
689
480
|
return callSuperagnt(key, 'GET', '/profile', params)
|
|
690
481
|
},
|
|
@@ -693,7 +484,7 @@ export default async function register(api) {
|
|
|
693
484
|
api.registerTool({
|
|
694
485
|
name: 'superagnt_instagram_Media_shortcode_from_media_ID',
|
|
695
486
|
description: "Media shortcode from media ID",
|
|
696
|
-
|
|
487
|
+
parameters: {
|
|
697
488
|
"type": "object",
|
|
698
489
|
"properties": {
|
|
699
490
|
"fields": {
|
|
@@ -710,7 +501,7 @@ export default async function register(api) {
|
|
|
710
501
|
]
|
|
711
502
|
},
|
|
712
503
|
execute: async (input) => {
|
|
713
|
-
const key =
|
|
504
|
+
const key = ensureApiKey()
|
|
714
505
|
const params = parseToolInput(input)
|
|
715
506
|
return callSuperagnt(key, 'GET', '/id-media', params)
|
|
716
507
|
},
|
|
@@ -719,7 +510,7 @@ export default async function register(api) {
|
|
|
719
510
|
api.registerTool({
|
|
720
511
|
name: 'superagnt_instagram_Username_from_user_ID',
|
|
721
512
|
description: "Username from user ID",
|
|
722
|
-
|
|
513
|
+
parameters: {
|
|
723
514
|
"type": "object",
|
|
724
515
|
"properties": {
|
|
725
516
|
"fields": {
|
|
@@ -736,7 +527,7 @@ export default async function register(api) {
|
|
|
736
527
|
]
|
|
737
528
|
},
|
|
738
529
|
execute: async (input) => {
|
|
739
|
-
const key =
|
|
530
|
+
const key = ensureApiKey()
|
|
740
531
|
const params = parseToolInput(input)
|
|
741
532
|
return callSuperagnt(key, 'GET', '/id', params)
|
|
742
533
|
},
|
|
@@ -745,7 +536,7 @@ export default async function register(api) {
|
|
|
745
536
|
api.registerTool({
|
|
746
537
|
name: 'superagnt_instagram_Tagged_media_by_user_ID',
|
|
747
538
|
description: "Tagged media by user ID",
|
|
748
|
-
|
|
539
|
+
parameters: {
|
|
749
540
|
"type": "object",
|
|
750
541
|
"properties": {
|
|
751
542
|
"fields": {
|
|
@@ -771,7 +562,7 @@ export default async function register(api) {
|
|
|
771
562
|
]
|
|
772
563
|
},
|
|
773
564
|
execute: async (input) => {
|
|
774
|
-
const key =
|
|
565
|
+
const key = ensureApiKey()
|
|
775
566
|
const params = parseToolInput(input)
|
|
776
567
|
return callSuperagnt(key, 'GET', '/user-tags', params)
|
|
777
568
|
},
|
|
@@ -780,7 +571,7 @@ export default async function register(api) {
|
|
|
780
571
|
api.registerTool({
|
|
781
572
|
name: 'superagnt_instagram_Reposts_by_user_ID',
|
|
782
573
|
description: "Reposts by user ID",
|
|
783
|
-
|
|
574
|
+
parameters: {
|
|
784
575
|
"type": "object",
|
|
785
576
|
"properties": {
|
|
786
577
|
"max_id": {
|
|
@@ -801,7 +592,7 @@ export default async function register(api) {
|
|
|
801
592
|
]
|
|
802
593
|
},
|
|
803
594
|
execute: async (input) => {
|
|
804
|
-
const key =
|
|
595
|
+
const key = ensureApiKey()
|
|
805
596
|
const params = parseToolInput(input)
|
|
806
597
|
return callSuperagnt(key, 'GET', '/user-reposts', params)
|
|
807
598
|
},
|
|
@@ -810,7 +601,7 @@ export default async function register(api) {
|
|
|
810
601
|
api.registerTool({
|
|
811
602
|
name: 'superagnt_instagram_Locations_by_city_ID',
|
|
812
603
|
description: "Locations by city ID",
|
|
813
|
-
|
|
604
|
+
parameters: {
|
|
814
605
|
"type": "object",
|
|
815
606
|
"properties": {
|
|
816
607
|
"page": {
|
|
@@ -831,7 +622,7 @@ export default async function register(api) {
|
|
|
831
622
|
]
|
|
832
623
|
},
|
|
833
624
|
execute: async (input) => {
|
|
834
|
-
const key =
|
|
625
|
+
const key = ensureApiKey()
|
|
835
626
|
const params = parseToolInput(input)
|
|
836
627
|
return callSuperagnt(key, 'GET', '/locations', params)
|
|
837
628
|
},
|
|
@@ -840,7 +631,7 @@ export default async function register(api) {
|
|
|
840
631
|
api.registerTool({
|
|
841
632
|
name: 'superagnt_instagram_Location_info_by_location_ID',
|
|
842
633
|
description: "Location info by location ID",
|
|
843
|
-
|
|
634
|
+
parameters: {
|
|
844
635
|
"type": "object",
|
|
845
636
|
"properties": {
|
|
846
637
|
"fields": {
|
|
@@ -857,7 +648,7 @@ export default async function register(api) {
|
|
|
857
648
|
]
|
|
858
649
|
},
|
|
859
650
|
execute: async (input) => {
|
|
860
|
-
const key =
|
|
651
|
+
const key = ensureApiKey()
|
|
861
652
|
const params = parseToolInput(input)
|
|
862
653
|
return callSuperagnt(key, 'GET', '/location-info', params)
|
|
863
654
|
},
|
|
@@ -866,7 +657,7 @@ export default async function register(api) {
|
|
|
866
657
|
api.registerTool({
|
|
867
658
|
name: 'superagnt_instagram_Web_profile_info_by_username',
|
|
868
659
|
description: "Web profile info by username",
|
|
869
|
-
|
|
660
|
+
parameters: {
|
|
870
661
|
"type": "object",
|
|
871
662
|
"properties": {
|
|
872
663
|
"fields": {
|
|
@@ -883,7 +674,7 @@ export default async function register(api) {
|
|
|
883
674
|
]
|
|
884
675
|
},
|
|
885
676
|
execute: async (input) => {
|
|
886
|
-
const key =
|
|
677
|
+
const key = ensureApiKey()
|
|
887
678
|
const params = parseToolInput(input)
|
|
888
679
|
return callSuperagnt(key, 'GET', '/web-profile', params)
|
|
889
680
|
},
|
|
@@ -892,7 +683,7 @@ export default async function register(api) {
|
|
|
892
683
|
api.registerTool({
|
|
893
684
|
name: 'superagnt_instagram_Music_info_by_music_ID',
|
|
894
685
|
description: "Music info by music ID",
|
|
895
|
-
|
|
686
|
+
parameters: {
|
|
896
687
|
"type": "object",
|
|
897
688
|
"properties": {
|
|
898
689
|
"fields": {
|
|
@@ -913,7 +704,7 @@ export default async function register(api) {
|
|
|
913
704
|
]
|
|
914
705
|
},
|
|
915
706
|
execute: async (input) => {
|
|
916
|
-
const key =
|
|
707
|
+
const key = ensureApiKey()
|
|
917
708
|
const params = parseToolInput(input)
|
|
918
709
|
return callSuperagnt(key, 'GET', '/music', params)
|
|
919
710
|
},
|
|
@@ -922,7 +713,7 @@ export default async function register(api) {
|
|
|
922
713
|
api.registerTool({
|
|
923
714
|
name: 'superagnt_instagram_Media_by_hashtag',
|
|
924
715
|
description: "Media by hashtag",
|
|
925
|
-
|
|
716
|
+
parameters: {
|
|
926
717
|
"type": "object",
|
|
927
718
|
"properties": {
|
|
928
719
|
"end_cursor": {
|
|
@@ -943,12 +734,9 @@ export default async function register(api) {
|
|
|
943
734
|
]
|
|
944
735
|
},
|
|
945
736
|
execute: async (input) => {
|
|
946
|
-
const key =
|
|
737
|
+
const key = ensureApiKey()
|
|
947
738
|
const params = parseToolInput(input)
|
|
948
739
|
return callSuperagnt(key, 'GET', '/tag-feeds', params)
|
|
949
740
|
},
|
|
950
741
|
})
|
|
951
|
-
|
|
952
|
-
promptState.toolCount = 22
|
|
953
|
-
promptState.ready = true
|
|
954
742
|
}
|
package/openclaw.plugin.json
CHANGED
|
@@ -2,7 +2,33 @@
|
|
|
2
2
|
"id": "instagram-data",
|
|
3
3
|
"name": "Instagram Data",
|
|
4
4
|
"description": "Unified access to user profiles, reels, explore, locations, and hashtag media. Built for LLMs and automation — not one-off scraping.",
|
|
5
|
-
"version": "2.0.
|
|
5
|
+
"version": "2.0.4",
|
|
6
|
+
"contracts": {
|
|
7
|
+
"tools": [
|
|
8
|
+
"superagnt_instagram_Search_users_by_keyword",
|
|
9
|
+
"superagnt_instagram_Media_by_explore_section_ID",
|
|
10
|
+
"superagnt_instagram_Explore_sections_list",
|
|
11
|
+
"superagnt_instagram_Cities_by_country_code",
|
|
12
|
+
"superagnt_instagram_Media_by_location_ID",
|
|
13
|
+
"superagnt_instagram_Download_link_by_media_ID_or_URL",
|
|
14
|
+
"superagnt_instagram_Media_info_by_URL",
|
|
15
|
+
"superagnt_instagram_Related_profiles_by_user_ID",
|
|
16
|
+
"superagnt_instagram_Reels_by_user_ID",
|
|
17
|
+
"superagnt_instagram_Media_list__V2__by_user_ID",
|
|
18
|
+
"superagnt_instagram_Media_list_by_user_ID",
|
|
19
|
+
"superagnt_instagram_User_info__V2__by_username",
|
|
20
|
+
"superagnt_instagram_User_info_by_user_ID",
|
|
21
|
+
"superagnt_instagram_Media_shortcode_from_media_ID",
|
|
22
|
+
"superagnt_instagram_Username_from_user_ID",
|
|
23
|
+
"superagnt_instagram_Tagged_media_by_user_ID",
|
|
24
|
+
"superagnt_instagram_Reposts_by_user_ID",
|
|
25
|
+
"superagnt_instagram_Locations_by_city_ID",
|
|
26
|
+
"superagnt_instagram_Location_info_by_location_ID",
|
|
27
|
+
"superagnt_instagram_Web_profile_info_by_username",
|
|
28
|
+
"superagnt_instagram_Music_info_by_music_ID",
|
|
29
|
+
"superagnt_instagram_Media_by_hashtag"
|
|
30
|
+
]
|
|
31
|
+
},
|
|
6
32
|
"configSchema": {
|
|
7
33
|
"type": "object",
|
|
8
34
|
"properties": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superagnt/instagram-data",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Unified access to user profiles, reels, explore, locations, and hashtag media. Built for LLMs and automation — not one-off scraping.",
|
|
6
6
|
"main": "index.js",
|