简书 Api

转自 https://blog.csdn.net/weixin_40508682/article/details/88577733

所有API均返回json

简书首页文章

URL:https://www.jianshu.com/asimov/trending/now
用途:获取当前的最新文章默认显示最新20条

[
    {
        "object":{
            "type":1,
            "data":{
                "id":45116242,
                "title":"flutter屏幕适配 ,一种一劳永逸的全局适配方式",
                "slug":"ec4f6eec71ff",
                "list_image_url":"[http://upload-images.jianshu.io/upload_images/15233854-44be819b8b267d15.png](http://upload-images.jianshu.io/upload_images/15233854-44be819b8b267d15.png)",
                "public_abbr":"flutter 屏幕适配 demo main 一种一劳永逸的全局适配方式 效果 320x480 1080x1920...",
                "commentable":true,
                "important_collection":null,
                "user":{
                    "id":15233854,
                    "nickname":"Android技术干货分享",
                    "slug":"06fd4cf1f427",
                    "avatar":"[http://upload.jianshu.io/users/upload_avatars/15233854/e3692f84-3eaa-4c45-ac6f-f1c38ac1cdfd.png](http://upload.jianshu.io/users/upload_avatars/15233854/e3692f84-3eaa-4c45-ac6f-f1c38ac1cdfd.png)"
                },
                "total_fp_amount":12603,
                "public_comments_count":1,
                "total_rewards_count":0,
                "likes_count":38
            }
        }
    },
    {
        "object":{
            "type":1,
            "data":{
                "id":42509809,
                "title":"宇宙最神奇的力量——同频共振",
                "slug":"2daf61c90e8f",
                "list_image_url":"[https://upload-images.jianshu.io/upload_images/9962357-105169619b642dcc.jpg](https://upload-images.jianshu.io/upload_images/9962357-105169619b642dcc.jpg)",
                "public_abbr":"宙万物皆为能量,能量共振而同频!一个钟摆共振同频实验,帮我们肉眼揭开宇宙生命真相!一切生命本质都是能量,一切生命运...",
                "commentable":true,
                "important_collection":null,
                "user":{
                    "id":9962357,
                    "nickname":"无言脉脉话最深",
                    "slug":"9a1e722ae479",
                    "avatar":"[http://upload.jianshu.io/users/upload_avatars/9962357/383ccb47-6fc9-4845-ae79-b2842b44bc87.jpg](http://upload.jianshu.io/users/upload_avatars/9962357/383ccb47-6fc9-4845-ae79-b2842b44bc87.jpg)"
                },
                "total_fp_amount":10601,
                "public_comments_count":10,
                "total_rewards_count":0,
                "likes_count":53
            }
        }
    }
]

文章内容

URL:https://www.jianshu.com/asimov/p/9e76c4f885ed
(9e76c4f885ed用上个api获取到的slug替代)
用途:获取查看的文章具体内容

{
    "is_author":false,
    "liked_note":false,
    "public_comment_count":0,
    "featured_comments_count":0,
    "likes_count":0,
    "trial_open":false,
    "wangxin_trial_open":false,
    "description":"BBC1 BBC2 ",
    "gupao_eligible":0,
    "total_fp_amount":0,
    "id":44736954,
    "slug":"9e76c4f885ed",
    "public_title":"BBC",
    "free_content":" ",
    "paid_type":"free",
    "first_shared_at":"2019-05-13T14:24:41.000+08:00",
    "notebook_id":93589,
    "commentable":true,
    "wordage":102,
    "paid_content_accessible":false,
    "share_image_url":"http://upload.jianshu.io/users/upload_avatars/47789/cbc0b864-cfa8-4c4a-a742-26ef592370fd.jpg",
    "show_paid_comment_tips":false,
    "user":{
        "id":47789,
        "slug":"859b6c81975e",
        "nickname":"shooter",
        "gender":2,
        "avatar":"http://upload.jianshu.io/users/upload_avatars/47789/cbc0b864-cfa8-4c4a-a742-26ef592370fd.jpg",
        "intro":"国家扶贫重点攻坚男青年",
        "wordage":97980,
        "likes_count":135,
        "badges":[],
        "vip":null,
        "liked_by_user":false,
        "liked_user":false
    },
    "distribution_more_earn_percent":24,
    "last_updated_at":1557733798
}

