turbot/mastodon
steampipe plugin install mastodon

Table: mastodon_search_toot - Query Mastodon Toots using SQL

Mastodon is a decentralized, open-source social network. A Toot in Mastodon is equivalent to a post or status update in other social networks. Toots can contain text, media, links, and more, and they form the core of user activity and content on Mastodon.

Table Usage Guide

The mastodon_search_toot table provides insights into Toots within Mastodon. As a data analyst or social media manager, explore Toot-specific details through this table, including content, media attachments, and associated metadata. Utilize it to uncover trends, such as popular topics, sentiment analysis, and the reach and impact of specific posts or users.

Important Notes

  • You must specify the query column in the where or join clause to query this table.

Examples

Search for 'twitter'

Explore the instances where 'twitter' is mentioned in user posts on Mastodon to understand the context and relevance of these mentions. This can be beneficial for tracking social trends, brand reputation, or user sentiment.

select
created_at,
username,
url,
content
from
mastodon_search_toot
where
query = 'twitter';
select
created_at,
username,
url,
content
from
mastodon_search_toot
where
query = 'twitter';
limit
100

Search for a toot

Discover the details of a specific post on the Mastodon social platform, including when it was created, who posted it, the URL, and its content. This could be useful for tracking the origin and information of a particular post for analysis or reporting purposes.

with my_toot as (
select
url
from
mastodon_my_toot
limit
1
)
select
created_at,
username,
m.url,
content
from
mastodon_search_toot s
join my_toot m on m.url = s.url
where
query = m.url
with my_toot as (
select
url
from
mastodon_my_toot
limit
1
)
select
s.created_at,
s.username,
m.url,
s.content
from
mastodon_search_toot s
join my_toot m on m.url = s.url
where
s.query = m.url;

Schema for mastodon_search_toot

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
accountjsonbAccount for toot author.
account_idtext=, !=, ~~, ~~*, !~~, !~~*The account ID.
account_urltextAccount URL for toot author.
contenttextContent of the toot.
created_attimestamp with time zoneTimestamp when the toot was created.
display_nametextDisplay name for toot author.
followersbigintFollower count for toot author.
followingbigintFollowing count for toot author.
idtextID of the toot.
in_reply_to_account_idtextIf the toot is a reply, the ID of the replied-to toot's account.
instance_qualified_account_urltextAccount URL prefixed with my instance
instance_qualified_reblog_urltextUrl of the reblog (boost) of the toot, prefixed with my instance.
instance_qualified_urltextURL for the toot, as seen from my instance.
list_idtextId for a list that gathers toots.
querytext=Query string to find toots.
reblogjsonbReblog (boost) of the toot.
reblog_contenttextContent of reblog (boost) of the toot.
reblog_servertextServer of the boosted account.
reblog_usernametextUsername of the boosted account.
reblogs_countbigintBoost count for toot.
replies_countbigintReply count for toot.
servertextServer of toot author.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
statusjsonbRaw status
urltextURL for the toot.
usernametextUsername for toot author.

Export

This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- mastodon

You can pass the configuration to the command with the --config argument:

steampipe_export_mastodon --config '<your_config>' mastodon_search_toot