granary

github.com/snarfed/granary Fediverse Open-source projectOpen source

granary translates social web data between platforms, converting posts into formats that other services can consume.

github.com/snarfed/granary
granary homepage screenshot

About granary

Granary is an open source Python library and REST API that fetches social data and converts it between platform APIs and standard formats. Sources include Facebook, Flickr, GitHub, Instagram, Mastodon, and Twitter APIs, Facebook and Instagram scraped HTML, Bluesky/AT Protocol, Nostr, Farcaster, ActivityStreams 1.0 and 2.0 including ActivityPub, HTML with microformats2, mf2json, Atom, RSS 2.0, JSON Feed, and plain XML. It is installable from PyPI with pip install granary, and a REST API with demo app is available at granary.io.

Most Facebook requests and all Twitter, Instagram, and Flickr requests require OAuth access tokens, which are passed through to authorize requests to the source platforms. Requests use USER_ID, GROUP_ID, and APP_ID parameters, with paging via startIndex and count, and output is JSON Activity Streams 1.0 in an OpenSocial envelope.

Key features

  • Fetches data from Facebook, Flickr, GitHub, Instagram, Mastodon, Twitter APIs
  • Converts ActivityStreams 1.0 and 2.0 JSON including ActivityPub
  • Parses HTML with microformats2 such as h-entry, h-feed, h-card
  • Outputs Atom, RSS 2.0, and JSON Feed formats
  • Supports Bluesky/AT Protocol, Nostr, and Farcaster
  • Provides Python library and REST API with paging via startIndex and count
Best for: Developers who need to fetch and convert social data between platform APIs and standard formats.
Good for
  • Converts between platform APIs and standard formats such as ActivityStreams, Atom, and JSON Feed
  • Usable as Python library from PyPI and as REST API
  • Source code is in the public domain, also available under CC0
Watch out for
  • Most Facebook requests and all Twitter, Instagram, and Flickr requests need OAuth access tokens
  • The @friends group is currently identical to @all, and APP_ID is ignored

granary at a glance

Type
Open-source project
Pricing
Not confirmed. Check the site
Open source
Yes · Source code
Language
English
Last checked
Oct 5, 2026 · Online when checked
Listed
Oct 5, 2026

granary alternatives

Tools and sites you could use instead, ranked by how closely they match.

All 24 alternatives

Popular in Fediverse

Well-known listings from the same topic.

All 113

granary FAQ

How do I install Granary as a library?
Install it from PyPI with pip install granary.
Do I need access tokens to fetch from some networks?
Yes. Most Facebook requests and all Twitter, Instagram, and Flickr requests need OAuth access tokens.
How is paging handled?
Use the startIndex and count request parameters.
Is something wrong or out of date?

Tell us and an editor will check it.

Own this website?

Claim the listing and suggest updates yourself. An editor checks every claim first.

Claim this listing