Mastodon Bookmarks Index Shortcut

Updated 10222022-004703


Social


Maintain local indices of your bookmarked Mastodon posts in various formats.

Note: This shortcut requires a Mastodon application with write permissions. You can create one at [yourinstance]/settings/applications. See the documentation for more information.

Mastodon Bookmarks Index Shortcut
Mastodon Bookmarks Index Shortcut

This shortcut sortof compliments my much less complicated "Mastodon Bookmark" shortcut (which one can use to bookmark single Mastodon posts via API) in that it also uses Mastodon's API to retrieve one's (per-instance) bookmarks data in full. I originally intended to create this Shortcut because the "official" Mastodon iOS/iPadOS app did not/does not contain the option to view all of one's bookmarks, though there are several other clients which do and have (see the list near the bottom.)

I have personally found it useful, however, beyond this function - especially in tandem with Data Jar - as a means of storing bookmarks data more manipulatably.

(Please note: if you do not intend to use this shortcut with Data Jar, you'll need to delete its action.)

Upon installation, you'll be prompted to set your target instance URL (in the format mastodon.online,) an optional limit on the number of bookmarks you intend to retrieve, and you'll be asked to provide a Mastodon application access token.

By default, it's configured to store both the entirety of the JSON response (see an example below) as well as a custom dictionary version of response parameters in two separate Data Jar "jars."

Custom JSON Output Example in Data Jar
Custom JSON Output Example in Data Jar

Some Mastodon iOS Clients that already Index Bookmarks


Example JSON Response

{
  "account": {
    "acct": "libei",
    "avatar_static": "https://files.mastodon.social/accounts/avatars/000/542/528/original/d096686bb03dfd71.png",
    "locked": false,
    "statuses_count": 405,
    "bot": false,
    "url": "https://mastodon.social/@libei",
    "following_count": 168,
    "emojis": [],
    "discoverable": true,
    "last_status_at": "2022-09-24",
    "group": false,
    "id": "542528",
    "header_static": "https://files.mastodon.social/accounts/headers/000/542/528/original/412c23942c0cd9d2.jpg",
    "followers_count": 189,
    "note": "<p>Developer of Mastoot, servant of three cats, software engineer at Microsoft, a human being from Earth.</p>",
    "avatar": "https://files.mastodon.social/accounts/avatars/000/542/528/original/d096686bb03dfd71.png",
    "display_name": "Bei Li",
    "header": "https://files.mastodon.social/accounts/headers/000/542/528/original/412c23942c0cd9d2.jpg",
    "created_at": "2018-10-01T00:00:00.000Z",
    "fields": [{
      "name": "Mastoot",
      "value": "<a href=\"https://apps.apple.com/app/mastoot/id1501485410\" target=\"_blank\" rel=\"nofollow noopener noreferrer me\"><span class=\"invisible\">https://</span><span class=\"ellipsis\">apps.apple.com/app/mastoot/id1</span><span class=\"invisible\">501485410</span></a>",
      "verified_at": null
    }],
    "username": "libei"
  },
  "reblog": null,
  "application": {
    "name": "Mastoot",
    "website": "https://mastoot.app"
  },
  "language": "zh",
  "media_attachments": [{
    "preview_url": "https://files.mastodon.social/media_attachments/files/109/054/457/264/708/166/small/7bc8b1c598e4a248.png",
    "text_url": null,
    "id": "109054457264708166",
    "blurhash": "U27KuN~qj?D%IAWBt7WC01D%M{xt?aM{M{xu",
    "preview_remote_url": null,
    "meta": {
      "original": {
        "size": "978x2120",
        "aspect": 0.46132075471698114,
        "width": 978,
        "height": 2120
      },
      "small": {
        "size": "272x589",
        "aspect": 0.4617996604414261,
        "width": 272,
        "height": 589
      }
    },
    "type": "image",
    "remote_url": null,
    "description": null,
    "url": "https://files.mastodon.social/media_attachments/files/109/054/457/264/708/166/original/7bc8b1c598e4a248.png"
  }, {
    "preview_url": "https://files.mastodon.social/media_attachments/files/109/054/457/764/971/303/small/63b2c3b9dd6edbe5.png",
    "text_url": null,
    "id": "109054457764971303",
    "blurhash": "UEA,%tjuNGaf00j]t7WUMyWUofkB%fWBNFoM",
    "preview_remote_url": null,
    "meta": {
      "original": {
        "size": "978x2120",
        "aspect": 0.46132075471698114,
        "width": 978,
        "height": 2120
      },
      "small": {
        "size": "272x589",
        "aspect": 0.4617996604414261,
        "width": 272,
        "height": 589
      }
    },
    "type": "image",
    "remote_url": null,
    "description": null,
    "url": "https://files.mastodon.social/media_attachments/files/109/054/457/764/971/303/original/63b2c3b9dd6edbe5.png"
  }],
  "spoiler_text": "",
  "url": "https://mastodon.social/@libei/109054458777627311",
  "tags": [{
    "name": "mastoot",
    "url": "https://mastodon.social/tags/mastoot"
  }],
  "sensitive": false,
  "replies_count": 1,
  "emojis": [],
  "card": null,
  "muted": false,
  "mentions": [],
  "visibility": "public",
  "favourites_count": 3,
  "uri": "https://mastodon.social/users/libei/statuses/109054458777627311",
  "edited_at": null,
  "id": "109054458777627311",
  "reblogs_count": 1,
  "favourited": true,
  "reblogged": true,
  "in_reply_to_account_id": null,
  "created_at": "2022-09-24T17:03:02.814Z",
  "in_reply_to_id": null,
  "filtered": [],
  "poll": null,
  "bookmarked": true,
  "content": "<p>Considering change the timeline layout to full width for <a href=\"https://mastodon.social/tags/Mastoot\" class=\"mention hashtag\" rel=\"tag\">#<span>Mastoot</span></a>, what do you think?</p>"
}