热门专题推荐

URL:https://www.jianshu.com/asimov/subscriptions/recommended_collections
用途:获取简书手机网页的热门专题,会显示当前推荐的7个专题

[
    {
        "id":283250,
        "image_url":"http://upload.jianshu.io/collections/images/283250/%E6%BC%AB%E7%94%BB%E4%B8%93%E9%A2%98.jpg",
        "title":"手绘",
        "slug":"8c92f845cd4d"
    },
    {
        "id":76,
        "image_url":"http://upload.jianshu.io/collections/images/76/12.jpg",
        "title":"自然科普",
        "slug":"cc7808b775b4"
    }
]

用户写过的文章

URL:https://www.jianshu.com/asimov/users/slug/859b6c81975e/public_notes
将859b6c81975e替换成要查询用户的slug即可
用途:获取该用户写过的文章

[
    {
        "object":{
            "type":1,
            "data":{
                "id":54224887,
                "title":"参加波卡hackathon获奖了",
                "slug":"072a45169ab9",
                "first_shared_at":"2019-09-24T01:21:57.000+08:00",
                "list_image_url":"[https://upload-images.jianshu.io/upload_images/47789-9ed41c3d90337801.jpg](https://upload-images.jianshu.io/upload_images/47789-9ed41c3d90337801.jpg)",
                "public_abbr":"昨天 感冒低烧 早早的睡了下 ,到了深夜反而精神起来 今天是来杭州的第4天 记录下这几天发生的事情。 在2019年...",
                "paid":false,
                "commentable":true,
                "is_top":false,
                "user":{
                    "id":47789,
                    "nickname":"shooter",
                    "slug":"859b6c81975e",
                    "avatar":"[http://upload.jianshu.io/users/upload_avatars/47789/cbc0b864-cfa8-4c4a-a742-26ef592370fd.jpg](http://upload.jianshu.io/users/upload_avatars/47789/cbc0b864-cfa8-4c4a-a742-26ef592370fd.jpg)"
                },
                "total_fp_amount":645,
                "public_comments_count":0,
                "total_rewards_count":0,
                "likes_count":3,
                "views_count":27
            }
        }
    },
    {
        "object":{
            "type":1,
            "data":{
                "id":54141377,
                "title":"杀手级AI补全代码工具:TabNine",
                "slug":"ad55d8d235f0",
                "first_shared_at":"2019-09-22T01:05:07.000+08:00",
                "list_image_url":"[https://upload-images.jianshu.io/upload_images/47789-bcb61315819e4410.jpg](https://upload-images.jianshu.io/upload_images/47789-bcb61315819e4410.jpg)",
                "public_abbr":"GPT-2,一个来自OpenAI的逆天语言模型,现在能用来补全代码了。 一位来自加拿大的大四学霸,开发了一款”De...",
                "paid":false,
                "commentable":true,
                "is_top":false,
                "user":{
                    "id":47789,
                    "nickname":"shooter",
                    "slug":"859b6c81975e",
                    "avatar":"[http://upload.jianshu.io/users/upload_avatars/47789/cbc0b864-cfa8-4c4a-a742-26ef592370fd.jpg](http://upload.jianshu.io/users/upload_avatars/47789/cbc0b864-cfa8-4c4a-a742-26ef592370fd.jpg)"
                },
                "total_fp_amount":932,
                "public_comments_count":0,
                "total_rewards_count":0,
                "likes_count":3,
                "views_count":32
            }
        }
    }
]

用户注册信息

URL:https://www.jianshu.com/asimov/users/slug/859b6c81975e/ 将859b6c81975e替换成要查询用户的slug即可

用途:获取该用户的个人介绍/设置

