Media is a JSON Structure definition published by X (Twitter), describing 4 properties, of which 1 is required. It conforms to the https://json-structure.org/meta/core/v0/# meta-schema.
{
"$schema": "https://json-structure.org/meta/core/v0/#",
"$id": "https://raw.githubusercontent.com/api-evangelist/twitter/refs/heads/main/json-structure/x-api-media-structure.json",
"name": "Media",
"description": "Media schema from X API v2",
"type": "object",
"properties": {
"height": {
"type": "int32",
"description": "The height of the media in pixels.",
"minimum": 0
},
"media_key": {
"type": "string",
"description": "The Media Key identifier for this attachment.",
"pattern": "^([0-9]+)_([0-9]+)$"
},
"type": {
"type": "string"
},
"width": {
"type": "int32",
"description": "The width of the media in pixels.",
"minimum": 0
}
},
"required": [
"type"
]
}
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.