@superagnt/instagram-data 2.0.3 → 2.0.5

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/index.js CHANGED
@@ -7,7 +7,8 @@ import { homedir as _homedir } from 'node:os'
7
7
  import { join as _join } from 'node:path'
8
8
  import { existsSync as _existsSync, readFileSync as _readFileSync } from 'node:fs'
9
9
 
10
- const BASE_URL = 'https://api.superagnt.com/v1/data/instagram'
10
+ // SUPERAGNT_API_URL overrides the API origin (QA/staging); customers never set it.
11
+ const BASE_URL = (process.env.SUPERAGNT_API_URL || 'https://api.superagnt.com') + '/v1/data/instagram'
11
12
 
12
13
 
13
14
  // ── Auth Module (inlined) ────────────────────────────────────────────────────
@@ -95,7 +96,7 @@ export default function register(api) {
95
96
  api.registerTool({
96
97
  name: 'superagnt_instagram_Search_users_by_keyword',
97
98
  description: "Search users by keyword",
98
- inputSchema: {
99
+ parameters: {
99
100
  "type": "object",
100
101
  "properties": {
101
102
  "fields": {
@@ -116,7 +117,7 @@ export default function register(api) {
116
117
  "query"
117
118
  ]
118
119
  },
119
- execute: async (input) => {
120
+ execute: async (_toolCallId, input) => {
120
121
  const key = ensureApiKey()
121
122
  const params = parseToolInput(input)
122
123
  return callSuperagnt(key, 'GET', '/search', params)
@@ -126,7 +127,7 @@ export default function register(api) {
126
127
  api.registerTool({
127
128
  name: 'superagnt_instagram_Media_by_explore_section_ID',
128
129
  description: "Media by explore section ID",
129
- inputSchema: {
130
+ parameters: {
130
131
  "type": "object",
131
132
  "properties": {
132
133
  "fields": {
@@ -151,7 +152,7 @@ export default function register(api) {
151
152
  "id"
152
153
  ]
153
154
  },
154
- execute: async (input) => {
155
+ execute: async (_toolCallId, input) => {
155
156
  const key = ensureApiKey()
156
157
  const params = parseToolInput(input)
157
158
  return callSuperagnt(key, 'GET', '/section', params)
@@ -161,7 +162,7 @@ export default function register(api) {
161
162
  api.registerTool({
162
163
  name: 'superagnt_instagram_Explore_sections_list',
163
164
  description: "Explore sections list",
164
- inputSchema: {
165
+ parameters: {
165
166
  "type": "object",
166
167
  "properties": {
167
168
  "fields": {
@@ -170,7 +171,7 @@ export default function register(api) {
170
171
  }
171
172
  }
172
173
  },
173
- execute: async (input) => {
174
+ execute: async (_toolCallId, input) => {
174
175
  const key = ensureApiKey()
175
176
  const params = parseToolInput(input)
176
177
  return callSuperagnt(key, 'GET', '/sections', params)
@@ -180,7 +181,7 @@ export default function register(api) {
180
181
  api.registerTool({
181
182
  name: 'superagnt_instagram_Cities_by_country_code',
182
183
  description: "Cities by country code",
183
- inputSchema: {
184
+ parameters: {
184
185
  "type": "object",
185
186
  "properties": {
186
187
  "fields": {
@@ -200,7 +201,7 @@ export default function register(api) {
200
201
  "country_code"
201
202
  ]
202
203
  },
203
- execute: async (input) => {
204
+ execute: async (_toolCallId, input) => {
204
205
  const key = ensureApiKey()
205
206
  const params = parseToolInput(input)
206
207
  return callSuperagnt(key, 'GET', '/cities', params)
@@ -210,7 +211,7 @@ export default function register(api) {
210
211
  api.registerTool({
211
212
  name: 'superagnt_instagram_Media_by_location_ID',
212
213
  description: "Media by location ID",
213
- inputSchema: {
214
+ parameters: {
214
215
  "type": "object",
215
216
  "properties": {
216
217
  "fields": {
@@ -235,7 +236,7 @@ export default function register(api) {
235
236
  "id"
236
237
  ]
237
238
  },
238
- execute: async (input) => {
239
+ execute: async (_toolCallId, input) => {
239
240
  const key = ensureApiKey()
240
241
  const params = parseToolInput(input)
241
242
  return callSuperagnt(key, 'GET', '/location-feeds', params)
@@ -245,7 +246,7 @@ export default function register(api) {
245
246
  api.registerTool({
246
247
  name: 'superagnt_instagram_Download_link_by_media_ID_or_URL',
247
248
  description: "Download link by media ID or URL",
248
- inputSchema: {
249
+ parameters: {
249
250
  "type": "object",
250
251
  "properties": {
251
252
  "fields": {
@@ -261,7 +262,7 @@ export default function register(api) {
261
262
  "url"
262
263
  ]
263
264
  },
264
- execute: async (input) => {
265
+ execute: async (_toolCallId, input) => {
265
266
  const key = ensureApiKey()
266
267
  const params = parseToolInput(input)
267
268
  return callSuperagnt(key, 'GET', '/post-dl', params)
@@ -271,7 +272,7 @@ export default function register(api) {
271
272
  api.registerTool({
272
273
  name: 'superagnt_instagram_Media_info_by_URL',
273
274
  description: "Media info by URL",
274
- inputSchema: {
275
+ parameters: {
275
276
  "type": "object",
276
277
  "properties": {
277
278
  "fields": {
@@ -287,7 +288,7 @@ export default function register(api) {
287
288
  "url"
288
289
  ]
289
290
  },
290
- execute: async (input) => {
291
+ execute: async (_toolCallId, input) => {
291
292
  const key = ensureApiKey()
292
293
  const params = parseToolInput(input)
293
294
  return callSuperagnt(key, 'GET', '/post', params)
@@ -297,7 +298,7 @@ export default function register(api) {
297
298
  api.registerTool({
298
299
  name: 'superagnt_instagram_Related_profiles_by_user_ID',
299
300
  description: "Related profiles by user ID",
300
- inputSchema: {
301
+ parameters: {
301
302
  "type": "object",
302
303
  "properties": {
303
304
  "fields": {
@@ -313,7 +314,7 @@ export default function register(api) {
313
314
  "id"
314
315
  ]
315
316
  },
316
- execute: async (input) => {
317
+ execute: async (_toolCallId, input) => {
317
318
  const key = ensureApiKey()
318
319
  const params = parseToolInput(input)
319
320
  return callSuperagnt(key, 'GET', '/related-profiles', params)
@@ -323,7 +324,7 @@ export default function register(api) {
323
324
  api.registerTool({
324
325
  name: 'superagnt_instagram_Reels_by_user_ID',
325
326
  description: "Reels by user ID",
326
- inputSchema: {
327
+ parameters: {
327
328
  "type": "object",
328
329
  "properties": {
329
330
  "max_id": {
@@ -348,7 +349,7 @@ export default function register(api) {
348
349
  "id"
349
350
  ]
350
351
  },
351
- execute: async (input) => {
352
+ execute: async (_toolCallId, input) => {
352
353
  const key = ensureApiKey()
353
354
  const params = parseToolInput(input)
354
355
  return callSuperagnt(key, 'GET', '/reels', params)
@@ -358,7 +359,7 @@ export default function register(api) {
358
359
  api.registerTool({
359
360
  name: 'superagnt_instagram_Media_list__V2__by_user_ID',
360
361
  description: "Media list (V2) by user ID",
361
- inputSchema: {
362
+ parameters: {
362
363
  "type": "object",
363
364
  "properties": {
364
365
  "end_cursor": {
@@ -383,7 +384,7 @@ export default function register(api) {
383
384
  "id"
384
385
  ]
385
386
  },
386
- execute: async (input) => {
387
+ execute: async (_toolCallId, input) => {
387
388
  const key = ensureApiKey()
388
389
  const params = parseToolInput(input)
389
390
  return callSuperagnt(key, 'GET', '/user-feeds2', params)
@@ -393,7 +394,7 @@ export default function register(api) {
393
394
  api.registerTool({
394
395
  name: 'superagnt_instagram_Media_list_by_user_ID',
395
396
  description: "Media list by user ID",
396
- inputSchema: {
397
+ parameters: {
397
398
  "type": "object",
398
399
  "properties": {
399
400
  "count": {
@@ -422,7 +423,7 @@ export default function register(api) {
422
423
  "id"
423
424
  ]
424
425
  },
425
- execute: async (input) => {
426
+ execute: async (_toolCallId, input) => {
426
427
  const key = ensureApiKey()
427
428
  const params = parseToolInput(input)
428
429
  return callSuperagnt(key, 'GET', '/user-feeds', params)
@@ -432,7 +433,7 @@ export default function register(api) {
432
433
  api.registerTool({
433
434
  name: 'superagnt_instagram_User_info__V2__by_username',
434
435
  description: "User info (V2) by username",
435
- inputSchema: {
436
+ parameters: {
436
437
  "type": "object",
437
438
  "properties": {
438
439
  "fields": {
@@ -448,7 +449,7 @@ export default function register(api) {
448
449
  "username"
449
450
  ]
450
451
  },
451
- execute: async (input) => {
452
+ execute: async (_toolCallId, input) => {
452
453
  const key = ensureApiKey()
453
454
  const params = parseToolInput(input)
454
455
  return callSuperagnt(key, 'GET', '/profile2', params)
@@ -458,7 +459,7 @@ export default function register(api) {
458
459
  api.registerTool({
459
460
  name: 'superagnt_instagram_User_info_by_user_ID',
460
461
  description: "User info by user ID",
461
- inputSchema: {
462
+ parameters: {
462
463
  "type": "object",
463
464
  "properties": {
464
465
  "fields": {
@@ -474,7 +475,7 @@ export default function register(api) {
474
475
  "id"
475
476
  ]
476
477
  },
477
- execute: async (input) => {
478
+ execute: async (_toolCallId, input) => {
478
479
  const key = ensureApiKey()
479
480
  const params = parseToolInput(input)
480
481
  return callSuperagnt(key, 'GET', '/profile', params)
@@ -484,7 +485,7 @@ export default function register(api) {
484
485
  api.registerTool({
485
486
  name: 'superagnt_instagram_Media_shortcode_from_media_ID',
486
487
  description: "Media shortcode from media ID",
487
- inputSchema: {
488
+ parameters: {
488
489
  "type": "object",
489
490
  "properties": {
490
491
  "fields": {
@@ -500,7 +501,7 @@ export default function register(api) {
500
501
  "id"
501
502
  ]
502
503
  },
503
- execute: async (input) => {
504
+ execute: async (_toolCallId, input) => {
504
505
  const key = ensureApiKey()
505
506
  const params = parseToolInput(input)
506
507
  return callSuperagnt(key, 'GET', '/id-media', params)
@@ -510,7 +511,7 @@ export default function register(api) {
510
511
  api.registerTool({
511
512
  name: 'superagnt_instagram_Username_from_user_ID',
512
513
  description: "Username from user ID",
513
- inputSchema: {
514
+ parameters: {
514
515
  "type": "object",
515
516
  "properties": {
516
517
  "fields": {
@@ -526,7 +527,7 @@ export default function register(api) {
526
527
  "id"
527
528
  ]
528
529
  },
529
- execute: async (input) => {
530
+ execute: async (_toolCallId, input) => {
530
531
  const key = ensureApiKey()
531
532
  const params = parseToolInput(input)
532
533
  return callSuperagnt(key, 'GET', '/id', params)
@@ -536,7 +537,7 @@ export default function register(api) {
536
537
  api.registerTool({
537
538
  name: 'superagnt_instagram_Tagged_media_by_user_ID',
538
539
  description: "Tagged media by user ID",
539
- inputSchema: {
540
+ parameters: {
540
541
  "type": "object",
541
542
  "properties": {
542
543
  "fields": {
@@ -561,7 +562,7 @@ export default function register(api) {
561
562
  "id"
562
563
  ]
563
564
  },
564
- execute: async (input) => {
565
+ execute: async (_toolCallId, input) => {
565
566
  const key = ensureApiKey()
566
567
  const params = parseToolInput(input)
567
568
  return callSuperagnt(key, 'GET', '/user-tags', params)
@@ -571,7 +572,7 @@ export default function register(api) {
571
572
  api.registerTool({
572
573
  name: 'superagnt_instagram_Reposts_by_user_ID',
573
574
  description: "Reposts by user ID",
574
- inputSchema: {
575
+ parameters: {
575
576
  "type": "object",
576
577
  "properties": {
577
578
  "max_id": {
@@ -591,7 +592,7 @@ export default function register(api) {
591
592
  "id"
592
593
  ]
593
594
  },
594
- execute: async (input) => {
595
+ execute: async (_toolCallId, input) => {
595
596
  const key = ensureApiKey()
596
597
  const params = parseToolInput(input)
597
598
  return callSuperagnt(key, 'GET', '/user-reposts', params)
@@ -601,7 +602,7 @@ export default function register(api) {
601
602
  api.registerTool({
602
603
  name: 'superagnt_instagram_Locations_by_city_ID',
603
604
  description: "Locations by city ID",
604
- inputSchema: {
605
+ parameters: {
605
606
  "type": "object",
606
607
  "properties": {
607
608
  "page": {
@@ -621,7 +622,7 @@ export default function register(api) {
621
622
  "city_id"
622
623
  ]
623
624
  },
624
- execute: async (input) => {
625
+ execute: async (_toolCallId, input) => {
625
626
  const key = ensureApiKey()
626
627
  const params = parseToolInput(input)
627
628
  return callSuperagnt(key, 'GET', '/locations', params)
@@ -631,7 +632,7 @@ export default function register(api) {
631
632
  api.registerTool({
632
633
  name: 'superagnt_instagram_Location_info_by_location_ID',
633
634
  description: "Location info by location ID",
634
- inputSchema: {
635
+ parameters: {
635
636
  "type": "object",
636
637
  "properties": {
637
638
  "fields": {
@@ -647,7 +648,7 @@ export default function register(api) {
647
648
  "id"
648
649
  ]
649
650
  },
650
- execute: async (input) => {
651
+ execute: async (_toolCallId, input) => {
651
652
  const key = ensureApiKey()
652
653
  const params = parseToolInput(input)
653
654
  return callSuperagnt(key, 'GET', '/location-info', params)
@@ -657,7 +658,7 @@ export default function register(api) {
657
658
  api.registerTool({
658
659
  name: 'superagnt_instagram_Web_profile_info_by_username',
659
660
  description: "Web profile info by username",
660
- inputSchema: {
661
+ parameters: {
661
662
  "type": "object",
662
663
  "properties": {
663
664
  "fields": {
@@ -673,7 +674,7 @@ export default function register(api) {
673
674
  "username"
674
675
  ]
675
676
  },
676
- execute: async (input) => {
677
+ execute: async (_toolCallId, input) => {
677
678
  const key = ensureApiKey()
678
679
  const params = parseToolInput(input)
679
680
  return callSuperagnt(key, 'GET', '/web-profile', params)
@@ -683,7 +684,7 @@ export default function register(api) {
683
684
  api.registerTool({
684
685
  name: 'superagnt_instagram_Music_info_by_music_ID',
685
686
  description: "Music info by music ID",
686
- inputSchema: {
687
+ parameters: {
687
688
  "type": "object",
688
689
  "properties": {
689
690
  "fields": {
@@ -703,7 +704,7 @@ export default function register(api) {
703
704
  "id"
704
705
  ]
705
706
  },
706
- execute: async (input) => {
707
+ execute: async (_toolCallId, input) => {
707
708
  const key = ensureApiKey()
708
709
  const params = parseToolInput(input)
709
710
  return callSuperagnt(key, 'GET', '/music', params)
@@ -713,7 +714,7 @@ export default function register(api) {
713
714
  api.registerTool({
714
715
  name: 'superagnt_instagram_Media_by_hashtag',
715
716
  description: "Media by hashtag",
716
- inputSchema: {
717
+ parameters: {
717
718
  "type": "object",
718
719
  "properties": {
719
720
  "end_cursor": {
@@ -733,7 +734,7 @@ export default function register(api) {
733
734
  "query"
734
735
  ]
735
736
  },
736
- execute: async (input) => {
737
+ execute: async (_toolCallId, input) => {
737
738
  const key = ensureApiKey()
738
739
  const params = parseToolInput(input)
739
740
  return callSuperagnt(key, 'GET', '/tag-feeds', params)
@@ -2,7 +2,7 @@
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.3",
5
+ "version": "2.0.5",
6
6
  "contracts": {
7
7
  "tools": [
8
8
  "superagnt_instagram_Search_users_by_keyword",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superagnt/instagram-data",
3
- "version": "2.0.3",
3
+ "version": "2.0.5",
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",