{
    "wechat_reward_url":"",
    "id":47789,
    "slug":"859b6c81975e",
    "nickname":"shooter",
    "intro":"国家扶贫重点攻坚对象男青年",
    "intro_compiled":"国家扶贫重点攻坚对象男青年<br><br>",
    "gender":2,
    "avatar":"[http://upload.jianshu.io/users/upload_avatars/47789/cbc0b864-cfa8-4c4a-a742-26ef592370fd.jpg](http://upload.jianshu.io/users/upload_avatars/47789/cbc0b864-cfa8-4c4a-a742-26ef592370fd.jpg)",
    "background_image":"[http://upload.jianshu.io/user/background_image/a7b88d86-8257-4166-b391-f3ce5c60aad6](http://upload.jianshu.io/user/background_image/a7b88d86-8257-4166-b391-f3ce5c60aad6)",
    "badges":[

    ],
    "following_users_count":124,
    "followers_count":157,
    "total_wordage":97980,
    "total_likes_count":135,
    "following_user":false,
    "followed_by_user":false,
    "jsd_balance":138123,
    "last_updated_at":1570930574
}

用户最新发布的文章

URL:https://www.jianshu.com/asimov/users/slug/859b6c81975e/public_notes?order_by=shared_at 将859b6c81975e替换成要查询用户的slug即可

[
    {
        "object":{
            "type":1,
            "data":{
                "id":54904853,
                "title":"如何解析Ethereum数据:读取LevelDB数据",
                "slug":"331dbba74545",
                "first_shared_at":"2019-10-12T18:50:40.000+08:00",
                "list_image_url":"[https://upload-images.jianshu.io/upload_images/47789-119525903c010574.png](https://upload-images.jianshu.io/upload_images/47789-119525903c010574.png)",
                "public_abbr":"感谢 Gary大佬的细心解答 之前转过一篇文章 如何解析 Bitcoin 的数据,Bitcoin 将 p2p 网络...",
                "paid":false,
                "commentable":true,
                "is_top":false,
                "user":{
                    "id":47789,
                    "nickname":"shooter",
                    "slug":"859b6c81975e",
                    "avatar":"[http://upload.jianshu.io/users/upload_avatars/47789/cbc0b864-cfa8-4c4a-a742-26ef592370fd.jpg](http://upload.jianshu.io/users/upload_avatars/47789/cbc0b864-cfa8-4c4a-a742-26ef592370fd.jpg)"
                },
                "total_fp_amount":718,
                "public_comments_count":0,
                "total_rewards_count":0,
                "likes_count":3,
                "views_count":157
            }
        }
    },
    {
        "object":{
            "type":1,
            "data":{
                "id":54275726,
                "title":"BloomFilter:大量数据快速去重",
                "slug":"45e9a0428505",
                "first_shared_at":"2019-09-25T16:12:38.000+08:00",
                "list_image_url":"",
                "public_abbr":"布隆过滤器 用于大量数据快速去重 先说结果 一共有4348524条数据, 不重复的有55888条数据库使用 sel...",
                "paid":false,
                "commentable":true,
                "is_top":false,
                "user":{
                    "id":47789,
                    "nickname":"shooter",
                    "slug":"859b6c81975e",
                    "avatar":"[http://upload.jianshu.io/users/upload_avatars/47789/cbc0b864-cfa8-4c4a-a742-26ef592370fd.jpg](http://upload.jianshu.io/users/upload_avatars/47789/cbc0b864-cfa8-4c4a-a742-26ef592370fd.jpg)"
                },
                "total_fp_amount":0,
                "public_comments_count":0,
                "total_rewards_count":0,
                "likes_count":0,
                "views_count":10
            }
        }
    }
]

用户最新被评论的文章

URL:https://www.jianshu.com/asimov/users/slug/859b6c81975e/public_notes?order_by=commented_at 将859b6c81975e替换成要查询用户的slug即可

