@@ -48,6 +48,7 @@ def search(self, query):
48
48
- `search_hashtags`
49
49
- `search_locations`
50
50
- `search_audios`
51
+ - `search_clips`
51
52
52
53
Args:
53
54
query (str): The search query
@@ -102,7 +103,7 @@ def get_user_clips(self, user_id, count=12, max_id=None):
102
103
103
104
Args:
104
105
user_id (int): User id
105
- count (int): Number of media to retrieve (max: 50 )
106
+ count (int): Number of media to retrieve (max: 12 )
106
107
max_id (str): Use for pagination
107
108
108
109
You can use the `max_id` parameter to paginate through the media (take from the `max_id` (!) field of the response).
@@ -375,14 +376,15 @@ def get_location_info(self, location_id):
375
376
"""
376
377
return self .request ("instagram/location/get_info" , {"id" : location_id })
377
378
378
- def get_location_media (self , location_id , page = None , max_id = None ):
379
+ def get_location_media (self , location_id , page = None , max_id = None , tab = None ):
379
380
"""
380
381
Retrieve location media by location id.
381
382
382
383
Args:
383
384
location_id (int): Location id
384
385
page (int): Page number
385
386
max_id (str): Use for pagination
387
+ tab (str): Tab name: recent, ranked (default: recent)
386
388
387
389
In order to use pagination, you need to use both the `max_id` and `page` parameters. You can obtain these values from the response's `next_page` and `next_max_id` fields.
388
390
@@ -393,6 +395,8 @@ def get_location_media(self, location_id, page=None, max_id=None):
393
395
payload ["page" ] = page
394
396
if max_id is not None :
395
397
payload ["max_id" ] = max_id
398
+ if tab is not None :
399
+ payload ["tab" ] = tab
396
400
return self .request ("instagram/location/get_media" , payload )
397
401
398
402
def get_hashtag_info (self , name ):
@@ -500,6 +504,23 @@ def get_audio_media(self, audio_id, max_id=None):
500
504
payload ["max_id" ] = max_id
501
505
return self .request ("instagram/audio/get_media" , payload )
502
506
507
+ def get_audio_media_by_canonical_id (self , audio_canonical_id , max_id = None ):
508
+ """
509
+ Retrieve audio media by audio canonical id.
510
+
511
+ Args:
512
+ audio_canonical_id (int): Audio canonical id
513
+ max_id (str): Use for pagination
514
+
515
+ You can use the `max_id` parameter to paginate through media (take from the `next_max_id` field of the response).
516
+
517
+ For more information, see documentation: https://docs.rocketapi.io/api/instagram/audio/get_media_by_canonical_id
518
+ """
519
+ payload = {"id" : audio_canonical_id }
520
+ if max_id is not None :
521
+ payload ["max_id" ] = max_id
522
+ return self .request ("instagram/audio/get_media_by_canonical_id" , payload )
523
+
503
524
def get_user_about (self , user_id ):
504
525
"""
505
526
Obtain user details from «About this Account» section.
@@ -557,3 +578,14 @@ def search_audios(self, query):
557
578
For more information, see documentation: https://docs.rocketapi.io/api/instagram/audio/search
558
579
"""
559
580
return self .request ("instagram/audio/search" , {"query" : query })
581
+
582
+ def search_clips (self , query ):
583
+ """
584
+ Search for a specific clip with a caption that includes the query (max 12 results)
585
+
586
+ Args:
587
+ query (str): The search query
588
+
589
+ For more information, see documentation: https://docs.rocketapi.io/api/instagram/media/search_clips
590
+ """
591
+ return self .request ("instagram/media/search_clips" , {"query" : query })
0 commit comments