> ## Documentation Index
> Fetch the complete documentation index at: https://docs.keyapi.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get user stories

> Get an Instagram user's currently active stories (Stories).
Stories expire after 24 hours.

<div className="inline-flex items-center gap-2 px-4 py-2 bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg">
  <span className="text-base">🪙</span>
  <span className="text-sm font-medium text-yellow-900 dark:text-yellow-100"><span className="font-semibold">2 credits</span><span className="text-yellow-700 dark:text-yellow-300 ml-1">per request</span></span>
</div>

## Copy for AI

<div className="my-6 rounded-xl border border-gray-200 bg-gray-50 p-5 dark:border-gray-800 dark:bg-gray-900/40">
  <div className="min-w-0">
    <p className="text-base font-semibold text-gray-900 dark:text-gray-100">🤖 Why Code When AI Can Do It For You?</p>
    <p className="mt-1 text-sm text-gray-700 dark:text-gray-300">Stop writing code like it's 1970! Let AI do the heavy lifting - click the sparkles to copy a perfectly formatted prompt for ChatGPT, Claude, or your favorite AI assistant.</p>
  </div>

  <div className="mt-4">
    <button
      type="button"
      className="inline-flex items-center gap-2 rounded-md border border-emerald-300 bg-emerald-50 px-3 py-2 text-sm font-medium text-emerald-800 hover:bg-emerald-100 dark:border-emerald-700 dark:bg-emerald-900/30 dark:text-emerald-100 dark:hover:bg-emerald-900/50"
      onClick={() => navigator.clipboard.writeText(`I want to make an API call to https://api.keyapi.ai/v1/instagram/fetch_user_stories.

Please help me write code to make this API call and handle the response appropriately. Include error handling and best practices.

Here are the details:

Endpoint: GET https://api.keyapi.ai/v1/instagram/fetch_user_stories

Description: Get an Instagram user's currently active stories (Stories).
Stories expire after 24 hours.

Required Headers:
--header 'Authorization: Bearer <YOUR_API_KEY>'

Parameters:
- username (Optional): Username (choose one: username or user_id). Example: javan
- user_id (Optional): User ID (choose one: user_id or username). Example: 18527

Example Response:
{
"code": 0,
"message": "success",
"data": {
"data": {
  "additional_data": {
    "ad_expiry_timestamp_in_millis": null,
    "can_gif_quick_reply": true,
    "can_react_with_avatar": false,
    "can_reply": true,
    "can_reshare": true,
    "disabled_reply_types": [
      "story_remix_reply",
      "story_selfie_reply"
    ],
    "expiring_at": 1773195181,
    "id": "18527",
    "is_archived": false,
    "latest_reel_media": 1773108781,
    "reel_type": "user_reel",
    "show_expiration_tray_signal": false,
    "user": {
      "full_name": "Javan Ng",
      "id": "18527",
      "interop_messaging_user_fbid": 105721380825451,
      "is_creator_agent_enabled": false,
      "is_private": false,
      "is_ring_creator": false,
      "is_screenshot_blocking_enabled": false,
      "is_verified": false,
      "profile_pic_id": "3459147014560655728",
      "profile_pic_url": "https://scontent-lax3-1.cdninstagram.com/v/t51.2885-19/460170653_852233457013406_8133149038171915885_n.jpg?stp=dst-webp_s150x150&cb=8438d1d6-9603912b&efg=eyJ2ZW5jb2RlX3RhZyI6InByb2ZpbGVfcGljLmRqYW5nby4xMDgwLmMyIn0&_nc_ht=scontent-lax3-1.cdninstagram.com&_nc_cat=102&_nc_oc=Q6cZ2QFO0Sq4yLT9Nwau-MNd_JRVvaV5ljwnyebN29nHy5MyyoWAJ-r1N-QhVRj4JyJ6Uo4&_nc_ohc=T43Z_QBhAnQQ7kNvwGbwDIz&_nc_gid=Ei1LmVUKWPa-UNKlCj55ng&edm=AA0lj5EBAAAA&ccb=7-5&ig_cache_key=GJ2lbRuekngQGgcDAG0GjH31v95wbkULAAAB1501500w-ccb7-5-cb
... (truncated)`)}
    >
      <span>✨</span>
      <span>Copy for AI</span>
    </button>
  </div>
</div>


## OpenAPI