[
    {
        "object":{
            "type":1,
            "data":{
                "id":51924162,
                "title":"Gaia: BlockStack 去中心化存储服务",
                "slug":"6cebae274612",
                "first_shared_at":"2019-08-05T14:36:35.000+08:00",
                "list_image_url":"",
                "public_abbr":"原文: https://medium.com/coinmonks/gaia-df6b86a17d50 ​我们先理解...",
                "paid":false,
                "commentable":true,
                "is_top":false,
                "user":{
                    "id":47789,
                    "nickname":"shooter",
                    "slug":"859b6c81975e",
                    "avatar":"[http://upload.jianshu.io/users/upload_avatars/47789/cbc0b864-cfa8-4c4a-a742-26ef592370fd.jpg](http://upload.jianshu.io/users/upload_avatars/47789/cbc0b864-cfa8-4c4a-a742-26ef592370fd.jpg)"
                },
                "total_fp_amount":1274,
                "public_comments_count":1,
                "total_rewards_count":0,
                "likes_count":3,
                "views_count":112
            }
        }
    },
    {
        "object":{
            "type":1,
            "data":{
                "id":13796437,
                "title":" bitcoin地址是如何生成的",
                "slug":"954e143e97d2",
                "first_shared_at":"2017-06-25T13:32:50.000+08:00",
                "list_image_url":"[https://upload-images.jianshu.io/upload_images/47789-3e874c73da35345e.png](https://upload-images.jianshu.io/upload_images/47789-3e874c73da35345e.png)",
                "public_abbr":"btc address: 1FmWXNJT3jVKaHBQs2gAs6PLGVWx1zPPHfeth addres...",
                "paid":false,
                "commentable":true,
                "is_top":false,
                "user":{
                    "id":47789,
                    "nickname":"shooter",
                    "slug":"859b6c81975e",
                    "avatar":"[http://upload.jianshu.io/users/upload_avatars/47789/cbc0b864-cfa8-4c4a-a742-26ef592370fd.jpg](http://upload.jianshu.io/users/upload_avatars/47789/cbc0b864-cfa8-4c4a-a742-26ef592370fd.jpg)"
                },
                "total_fp_amount":127,
                "public_comments_count":1,
                "total_rewards_count":0,
                "likes_count":5,
                "views_count":4492
            }
        }
    }
]

用户的热门文章

URL:https://www.jianshu.com/asimov/users/slug/859b6c81975e/public_notes?order_by=top 将859b6c81975e替换成要查询用户的slug即可

[
    {
        "object":{
            "type":1,
            "data":{
                "id":13796437,
                "title":" bitcoin地址是如何生成的",
                "slug":"954e143e97d2",
                "first_shared_at":"2017-06-25T13:32:50.000+08:00",
                "list_image_url":"https://upload-images.jianshu.io/upload_images/47789-3e874c73da35345e.png",
                "public_abbr":"btc address: 1FmWXNJT3jVKaHBQs2gAs6PLGVWx1zPPHfeth",
                "paid":false,
                "commentable":true,
                "is_top":false,
                "user":{
                    "id":47789,
                    "nickname":"shooter",
                    "slug":"859b6c81975e",
                    "avatar":"http://upload.jianshu.io/users/upload_avatars/47789/cbc0b864-cfa8-4c4a-a742-26ef592370fd.jpg"
                },
                "total_fp_amount":127,
                "public_comments_count":1,
                "total_rewards_count":0,
                "likes_count":5,
                "views_count":4492
            }
        }
    },
    {
        "object":{
            "type":1,
            "data":{
                "id":34332001,
                "title":"简书Markdown支持Latex公式了",
                "slug":"24d7128bbe69",
                "first_shared_at":"2018-09-23T18:39:47.000+08:00",
                "list_image_url":"",
                "public_abbr":"Latex 如何写 只要在公式的前后加入$$符号",
                "paid":false,
                "commentable":true,
                "is_top":false,
                "user":{
                    "id":47789,
                    "nickname":"shooter",
                    "slug":"859b6c81975e",
                    "avatar":"http://upload.jianshu.io/users/upload_avatars/47789/cbc0b864-cfa8-4c4a-a742-26ef592370fd.jpg"
                },
                "total_fp_amount":528,
                "public_comments_count":0,
                "total_rewards_count":0,
                "likes_count":4,
                "views_count":558
            }
        }
    }
]

推荐阅读更多精彩内容