Import from Mastodon
Using the API
Section titled “Using the API”- Create an access token in Mastodon preferences.
 - Set 
MASTODON_TOKENandMASTODON_INSTANCEin your environment. - Run 
otso import mastodon --since 2024-01-01. 
Using the archive
Section titled “Using the archive”Download your account archive, unzip, and run:
otso import mastodon --archive ~/Downloads/mastodon-exportRun as a PESOS job
Section titled “Run as a PESOS job”otso import mastodon is idempotent, so you can run it regularly to keep
your site and local archive up to date. Execute it on demand or deploy it
to a cron or serverless worker to poll Mastodon on a schedule and sync the
results back to your local environment.
Use otso run to deploy the import on a timer, for example every 15 minutes
on Vercel:
otso run --every 15m --on vercel import mastodon --include likes,repliesMapping
Section titled “Mapping”- Toots → 
note - Replies → 
replywithinReplyToURL. - Boosts → 
repost - Favorites → 
like 
Media attachments are downloaded and referenced as media entries.