Skip to content

Instantly share code, notes, and snippets.

@poting-lin
Forked from d3m3vilurr/feedly_api.md
Created January 14, 2017 13:03
Show Gist options
  • Save poting-lin/deb6509f61d97390706e71d44d95d876 to your computer and use it in GitHub Desktop.
Save poting-lin/deb6509f61d97390706e71d44d95d876 to your computer and use it in GitHub Desktop.
Unofficial Feedly API Document

IDs

  • user_id - user/:uid
  • feed_id - feed/:feed_uri
  • category_id - :user_id/category/:category (special category: global.all, global.uncategorized)
  • tag_id - :user_id/tag/:tag (special tag: global.saved)

APIs

http://cloud.feedly.com/:version/:api

  • Common params
    • ck - timestamp (optional)
    • ct - client type (eg: feedly.desktop, optional)
    • cv - client version (eg: 16.0.548, optional)

HTTP Header must have Authorization field except auth and feeds apis

Field format like this; Authorization: OAuth :oauth_token

auth

Login process

Step

  1. GET /v3/auth/auth

Automatic oauth2 chain

  • Params
    • client_id - feedly (fixed)
    • redirect_uri - https://cloud.feedly.com/feedly.html (fixed)
    • scope - https://cloud.feedly.com/subscriptions (fixed)
    • response_type - code (fixed)
    • provider - google (fixed)
    • migrate - false (fixed, now feedly not support migrate google reader)

Final URI of oauth chain; https://cloud.feedly.com/feedly.html?code=:code&state=

  1. POST /v3/auth/token

Generate and refresh oauth token

  • Body

    Normal application/x-www-form-urlencoded format, not application/json

        client_id=feedly
        &client_secret=0XP4XQ07VVMDWBKUHTJM4WUQ
        &grant_type=authorization_code
        &redirect_uri=http%3A%2F%2Fwww.feedly.com%2Ffeedly.html
        &code=:code
    

    or

        client_id=feedly
        &client_secret=0XP4XQ07VVMDWBKUHTJM4WUQ
        &grant_type=refresh_token
        &refresh_token=:refresh_token
    
  • Response

    authorization_code mode

        {
          "refresh_token": ":refresh_token",
          "access_token": ":oauth_token",
          "expires_in": :second,
          "token_type": "Bearer",
          "id": ":uid"
        }
    

    refresh_token mode

        {
          "token_type": "Bearer"
          "access_token": ":oauth_token",
          "expires_in": :second,
          "id": ":uid"
        }
    

feeds

No need authorization

  • Using

    GET /v3/feeds/:feed_id

  • Response

      {
        "id": ":feed_id", 
        "subscribers": :subscriber_count, 
        "title": ":feed_title", 
        "velocity": :velocity, 
        "website": ":site_uri"
      }
    

profile

  • Using

    GET /v3/profile

  • Reponse

      {
        "email": ":email",
        "familyName": ":family_name",
        "gender": ":gender",
        "givenName": ":first_name",
        "google": ":google_plus_key",
        "id": ":uid",
        "locale": ":locale",
        "picture": ":profile
        _avatar_uri",
        "reader": ":reader_key",
        "wave": ":wave"
      }
    

subscriptions

subscripted feed control

  • Using

    GET /v3/subscripts or POST /v3/subscripts or DELETE /v3/subscripts/:feed_id

  • Body

    POST method only

      {
        "id": ":feed_id",
        "title": ":feed_title",
        "categories": [
          {
            "id": ":category_id",
            "label": ":category"
          }
        ]
      }
    
  • Response

    GET method only

      [
        {
          "categories": [
              {
                  "id": ":category_id",
                  "label": ":category"
              }
          ],
          "id": "feed_id",
          "title": ":feed_title",
          "updated": :timestamp,
          "website": ":feed_uri"
        },
        ...
      ]
    

streams

load feed stream

  • Using

    GET /v3/streams/:category_id_or_feed_id_or_tag_id/contents

  • Params

    • count - load max count (default: 20)
    • unreadOnly - true or false (default: false)
    • ranked - newest or oldest (default: newest)
    • continuation - until continuation_key (optional)
  • Response

      {
        "continuation": ":continuation_key",
        "id": ":category_id",
        "items": [
          {
            "actionTimestamp": ":action_timestamp",
            "alternate": [
              {
                "href": ":alternate_uri",
                "type": ":mimetype"
              }
            ],
            "author": ":author",
            "canonical": [
              {
                "href": ":canonical_uri",
                "type": ":mimetype"
              }
            ],
            "categories": [
              {
                "id": ":item_category_id",
                "label": ":item_category_name"
              }
            ],
            "crawled": ":crawled_timestamp",
            "fingerprint": ":fingerprint",
            "id": ":item_id",
            "keywords": [
              ":keyword"
            ],
            "origin": {
              "htmlUrl": ":site_uri",
              "streamId": ":feed_id",
              "title": ":feed_title"
            },
            "originId": ":item_uri",                        # optional
            "published": "item_pub_timestamp",
            "summary": {                                  # or content
              "content": ":item_desc",
              "direction": ":text_direction"
            },
            "title": ":item_title",
            "tags": [
              {
                "id": ":tag_id",
                "label": ":tag_name"
              },
              ...
            ],
            "unread": true
          }
        ],
        ...
      }
    

markers

  • Using

    GET /v3/markers/counts or POST /v3/markers

  • Body

    POST method only

      {
        "action": ":action",
        "type": "entries",
        "entryIds": [":item_id"]
      }
    

    or

      {
        "action": ":action",
        "type": "feeds",
        "feedIds":[":feed_id"],
        "asOf": :timestamp
      }
    
    • action - markAsRead or keepUnread
  • Response

    GET method only

      {
        "unreadcounts": [
          {
            "id": ":feed_id_or_category_id",
            "count": :count,
            "updated": :timestamp
          },
          ...
        ],
        "max": :max_count
      }
    

tags

  • Using

    DELETE /v3/tags/:tag_id/:itemid or PUT /v3/tags/:tag_id

  • Body

    PUT method only

      {
        "entryId": ":item_id"
      }
    

Non cloud APIs

http://www.feedly.com/:group/:api

  • Common params
    • ck - timestamp (optional)

search.v2/feeds.v2

  • Using

    GET /search.v2/feeds.v2

  • Params

    • q - search query string
    • lf - false or true (optional)
    • n - max count (default: 5)
    • d - false or true (optional)
  • Response

      {
        "hint": ":query_string",
        "results": [
          {
            "title": ":feed_title",
            "website": "site_uri",
            "feedId": ":feed_id",
            "score": :score,
            "solrScore": :solr_score,
            "deliciousTags: [":delicious_tag"],
            "language": ":lang",
            "velocity": :velocity,
            "subscribers": :subscriber_count,
            "documentBoost": :doc_boost,
            "avgLikes": :avg_like_count,
            "minLikes": :min_like_count,
            "maxLikes": :max_like_count,
            "medLikes": :med_like_count,
            "hint": ":query_string",
            "explain": ":search_query_explain"
          },
          ...
        ],
        "related": [
          ":related_keyword",
          ...
        ]
      }
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment