@@ -48,6 +48,7 @@ def search(self, query):
4848 - `search_hashtags`
4949 - `search_locations`
5050 - `search_audios`
51+ - `search_clips`
5152
5253 Args:
5354 query (str): The search query
@@ -102,7 +103,7 @@ def get_user_clips(self, user_id, count=12, max_id=None):
102103
103104 Args:
104105 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 )
106107 max_id (str): Use for pagination
107108
108109 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):
375376 """
376377 return self .request ("instagram/location/get_info" , {"id" : location_id })
377378
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 ):
379380 """
380381 Retrieve location media by location id.
381382
382383 Args:
383384 location_id (int): Location id
384385 page (int): Page number
385386 max_id (str): Use for pagination
387+ tab (str): Tab name: recent, ranked (default: recent)
386388
387389 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.
388390
@@ -393,6 +395,8 @@ def get_location_media(self, location_id, page=None, max_id=None):
393395 payload ["page" ] = page
394396 if max_id is not None :
395397 payload ["max_id" ] = max_id
398+ if tab is not None :
399+ payload ["tab" ] = tab
396400 return self .request ("instagram/location/get_media" , payload )
397401
398402 def get_hashtag_info (self , name ):
@@ -500,6 +504,23 @@ def get_audio_media(self, audio_id, max_id=None):
500504 payload ["max_id" ] = max_id
501505 return self .request ("instagram/audio/get_media" , payload )
502506
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+
503524 def get_user_about (self , user_id ):
504525 """
505526 Obtain user details from «About this Account» section.
@@ -557,3 +578,14 @@ def search_audios(self, query):
557578 For more information, see documentation: https://docs.rocketapi.io/api/instagram/audio/search
558579 """
559580 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