Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
How to authenticate with the Xshot API
curl "https://api.xshot.fun/twitter/user/info?username=elonmusk&api_key=YOUR_KEY"
curl -H "x-api-key: YOUR_KEY" "https://api.xshot.fun/twitter/user/info?username=elonmusk"
curl -H "Authorization: Bearer YOUR_KEY" "https://api.xshot.fun/twitter/user/info?username=elonmusk"
wss://api.xshot.fun/ws?api_key=YOUR_KEY
4001
curl "https://api.xshot.fun/twitter/user/info?username=elonmusk"
{ "error": "Invalid or missing API key" }
const API_KEY = "YOUR_KEY"; // Using query string const res = await fetch( `https://api.xshot.fun/twitter/user/info?username=elonmusk&api_key=${API_KEY}` ); const user = await res.json(); console.log(user.followers_count); // 237614000
const res = await fetch( "https://api.xshot.fun/twitter/user/info?username=elonmusk", { headers: { "x-api-key": "YOUR_KEY" } } ); const user = await res.json();
import requests # Using header response = requests.get( "https://api.xshot.fun/twitter/user/info", params={"username": "elonmusk"}, headers={"x-api-key": "YOUR_KEY"} ) user = response.json() print(user["followers_count"]) # 237614000
import requests response = requests.get( "https://api.xshot.fun/twitter/user/info", params={"username": "elonmusk", "api_key": "YOUR_KEY"} ) user = response.json()
const ws = new WebSocket("wss://api.xshot.fun/ws?api_key=YOUR_KEY"); ws.onopen = () => { console.log("Connected and authenticated"); }; ws.onclose = (event) => { if (event.code === 4001) { console.error("Authentication failed"); } };