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 thewhere
orjoin
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, contentfrom mastodon_search_tootwhere query = 'twitter';
select created_at, username, url, contentfrom mastodon_search_tootwhere 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, contentfrom mastodon_search_toot s join my_toot m on m.url = s.urlwhere query = m.url
with my_toot as ( select url from mastodon_my_toot limit 1)select s.created_at, s.username, m.url, s.contentfrom mastodon_search_toot s join my_toot m on m.url = s.urlwhere s.query = m.url;
Schema for mastodon_search_toot
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
account | jsonb | Account for toot author. | |
account_id | text | =, !=, ~~, ~~*, !~~, !~~* | The account ID. |
account_url | text | Account URL for toot author. | |
content | text | Content of the toot. | |
created_at | timestamp with time zone | Timestamp when the toot was created. | |
display_name | text | Display name for toot author. | |
followers | bigint | Follower count for toot author. | |
following | bigint | Following count for toot author. | |
id | text | ID of the toot. | |
in_reply_to_account_id | text | If the toot is a reply, the ID of the replied-to toot's account. | |
instance_qualified_account_url | text | Account URL prefixed with my instance | |
instance_qualified_reblog_url | text | Url of the reblog (boost) of the toot, prefixed with my instance. | |
instance_qualified_url | text | URL for the toot, as seen from my instance. | |
list_id | text | Id for a list that gathers toots. | |
query | text | = | Query string to find toots. |
reblog | jsonb | Reblog (boost) of the toot. | |
reblog_content | text | Content of reblog (boost) of the toot. | |
reblog_server | text | Server of the boosted account. | |
reblog_username | text | Username of the boosted account. | |
reblogs_count | bigint | Boost count for toot. | |
replies_count | bigint | Reply count for toot. | |
server | text | Server of toot author. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
status | jsonb | Raw status | |
url | text | URL for the toot. | |
username | text | Username 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