````yaml en/instagram.openapi.json GET /v1/instagram/fetch_user_stories
openapi: 3.0.1
info:
  title: Instagram API english documentation
  description: >-
    The english reference documentation of the Instagram API includes the
    interface's purpose, parameter description, response status, and sample
    structure.
  version: 1.0.0
servers:
  - url: https://api.keyapi.ai
    description: Production
security:
  - JWT Bearer: []
tags: []
paths:
  /v1/instagram/fetch_user_stories:
    get:
      tags: []
      summary: Get user stories
      description: |-
        Get an Instagram user's currently active stories (Stories).
        Stories expire after 24 hours.
      parameters:
        - name: username
          in: query
          description: 'Username (choose one: username or user_id)'
          required: false
          example: javan
          schema:
            type: string
            example: javan
        - name: user_id
          in: query
          description: 'User ID (choose one: user_id or username)'
          required: false
          example: '18527'
          schema:
            type: string
            example: '18527'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties: {}
              example:
                code: 0
                message: success
                data:
                  data:
                    additional_data:
                      ad_expiry_timestamp_in_millis: null
                      can_gif_quick_reply: true
                      can_react_with_avatar: false
                      can_reply: true
                      can_reshare: true
                      disabled_reply_types:
                        - story_remix_reply
                        - story_selfie_reply
                      expiring_at: 1773195181
                      id: '18527'
                      is_archived: false
                      latest_reel_media: 1773108781
                      reel_type: user_reel
                      show_expiration_tray_signal: false
                      user:
                        full_name: Javan Ng
                        id: '18527'
                        interop_messaging_user_fbid: 105721380825451
                        is_creator_agent_enabled: false
                        is_private: false
                        is_ring_creator: false
                        is_screenshot_blocking_enabled: false
                        is_verified: false
                        profile_pic_id: '3459147014560655728'
                        profile_pic_url: >-
                          https://scontent-lax3-1.cdninstagram.com/v/t51.2885-19/460170653_852233457013406_8133149038171915885_n.jpg?stp=dst-webp_s150x150&cb=8438d1d6-9603912b&efg=eyJ2ZW5jb2RlX3RhZyI6InByb2ZpbGVfcGljLmRqYW5nby4xMDgwLmMyIn0&_nc_ht=scontent-lax3-1.cdninstagram.com&_nc_cat=102&_nc_oc=Q6cZ2QFO0Sq4yLT9Nwau-MNd_JRVvaV5ljwnyebN29nHy5MyyoWAJ-r1N-QhVRj4JyJ6Uo4&_nc_ohc=T43Z_QBhAnQQ7kNvwGbwDIz&_nc_gid=Ei1LmVUKWPa-UNKlCj55ng&edm=AA0lj5EBAAAA&ccb=7-5&ig_cache_key=GJ2lbRuekngQGgcDAG0GjH31v95wbkULAAAB1501500w-ccb7-5-cb8438d1d6-9603912b&oh=00_AfzL087HMxE_3azBqsFPQ0-mUl-YYPOG9QlteilL9a5lWQ&oe=69B5A33F&_nc_sid=0a490e
                        show_ring_award: false
                        transparency_product_enabled: false
                        username: javan
                    count: 2
                    items:
                      - archive_story_deletion_ts: 0
                        boost_unavailable_identifier: null
                        boost_unavailable_reason: null
                        boost_unavailable_reason_v2: null
                        can_hype: false
                        can_mention_back: false
                        can_mention_share: false
                        can_play_spotify_audio: false
                        can_reply: true
                        can_reshare: true
                        can_reshare_to_story: true
                        can_save: false
                        can_send_prompt: false
                        caption: null
                        caption_is_edited: false
                        coauthor_producer_can_see_organic_insights: false
                        coauthor_producers: []
                        code: DVqfJWxkdTL
                        creative_config: null
                        crosspost:
                          - FB
                          - IG
                        crosspost_metadata:
                          fb_downstream_use_xpost_metadata:
                            downstream_use_xpost_deny_reason: NONE
                        cutout_sticker_info: []
                        deleted_reason: 0
                        device_timestamp: 1773059654858527
                        expiring_at: 1773146053
                        fbid: '18165077431406810'
                        filter_type: 0
                        fundraiser_tag:
                          has_standalone_fundraiser: false
                        gen_ai_detection_method:
                          detection_method: NONE
                        has_high_risk_gen_ai_inform_treatment: false
                        has_liked: false
                        has_privately_liked: false
                        has_translation: false
                        id: '3849025813912605899'
                        ig_media_sharing_disabled: false
                        image_versions:
                          items:
                            - height: 1919
                              is_spatial_image: false
                              url: >-
                                https://scontent-lax3-1.cdninstagram.com/v/t51.82787-15/649225989_18562261807018528_2939560177946283183_n.jpg?stp=dst-jpg_e35_p1080x1080_sh0.08_tt6&_nc_cat=102&ig_cache_key=Mzg0OTAyNTgxMzkxMjYwNTg5OQ%3D%3D.3-ccb7-5&ccb=7-5&_nc_sid=58cdad&efg=eyJ2ZW5jb2RlX3RhZyI6InhwaWRzLjEzMjB4MjM0Ni5zZHIuQzMifQ%3D%3D&_nc_ohc=tgeZuBCjuOUQ7kNvwFyTpFo&_nc_oc=AdlQ2RsD2mZpAmMzfoRIhJpqCDAiesjYit_7X1rR7wjzVpv4S2smG57qcgKfsRTzT4w&_nc_ad=z-m&_nc_cid=0&_nc_zt=23&_nc_ht=scontent-lax3-1.cdninstagram.com&_nc_gid=Ei1LmVUKWPa-UNKlCj55ng&_nc_ss=1a&oh=00_Afze1pzdocHPGXQa8V-NTP00WuKDKMWueluI2J52aoQySg&oe=69B588D5
                              width: 1080
                            - height: 640
                              is_spatial_image: false
                              url: >-
                                https://scontent-lax3-1.cdninstagram.com/v/t51.82787-15/649225989_18562261807018528_2939560177946283183_n.jpg?stp=dst-jpg_e35_s640x640_sh0.08_tt6&_nc_cat=102&ig_cache_key=Mzg0OTAyNTgxMzkxMjYwNTg5OQ%3D%3D.3-ccb7-5&ccb=7-5&_nc_sid=58cdad&efg=eyJ2ZW5jb2RlX3RhZyI6InhwaWRzLjEzMjB4MjM0Ni5zZHIuQzMifQ%3D%3D&_nc_ohc=tgeZuBCjuOUQ7kNvwFyTpFo&_nc_oc=AdlQ2RsD2mZpAmMzfoRIhJpqCDAiesjYit_7X1rR7wjzVpv4S2smG57qcgKfsRTzT4w&_nc_ad=z-m&_nc_cid=0&_nc_zt=23&_nc_ht=scontent-lax3-1.cdninstagram.com&_nc_gid=Ei1LmVUKWPa-UNKlCj55ng&_nc_ss=1a&oh=00_AfxI-kyVMtygz7SxHhqmqvHekkXpJqoElMcurx820GC3jQ&oe=69B588D5
                              width: 360
                        integrity_review_decision: pending
                        invited_coauthor_producers: []
                        is_creator_secret_story: false
                        is_first_take: false
                        is_from_ayt_clips_inspiration: false
                        is_from_discovery_surface: false
                        is_in_profile_grid: false
                        is_open_to_public_submission: false
                        is_organic_product_tagging_eligible: true
                        is_paid_partnership: false
                        is_photo_mash_story: false
                        is_pinned: false
                        is_quicksnap_recap: false
                        is_reel_media: true
                        is_reshare_of_text_post_app_media_in_ig: false
                        is_story_image_with_music: false
                        is_tagged_media_shared_to_viewer_profile_grid: false
                        is_terminal_video_segment: false
                        is_video: false
                        is_viewer_mentioned: false
                        location: null
                        media_attributions_data: []
                        media_format: image
                        media_name: story
                        media_overlay_info: null
                        media_type: 1
                        music_metadata: null
                        original_height: 2346
                        original_media_type: 1
                        original_width: 1320
                        owner:
                          full_name: Javan Ng
                          id: '18527'
                          interop_messaging_user_fbid: 105721380825451
                          is_creator_agent_enabled: false
                          is_private: false
                          is_ring_creator: false
                          is_screenshot_blocking_enabled: false
                          is_verified: false
                          profile_pic_id: '3459147014560655728'
                          profile_pic_url: >-
                            https://scontent-lax3-1.cdninstagram.com/v/t51.2885-19/460170653_852233457013406_8133149038171915885_n.jpg?stp=dst-webp_s150x150&cb=8438d1d6-9603912b&efg=eyJ2ZW5jb2RlX3RhZyI6InByb2ZpbGVfcGljLmRqYW5nby4xMDgwLmMyIn0&_nc_ht=scontent-lax3-1.cdninstagram.com&_nc_cat=102&_nc_oc=Q6cZ2QFO0Sq4yLT9Nwau-MNd_JRVvaV5ljwnyebN29nHy5MyyoWAJ-r1N-QhVRj4JyJ6Uo4&_nc_ohc=T43Z_QBhAnQQ7kNvwGbwDIz&_nc_gid=Ei1LmVUKWPa-UNKlCj55ng&edm=AA0lj5EBAAAA&ccb=7-5&ig_cache_key=GJ2lbRuekngQGgcDAG0GjH31v95wbkULAAAB1501500w-ccb7-5-cb8438d1d6-9603912b&oh=00_AfzL087HMxE_3azBqsFPQ0-mUl-YYPOG9QlteilL9a5lWQ&oe=69B5A33F&_nc_sid=0a490e
                          show_ring_award: false
                          transparency_product_enabled: false
                          username: javan
                        product_suggestions: []
                        product_type: story
                        sharing_friction_info:
                          bloks_app_url: null
                          sharing_friction_payload: null
                          should_have_sharing_friction: false
                        shop_routing_user_id: null
                        should_show_author_pog_for_tagged_media_shared_to_profile_grid: false
                        sponsor_tags: []
                        story_comments:
                          - content_type: comment
                            created_at: 1773059659
                            created_at_for_fb_app: 1773059659
                            created_at_utc: 1773059659
                            did_report_as_spam: false
                            id: '3849025813912605899'
                            is_covered: false
                            is_created_by_media_owner: true
                            is_ranked_comment: false
                            share_enabled: false
                            text: >-
                              A freaking cobra having its dinner in the middle
                              of the footpath! 🐍
                            type: 0
                            user:
                              fbid_v2: '17841400555810000'
                              full_name: Javan Ng
                              id: '18527'
                              is_private: false
                              is_verified: false
                              profile_pic_id: '3459147014560655728'
                              profile_pic_url: >-
                                https://scontent-lax3-1.cdninstagram.com/v/t51.2885-19/460170653_852233457013406_8133149038171915885_n.jpg?stp=dst-webp_s150x150&cb=8438d1d6-9603912b&efg=eyJ2ZW5jb2RlX3RhZyI6InByb2ZpbGVfcGljLmRqYW5nby4xMDgwLmMyIn0&_nc_ht=scontent-lax3-1.cdninstagram.com&_nc_cat=102&_nc_oc=Q6cZ2QFO0Sq4yLT9Nwau-MNd_JRVvaV5ljwnyebN29nHy5MyyoWAJ-r1N-QhVRj4JyJ6Uo4&_nc_ohc=T43Z_QBhAnQQ7kNvwGbwDIz&_nc_gid=Ei1LmVUKWPa-UNKlCj55ng&edm=AA0lj5EBAAAA&ccb=7-5&ig_cache_key=GJ2lbRuekngQGgcDAG0GjH31v95wbkULAAAB1501500w-ccb7-5-cb8438d1d6-9603912b&oh=00_AfzL087HMxE_3azBqsFPQ0-mUl-YYPOG9QlteilL9a5lWQ&oe=69B5A33F&_nc_sid=0a490e
                              username: javan
                            user_id: '18527'
                        story_hashtags:
                          - end_time_ms: 86400
                            hashtag:
                              id: '17841551494090530'
                              name: snakeinmyhood
                            height: 0.035037617710974
                            id: '17967636401994626'
                            is_fb_sticker: 0
                            is_hidden: 0
                            is_pinned: 0
                            is_sticker: 0
                            rotation: 0
                            start_time_ms: 0
                            width: 0.385259024508028
                            x: 0.50666484365568
                            'y': 0.9132644376309921
                            z: 0
                        supports_reel_reactions: true
                        tagged_users: []
                        taken_at: 1773059653
                        taken_at_date: '2026-03-09T12:34:13+00:00'
                        taken_at_ts: 1773059653
                        thumbnail_url: >-
                          https://scontent-lax3-1.cdninstagram.com/v/t51.82787-15/649225989_18562261807018528_2939560177946283183_n.jpg?stp=dst-jpg_e35_p1080x1080_sh0.08_tt6&_nc_cat=102&ig_cache_key=Mzg0OTAyNTgxMzkxMjYwNTg5OQ%3D%3D.3-ccb7-5&ccb=7-5&_nc_sid=58cdad&efg=eyJ2ZW5jb2RlX3RhZyI6InhwaWRzLjEzMjB4MjM0Ni5zZHIuQzMifQ%3D%3D&_nc_ohc=tgeZuBCjuOUQ7kNvwFyTpFo&_nc_oc=AdlQ2RsD2mZpAmMzfoRIhJpqCDAiesjYit_7X1rR7wjzVpv4S2smG57qcgKfsRTzT4w&_nc_ad=z-m&_nc_cid=0&_nc_zt=23&_nc_ht=scontent-lax3-1.cdninstagram.com&_nc_gid=Ei1LmVUKWPa-UNKlCj55ng&_nc_ss=1a&oh=00_Afze1pzdocHPGXQa8V-NTP00WuKDKMWueluI2J52aoQySg&oe=69B588D5
                        user:
                          full_name: Javan Ng
                          id: '18527'
                          interop_messaging_user_fbid: 105721380825451
                          is_creator_agent_enabled: false
                          is_private: false
                          is_ring_creator: false
                          is_screenshot_blocking_enabled: false
                          is_verified: false
                          profile_pic_id: '3459147014560655728'
                          profile_pic_url: >-
                            https://scontent-lax3-1.cdninstagram.com/v/t51.2885-19/460170653_852233457013406_8133149038171915885_n.jpg?stp=dst-webp_s150x150&cb=8438d1d6-9603912b&efg=eyJ2ZW5jb2RlX3RhZyI6InByb2ZpbGVfcGljLmRqYW5nby4xMDgwLmMyIn0&_nc_ht=scontent-lax3-1.cdninstagram.com&_nc_cat=102&_nc_oc=Q6cZ2QFO0Sq4yLT9Nwau-MNd_JRVvaV5ljwnyebN29nHy5MyyoWAJ-r1N-QhVRj4JyJ6Uo4&_nc_ohc=T43Z_QBhAnQQ7kNvwGbwDIz&_nc_gid=Ei1LmVUKWPa-UNKlCj55ng&edm=AA0lj5EBAAAA&ccb=7-5&ig_cache_key=GJ2lbRuekngQGgcDAG0GjH31v95wbkULAAAB1501500w-ccb7-5-cb8438d1d6-9603912b&oh=00_AfzL087HMxE_3azBqsFPQ0-mUl-YYPOG9QlteilL9a5lWQ&oe=69B5A33F&_nc_sid=0a490e
                          show_ring_award: false
                          transparency_product_enabled: false
                          username: javan
                        video_sticker_locales: []
                        wearable_shared_media_resolutions: []
                        wearables_creator_tools_info: []
                      - archive_story_deletion_ts: 0
                        boost_unavailable_identifier: null
                        boost_unavailable_reason: null
                        boost_unavailable_reason_v2: null
                        can_hype: false
                        can_mention_back: false
                        can_mention_share: false
                        can_play_spotify_audio: false
                        can_reply: true
                        can_reshare: true
                        can_reshare_to_story: true
                        can_save: false
                        can_send_prompt: false
                        caption: null
                        caption_is_edited: false
                        coauthor_producer_can_see_organic_insights: false
                        coauthor_producers: []
                        code: DVr82dLEctt
                        creative_config: null
                        crosspost:
                          - FB
                          - IG
                        crosspost_metadata:
                          fb_downstream_use_xpost_metadata:
                            downstream_use_xpost_deny_reason: NONE
                        cutout_sticker_info: []
                        deleted_reason: 0
                        device_timestamp: 1773108781947855
                        expiring_at: 1773195181
                        fbid: '18181716316327620'
                        filter_type: 0
                        fundraiser_tag:
                          has_standalone_fundraiser: false
                        gen_ai_detection_method:
                          detection_method: NONE
                        has_high_risk_gen_ai_inform_treatment: false
                        has_liked: false
                        has_privately_liked: false
                        has_translation: false
                        id: '3849437931484859245'
                        ig_media_sharing_disabled: false
                        image_versions:
                          items:
                            - height: 1919
                              is_spatial_image: false
                              url: >-
                                https://scontent-lax7-1.cdninstagram.com/v/t51.82787-15/648354756_18562385962018528_2547272270545085465_n.jpg?stp=dst-jpg_e35_p1080x1080_sh0.08_tt6&_nc_cat=101&ig_cache_key=Mzg0OTQzNzkzMTQ4NDg1OTI0NQ%3D%3D.3-ccb7-5&ccb=7-5&_nc_sid=58cdad&efg=eyJ2ZW5jb2RlX3RhZyI6InhwaWRzLjEzMjB4MjM0Ni5zZHIuQzMifQ%3D%3D&_nc_ohc=Fy41wei_2KoQ7kNvwEhXSdT&_nc_oc=Adl0nPEb-RMhZM1vJUzUKYVkrFPJjrqI4BH9wGPuS1b5G7_1BvgJ3nDwZABVnTcGHPU&_nc_ad=z-m&_nc_cid=0&_nc_zt=23&_nc_ht=scontent-lax7-1.cdninstagram.com&_nc_gid=Ei1LmVUKWPa-UNKlCj55ng&_nc_ss=1a&oh=00_AfzJDzYdALA8AaxSPA3v-aa0ioimrD2tWK2yjWxVNjYTbg&oe=69B586EC
                              width: 1080
                            - height: 640
                              is_spatial_image: false
                              url: >-
                                https://scontent-lax7-1.cdninstagram.com/v/t51.82787-15/648354756_18562385962018528_2547272270545085465_n.jpg?stp=dst-jpg_e35_s640x640_sh0.08_tt6&_nc_cat=101&ig_cache_key=Mzg0OTQzNzkzMTQ4NDg1OTI0NQ%3D%3D.3-ccb7-5&ccb=7-5&_nc_sid=58cdad&efg=eyJ2ZW5jb2RlX3RhZyI6InhwaWRzLjEzMjB4MjM0Ni5zZHIuQzMifQ%3D%3D&_nc_ohc=Fy41wei_2KoQ7kNvwEhXSdT&_nc_oc=Adl0nPEb-RMhZM1vJUzUKYVkrFPJjrqI4BH9wGPuS1b5G7_1BvgJ3nDwZABVnTcGHPU&_nc_ad=z-m&_nc_cid=0&_nc_zt=23&_nc_ht=scontent-lax7-1.cdninstagram.com&_nc_gid=Ei1LmVUKWPa-UNKlCj55ng&_nc_ss=1a&oh=00_AfyP-fkbr78P7L8rjyZaYZ6VrXDZwICJ81ZCyR1AWtqNVA&oe=69B586EC
                              width: 360
                        integrity_review_decision: pending
                        invited_coauthor_producers: []
                        is_creator_secret_story: false
                        is_first_take: false
                        is_from_ayt_clips_inspiration: false
                        is_from_discovery_surface: false
                        is_in_profile_grid: false
                        is_open_to_public_submission: false
                        is_organic_product_tagging_eligible: true
                        is_paid_partnership: false
                        is_photo_mash_story: false
                        is_pinned: false
                        is_quicksnap_recap: false
                        is_reel_media: true
                        is_reshare_of_text_post_app_media_in_ig: false
                        is_story_image_with_music: false
                        is_tagged_media_shared_to_viewer_profile_grid: false
                        is_terminal_video_segment: false
                        is_video: false
                        is_viewer_mentioned: false
                        location: null
                        media_attributions_data: []
                        media_format: image
                        media_name: story
                        media_overlay_info: null
                        media_type: 1
                        music_metadata: null
                        original_height: 2346
                        original_media_type: 1
                        original_width: 1320
                        owner:
                          full_name: Javan Ng
                          id: '18527'
                          interop_messaging_user_fbid: 105721380825451
                          is_creator_agent_enabled: false
                          is_private: false
                          is_ring_creator: false
                          is_screenshot_blocking_enabled: false
                          is_verified: false
                          profile_pic_id: '3459147014560655728'
                          profile_pic_url: >-
                            https://scontent-lax3-1.cdninstagram.com/v/t51.2885-19/460170653_852233457013406_8133149038171915885_n.jpg?stp=dst-webp_s150x150&cb=8438d1d6-9603912b&efg=eyJ2ZW5jb2RlX3RhZyI6InByb2ZpbGVfcGljLmRqYW5nby4xMDgwLmMyIn0&_nc_ht=scontent-lax3-1.cdninstagram.com&_nc_cat=102&_nc_oc=Q6cZ2QFO0Sq4yLT9Nwau-MNd_JRVvaV5ljwnyebN29nHy5MyyoWAJ-r1N-QhVRj4JyJ6Uo4&_nc_ohc=T43Z_QBhAnQQ7kNvwGbwDIz&_nc_gid=Ei1LmVUKWPa-UNKlCj55ng&edm=AA0lj5EBAAAA&ccb=7-5&ig_cache_key=GJ2lbRuekngQGgcDAG0GjH31v95wbkULAAAB1501500w-ccb7-5-cb8438d1d6-9603912b&oh=00_AfzL087HMxE_3azBqsFPQ0-mUl-YYPOG9QlteilL9a5lWQ&oe=69B5A33F&_nc_sid=0a490e
                          show_ring_award: false
                          transparency_product_enabled: false
                          username: javan
                        product_suggestions: []
                        product_type: story
                        reel_mentions:
                          - display_type: mention_username
                            end_time_ms: 86400
                            height: 0.020834258420862003
                            id: '18110102302782761'
                            is_fb_sticker: 0
                            is_hidden: 0
                            is_pinned: 0
                            is_sticker: 0
                            rotation: 0
                            start_time_ms: 0
                            user:
                              full_name: RICOH_GR_SINGAPORE
                              id: '61261833606'
                              is_private: false
                              is_verified: false
                              profile_pic_id: '3161106950233413941'
                              profile_pic_url: >-
                                https://scontent-lax3-1.cdninstagram.com/v/t51.2885-19/364982248_661060286042392_3248691605763721489_n.jpg?stp=dst-webp_s150x150&cb=8438d1d6-9603912b&efg=eyJ2ZW5jb2RlX3RhZyI6InByb2ZpbGVfcGljLmRqYW5nby40MDAuYzIifQ&_nc_ht=scontent-lax3-1.cdninstagram.com&_nc_cat=104&_nc_oc=Q6cZ2QFO0Sq4yLT9Nwau-MNd_JRVvaV5ljwnyebN29nHy5MyyoWAJ-r1N-QhVRj4JyJ6Uo4&_nc_ohc=MukXpi26zaUQ7kNvwGnqNsP&_nc_gid=Ei1LmVUKWPa-UNKlCj55ng&edm=AA0lj5EBAAAA&ccb=7-5&ig_cache_key=GOgvwRUYUYYXO1kCABEJV5rNqxUtbkULAAAB1501500w-ccb7-5-cb8438d1d6-9603912b&oh=00_AfyBHkoE_-oobhQNKClS2F8ROq8l6UUbd447AOsFciNC6A&oe=69B57176&_nc_sid=0a490e
                              username: ricoh_gr_singapore
                            width: 0.282632325244476
                            x: 0.844540655559579
                            'y': 0.95664538795327
                            z: 2
                        sharing_friction_info:
                          bloks_app_url: null
                          sharing_friction_payload: null
                          should_have_sharing_friction: false
                        shop_routing_user_id: null
                        should_show_author_pog_for_tagged_media_shared_to_profile_grid: false
                        sponsor_tags: []
                        story_hashtags:
                          - end_time_ms: 86400
                            hashtag:
                              id: '17843728471023235'
                              name: grsnaps
                            height: 0.030765062477363003
                            id: '18129671404540719'
                            is_fb_sticker: 0
                            is_hidden: 0
                            is_pinned: 0
                            is_sticker: 0
                            rotation: 0
                            start_time_ms: 0
                            width: 0.20982546178920602
                            x: 0.8949676083544601
                            'y': 0.9124680244980781
                            z: 1
                          - end_time_ms: 86400
                            hashtag:
                              id: '17841516208093119'
                              name: streetsofshanghai
                            height: 0.030765062477363003
                            id: '17939687607151428'
                            is_fb_sticker: 0
                            is_hidden: 0
                            is_pinned: 0
                            is_sticker: 0
                            rotation: 0
                            start_time_ms: 0
                            width: 0.410451720391162
                            x: 0.8028951285766021
                            'y': 0.9354113732621131
                            z: 0
                        supports_reel_reactions: true
                        tagged_users: []
                        taken_at: 1773108781
                        taken_at_date: '2026-03-10T02:13:01+00:00'
                        taken_at_ts: 1773108781
                        thumbnail_url: >-
                          https://scontent-lax7-1.cdninstagram.com/v/t51.82787-15/648354756_18562385962018528_2547272270545085465_n.jpg?stp=dst-jpg_e35_p1080x1080_sh0.08_tt6&_nc_cat=101&ig_cache_key=Mzg0OTQzNzkzMTQ4NDg1OTI0NQ%3D%3D.3-ccb7-5&ccb=7-5&_nc_sid=58cdad&efg=eyJ2ZW5jb2RlX3RhZyI6InhwaWRzLjEzMjB4MjM0Ni5zZHIuQzMifQ%3D%3D&_nc_ohc=Fy41wei_2KoQ7kNvwEhXSdT&_nc_oc=Adl0nPEb-RMhZM1vJUzUKYVkrFPJjrqI4BH9wGPuS1b5G7_1BvgJ3nDwZABVnTcGHPU&_nc_ad=z-m&_nc_cid=0&_nc_zt=23&_nc_ht=scontent-lax7-1.cdninstagram.com&_nc_gid=Ei1LmVUKWPa-UNKlCj55ng&_nc_ss=1a&oh=00_AfzJDzYdALA8AaxSPA3v-aa0ioimrD2tWK2yjWxVNjYTbg&oe=69B586EC
                        user:
                          full_name: Javan Ng
                          id: '18527'
                          interop_messaging_user_fbid: 105721380825451
                          is_creator_agent_enabled: false
                          is_private: false
                          is_ring_creator: false
                          is_screenshot_blocking_enabled: false
                          is_verified: false
                          profile_pic_id: '3459147014560655728'
                          profile_pic_url: >-
                            https://scontent-lax3-1.cdninstagram.com/v/t51.2885-19/460170653_852233457013406_8133149038171915885_n.jpg?stp=dst-webp_s150x150&cb=8438d1d6-9603912b&efg=eyJ2ZW5jb2RlX3RhZyI6InByb2ZpbGVfcGljLmRqYW5nby4xMDgwLmMyIn0&_nc_ht=scontent-lax3-1.cdninstagram.com&_nc_cat=102&_nc_oc=Q6cZ2QFO0Sq4yLT9Nwau-MNd_JRVvaV5ljwnyebN29nHy5MyyoWAJ-r1N-QhVRj4JyJ6Uo4&_nc_ohc=T43Z_QBhAnQQ7kNvwGbwDIz&_nc_gid=Ei1LmVUKWPa-UNKlCj55ng&edm=AA0lj5EBAAAA&ccb=7-5&ig_cache_key=GJ2lbRuekngQGgcDAG0GjH31v95wbkULAAAB1501500w-ccb7-5-cb8438d1d6-9603912b&oh=00_AfzL087HMxE_3azBqsFPQ0-mUl-YYPOG9QlteilL9a5lWQ&oe=69B5A33F&_nc_sid=0a490e
                          show_ring_award: false
                          transparency_product_enabled: false
                          username: javan
                        video_sticker_locales: []
                        wearable_shared_media_resolutions: []
                        wearables_creator_tools_info: []
                requestId: e9ddf3f9-1bf1-4c64-be2f-aa8c056fd2a8
          headers: {}
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                example:
                  code: 400
                  data: null
                  message: 'Missing required parameter: handle'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                example:
                  code: 401
                  data: null
                  message: apiKey is null
        '402':
          description: Payment Required
          content:
            application/json:
              schema:
                type: object
                example:
                  code: 402
                  data: null
                  message: apiKey quota is not enough
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                type: object
                example:
                  code: 429
                  data: null
                  message: qps limit exceeded
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                example:
                  code: 500
                  data: null
                  message: Internal server error
      deprecated: false
      security:
        - JWT Bearer: []
      x-codeSamples:
        - lang: curl
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.keyapi.ai/v1/instagram/fetch_user_stories?username=javan&user_id=18527' \
              --header 'Authorization: Bearer <YOUR_API_KEY>'
        - lang: python
          label: Python
          source: |-
            import requests

            response = requests.get(
                'https://api.keyapi.ai/v1/instagram/fetch_user_stories',
                params={"username": "javan", "user_id": "18527"},
                headers={'Authorization': 'Bearer <YOUR_API_KEY>'}
            )
            print(response.json())
        - lang: javascript
          label: JavaScript
          source: >-
            const params = new URLSearchParams({"username": "javan", "user_id":
            "18527"});


            const response = await
            fetch(`https://api.keyapi.ai/v1/instagram/fetch_user_stories?${params}`,
            {
              method: 'GET',
              headers: { 'Authorization': 'Bearer <YOUR_API_KEY>' }
            });

            const data = await response.json();

            console.log(data);
components:
  securitySchemes:
    JWT Bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: |-
        API key for authentication. Format: `sk_live_xxxxxxxxxxxxx`
        Get your API key from the [Dashboard](http://keyapi.ai/app/dashboard).

````