Check whether one X account follows another, by handles or numeric user ids.
Endpoint
/v1/twitter/friendships
Query
Source account (the potential follower). Handle without the leading @, or numeric user id.
Target account (the potential followee). Handle without the leading @, or numeric user id.
Treat source and target as handles or numeric user ids. Defaults to id when a value is all digits.
const response = await fetch( "https://api.socialfetch.dev/v1/twitter/friendships?source=nasa&target=elonmusk", { headers: { "x-api-key": "YOUR_API_KEY" } } ); const data = await response.json(); console.log(data);