X (Twitter)post/user/medias

User's Media

User
Cost / request

$0.01

Response format

JSON

Protocol

REST

About this endpoint

Access X data through agntdata: User's Media. This endpoint return a list of user's medias given a user ID. Responses are structured JSON for AI agents, analytics, and automation — one API key instead of juggling upstream accounts. Ideal when you need tweets, user profiles, followers, search, and hashtag streams programmatically.

Use cases

AI agents that need X data in structured form
Analytics and monitoring pipelines for X content
Research and GTM workflows that combine X signals with other data

Parameters

bodyRequest Body

Content type: application/json

{
  "type": "object",
  "properties": {
    "user_id": {
      "type": "integer"
    },
    "limit": {
      "type": "integer"
    }
  }
}

Responses

Response

{
  "type": "object",
  "properties": {
    "results": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "continuation_token": {
      "type": "string"
    }
  }
}

Agent / Developer Schema

Machine-readable formats for integrating this endpoint into AI agents and toolchains.

{
  "operationId": "User_s_Media_post__user_medias",
  "method": "post",
  "path": "/user/medias",
  "summary": "User's Media",
  "description": "This endpoint return a list of user's medias given a user ID",
  "parameters": [],
  "requestBody": {
    "required": false,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "user_id": {
              "type": "integer"
            },
            "limit": {
              "type": "integer"
            }
          }
        },
        "example": {
          "user_id": 44196397,
          "limit": 10
        }
      }
    }
  },
  "responses": [
    {
      "statusCode": "200",
      "description": "Response",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "results": {
                "type": "array",
                "items": {
                  "type": "object"
                }
              },
              "continuation_token": {
                "type": "string"
              }
            }
          },
          "example": {
            "results": [
              {
                "tweet_id": "1925089021710983421",
                "creation_date": "Wed May 21 07:19:23 +0000 2025",
                "text": "https://t.co/3ERunjJrHf",
                "media_url": [
                  "https://pbs.twimg.com/media/GrdKQ2hWUAAdyMM.jpg"
                ],
                "video_url": null,
                "user": {
                  "creation_date": "Tue Jun 02 20:12:29 +0000 2009",
                  "user_id": "44196397",
                  "username": "elonmusk",
                  "name": "Kekius Maximus",
                  "follower_count": 219778839,
                  "following_count": 1134,
                  "favourites_count": 147042,
                  "is_private": null,
                  "is_verified": false,
                  "is_blue_verified": true,
                  "location": "",
                  "profile_pic_url": "https://pbs.twimg.com/profile_images/1923451603740168192/bBoBROAs_normal.jpg",
                  "profile_banner_url": null,
                  "description": "",
                  "external_url": null,
                  "number_of_tweets": 78883,
                  "bot": false,
                  "timestamp": 1243973549,
                  "has_nft_avatar": false,
                  "category": null,
                  "default_profile": null,
                  "default_profile_image": null,
                  "listed_count": 162329,
                  "verified_type": null
                },
                "language": "zxx",
                "favorite_count": 90156,
                "retweet_count": 8099,
                "reply_count": 2756,
                "quote_count": 211,
                "retweet": false,
                "views": 6897282,
                "timestamp": 1747811963,
                "video_view_count": null,
                "in_reply_to_status_id": null,
                "quoted_status_id": null,
                "binding_values": null,
                "expanded_url": "https://x.com/elonmusk/status/1925089021710983421/photo/1",
                "retweet_tweet_id": null,
                "extended_entities": {
                  "media": [
                    {
                      "display_url": "pic.x.com/3ERunjJrHf",
                      "expanded_url": "https://x.com/elonmusk/status/1925089021710983421/photo/1",
                      "id_str": "1925089019097927680",
                      "indices": [
                        0,
                        23
                      ],
                      "media_key": "3_1925089019097927680",
                      "media_url_https": "https://pbs.twimg.com/media/GrdKQ2hWUAAdyMM.jpg",
                      "type": "photo",
                      "url": "https://t.co/3ERunjJrHf",
                      "ext_media_availability": {
                        "status": "Available"
                      },
                      "features": {
                        "large": {
                          "faces": [
                            {
                              "x": 629,
                              "y": 685,
                              "h": 98,
                              "w": 98
                            },
                            {
                              "x": 632,
                              "y": 895,
                              "h": 144,
                              "w": 144
                            }
                          ]
                        },
                        "medium": {
                          "faces": [
                            {
                              "x": 442,
                              "y": 481,
                              "h": 68,
                              "w": 68
                            },
                            {
                              "x": 444,
                              "y": 629,
                              "h": 101,
                              "w": 101
                            }
                          ]
                        },
                        "small": {
                          "faces": [
                            {
                              "x": 251,
                              "y": 273,
                              "h": 39,
                              "w": 39
                            },
                            {
                              "x": 252,
                              "y": 357,
                              "h": 57,
                              "w": 57
                            }
                          ]
                        },
                        "orig": {
                          "faces": [
                            {
                              "x": 629,
                              "y": 685,
                              "h": 98,
                              "w": 98
                            },
                            {
                              "x": 632,
                              "y": 895,
                              "h": 144,
                              "w": 144
                            }
                          ]
                        }
                      },
                      "sizes": {
                        "large": {
                          "h": 1705,
                          "w": 1100,
                          "resize": "fit"
                        },
                        "medium": {
                          "h": 1200,
                          "w": 774,
                          "resize": "fit"
                        },
                        "small": {
                          "h": 680,
                          "w": 439,
                          "resize": "fit"
                        },
                        "thumb": {
                          "h": 150,
                          "w": 150,
                          "resize": "crop"
                        }
                      },
                      "original_info": {
                        "height": 1705,
                        "width": 1100,
                        "focus_rects": [
                          {
                            "x": 0,
                            "y": 1013,
                            "w": 1100,
                            "h": 616
                          },
                          {
                            "x": 0,
                            "y": 605,
                            "w": 1100,
                            "h": 1100
                          },
                          {
                            "x": 0,
                            "y": 451,
                            "w": 1100,
                            "h": 1254
                          },
                          {
                            "x": 128,
                            "y": 0,
                            "w": 853,
                            "h": 1705
                          },
                          {
                            "x": 0,
                            "y": 0,
                            "w": 1100,
                            "h": 1705
                          }
                        ]
                      },
                      "media_results": {
                        "result": {
                          "media_key": "3_1925089019097927680"
                        }
                      }
                    }
                  ]
                },
                "conversation_id": "1925089021710983421",
                "retweet_status": null,
                "quoted_status": null,
                "bookmark_count": 1258,
                "source": "Twitter for iPhone",
                "community_note": null
              },
              {
                "tweet_id": "1925041236596986027",
                "creation_date": "Wed May 21 04:09:30 +0000 2025",
                "text": "A classic https://t.co/x8LrzVH1Z2",
                "media_url": [
                  "https://pbs.twimg.com/media/GrcezXSXgAA2HAK.jpg"
                ],
                "video_url": null,
                "user": {
                  "creation_date": "Tue Jun 02 20:12:29 +0000 2009",
                  "user_id": "44196397",
                  "username": "elonmusk",
                  "name": "Kekius Maximus",
                  "follower_count": 219778839,
                  "following_count": 1134,
                  "favourites_count": 147042,
                  "is_private": null,
                  "is_verified": false,
                  "is_blue_verified": true,
                  "location": "",
                  "profile_pic_url": "https://pbs.twimg.com/profile_images/1923451603740168192/bBoBROAs_normal.jpg",
                  "profile_banner_url": null,
                  "description": "",
                  "external_url": null,
                  "number_of_tweets": 78883,
                  "bot": false,
                  "timestamp": 1243973549,
                  "has_nft_avatar": false,
                  "category": null,
                  "default_profile": null,
                  "default_profile_image": null,
                  "listed_count": 162329,
                  "verified_type": null
                },
                "language": "en",
                "favorite_count": 243510,
                "retweet_count": 14484,
                "reply_count": 6245,
                "quote_count": 765,
                "retweet": false,
                "views": 6897282,
                "timestamp": 1747800570,
                "video_view_count": null,
                "in_reply_to_status_id": null,
                "quoted_status_id": null,
                "binding_values": null,
                "expanded_url": "https://x.com/elonmusk/status/1925041236596986027/photo/1",
                "retweet_tweet_id": null,
                "extended_entities": {
                  "media": [
                    {
                      "display_url": "pic.x.com/x8LrzVH1Z2",
                      "expanded_url": "https://x.com/elonmusk/status/1925041236596986027/photo/1",
                      "id_str": "1925041233497391104",
                      "indices": [
                        10,
                        33
                      ],
                      "media_key": "3_1925041233497391104",
                      "media_url_https": "https://pbs.twimg.com/media/GrcezXSXgAA2HAK.jpg",
                      "type": "photo",
                      "url": "https://t.co/x8LrzVH1Z2",
                      "ext_media_availability": {
                        "status": "Available"
                      },
                      "features": {
                        "large": {
                          "faces": [
                            {
                              "x": 570,
                              "y": 941,
                              "h": 51,
                              "w": 51
                            },
                            {
                              "x": 90,
                              "y": 385,
                              "h": 216,
                              "w": 216
                            },
                            {
                              "x": 630,
                              "y": 495,
                              "h": 346,
                              "w": 346
                            }
                          ]
                        },
                        "medium": {
                          "faces": [
                            {
                              "x": 462,
                              "y": 764,
                              "h": 41,
                              "w": 41
                            },
                            {
                              "x": 73,
                              "y": 312,
                              "h": 175,
                              "w": 175
                            },
                            {
                              "x": 511,
                              "y": 402,
                              "h": 281,
                              "w": 281
                            }
                          ]
                        },
                        "small": {
                          "faces": [
                            {
                              "x": 262,
                              "y": 432,
                              "h": 23,
                              "w": 23
                            },
                            {
                              "x": 41,
                              "y": 177,
                              "h": 99,
                              "w": 99
                            },
                            {
                              "x": 289,
                              "y": 227,
                              "h": 159,
                              "w": 159
                            }
                          ]
                        },
                        "orig": {
                          "faces": [
                            {
                              "x": 570,
                              "y": 941,
                              "h": 51,
                              "w": 51
                            },
                            {
                              "x": 90,
                              "y": 385,
                              "h": 216,
                              "w": 216
                            },
                            {
                              "x": 630,
                              "y": 495,
                              "h": 346,
                              "w": 346
                            }
                          ]
                        }
                      },
                      "sizes": {
                        "large": {
                          "h": 1478,
                          "w": 1070,
                          "resize": "fit"
                        },
                        "medium": {
                          "h": 1200,
                          "w": 869,
                          "resize": "fit"
                        },
                        "small": {
                          "h": 680,
                          "w": 492,
                          "resize": "fit"
                        },
                        "thumb": {
                          "h": 150,
                          "w": 150,
                          "resize": "crop"
                        }
                      },
                      "original_info": {
                        "height": 1478,
                        "width": 1070,
                        "focus_rects": [
                          {
                            "x": 0,
                            "y": 328,
                            "w": 1070,
                            "h": 599
                          },
                          {
                            "x": 0,
                            "y": 92,
                            "w": 1070,
                            "h": 1070
                          },
                          {
                            "x": 0,
                            "y": 17,
                            "w": 1070,
                            "h": 1220
                          },
                          {
                            "x": 331,
                            "y": 0,
                            "w": 739,
                            "h": 1478
                          },
                          {
                            "x": 0,
                            "y": 0,
                            "w": 1070,
                            "h": 1478
                          }
                        ]
                      },
                      "media_results": {
                        "result": {
                          "media_key": "3_1925041233497391104"
                        }
                      }
                    }
                  ]
                },
                "conversation_id": "1925041236596986027",
                "retweet_status": null,
                "quoted_status": null,
                "bookmark_count": 8890,
                "source": "Twitter for iPhone",
                "community_note": null
              },
              {
                "tweet_id": "1925034512011997678",
                "creation_date": "Wed May 21 03:42:47 +0000 2025",
                "text": "https://t.co/8ILYgYt4ZD",
                "media_url": [
                  "https://pbs.twimg.com/media/GrcYrw3XIAA8q2Z.jpg"
                ],
                "video_url": null,
                "user": {
                  "creation_date": "Tue Jun 02 20:12:29 +0000 2009",
                  "user_id": "44196397",
                  "username": "elonmusk",
                  "name": "Kekius Maximus",
                  "follower_count": 219778839,
                  "following_count": 1134,
                  "favourites_count": 147042,
                  "is_private": null,
                  "is_verified": false,
                  "is_blue_verified": true,
                  "location": "",
                  "profile_pic_url": "https://pbs.twimg.com/profile_images/1923451603740168192/bBoBROAs_normal.jpg",
                  "profile_banner_url": null,
                  "description": "",
                  "external_url": null,
                  "number_of_tweets": 78883,
                  "bot": false,
                  "timestamp": 1243973549,
                  "has_nft_avatar": false,
                  "category": null,
                  "default_profile": null,
                  "default_profile_image": null,
                  "listed_count": 162329,
                  "verified_type": null
                },
                "language": "zxx",
                "favorite_count": 107028,
                "retweet_count": 6425,
                "reply_count": 2132,
                "quote_count": 591,
                "retweet": false,
                "views": 6897282,
                "timestamp": 1747798967,
                "video_view_count": null,
                "in_reply_to_status_id": null,
                "quoted_status_id": null,
                "binding_values": null,
                "expanded_url": "https://x.com/elonmusk/status/1925034512011997678/photo/1",
                "retweet_tweet_id": null,
                "extended_entities": {
                  "media": [
                    {
                      "display_url": "pic.x.com/8ILYgYt4ZD",
                      "expanded_url": "https://x.com/elonmusk/status/1925034512011997678/photo/1",
                      "id_str": "1925034505854722048",
                      "indices": [
                        0,
                        23
                      ],
                      "media_key": "3_1925034505854722048",
                      "media_url_https": "https://pbs.twimg.com/media/GrcYrw3XIAA8q2Z.jpg",
                      "type": "photo",
                      "url": "https://t.co/8ILYgYt4ZD",
                      "ext_media_availability": {
                        "status": "Available"
                      },
                      "features": {
                        "large": {
                          "faces": [
                            {
                              "x": 1136,
                              "y": 384,
                              "h": 762,
                              "w": 762
                            }
                          ]
                        },
                        "medium": {
                          "faces": [
                            {
                              "x": 665,
                              "y": 225,
                              "h": 446,
                              "w": 446
                            }
                          ]
                        },
                        "small": {
                          "faces": [
                            {
                              "x": 377,
                              "y": 127,
                              "h": 253,
                              "w": 253
                            }
                          ]
                        },
                        "orig": {
                          "faces": [
                            {
                              "x": 1136,
                              "y": 384,
                              "h": 762,
                              "w": 762
                            }
                          ]
                        }
                      },
                      "sizes": {
                        "large": {
                          "h": 1366,
                          "w": 2048,
                          "resize": "fit"
                        },
                        "medium": {
                          "h": 800,
                          "w": 1200,
                          "resize": "fit"
                        },
                        "small": {
                          "h": 454,
                          "w": 680,
                          "resize": "fit"
                        },
                        "thumb": {
                          "h": 150,
                          "w": 150,
                          "resize": "crop"
                        }
                      },
                      "original_info": {
                        "height": 1366,
                        "width": 2048,
                        "focus_rects": [
                          {
                            "x": 0,
                            "y": 219,
                            "w": 2048,
                            "h": 1147
                          },
                          {
                            "x": 682,
                            "y": 0,
                            "w": 1366,
                            "h": 1366
                          },
                          {
                            "x": 850,
                            "y": 0,
                            "w": 1198,
                            "h": 1366
                          },
                          {
                            "x": 1246,
                            "y": 0,
                            "w": 683,
                            "h": 1366
                          },
                          {
                            "x": 0,
                            "y": 0,
                            "w": 2048,
                            "h": 1366
                          }
                        ]
                      },
                      "media_results": {
                        "result": {
                          "media_key": "3_1925034505854722048"
                        }
                      }
                    }
                  ]
                },
                "conversation_id": "1925034512011997678",
                "retweet_status": null,
                "quoted_status": null,
                "bookmark_count": 2066,
                "source": "Twitter for iPhone",
                "community_note": null
              }
            ],
            "continuation_token": "DAABCgABGrfEhOE___0KAAIatxiwfNex7ggAAwAAAAIAAA"
          }
        }
      }
    },
    {
      "statusCode": "422",
      "description": "Validation Error",
      "content": {
        "application/json": {
          "schema": {
            "title": "HTTPValidationError",
            "type": "object",
            "properties": {
              "detail": {
                "title": "Detail",
                "type": "array",
                "items": {
                  "title": "ValidationError",
                  "required": [
                    "loc",
                    "msg",
                    "type"
                  ],
                  "type": "object",
                  "properties": {
                    "loc": {
                      "title": "Location",
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "integer"
                          }
                        ]
                      }
                    },
                    "msg": {
                      "title": "Message",
                      "type": "string"
                    },
                    "type": {
                      "title": "Error Type",
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "example": {
            "detail": [
              {
                "loc": [],
                "msg": "",
                "type": ""
              }
            ]
          }
        }
      }
    }
  ]
}

Pricing

$0.01per successful request

Credits are deducted from your agntdata balance on each successful API call. Failed requests (4xx/5xx) are not charged.

Related endpoints

Start using this endpoint

Generate your API key and make your first call in under a minute. Free tier available with transparent pricing.

X APIX data APIuser's media APIAI agents data APIX APIX data APIX for AI agents