Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Dev.to API summary for possible Bridgy integration

Dev.to API summary for possible Bridgy integration

Contents

It looks like reactions calls are limited to creating and "onboarding". More here: https://github.com/thepracticaldev/dev.to/issues/4474.

No Auth required

GET an article by ID

curl https://dev.to/api/articles/150589

Output

{
    "type_of": "article",
    "id": 150589,
    "title": "Byte Sized Episode 2: The Creation of Graph Theory ",
    "description": "The full story of Leonhard Euler and the creation of this fundamental computer science principle, delivered in a few minutes.",
    "cover_image": "https://res.cloudinary.com/practicaldev/image/fetch/s--qgutBUrH--/c_imagga_scale,f_auto,fl_progressive,h_420,q_auto,w_1000/https://thepracticaldev.s3.amazonaws.com/i/88e62fzblbluz1dm7xjf.png",
    "readable_publish_date": "Aug  1",
    "social_image": "https://res.cloudinary.com/practicaldev/image/fetch/s--6wSHHfwd--/c_imagga_scale,f_auto,fl_progressive,h_500,q_auto,w_1000/https://thepracticaldev.s3.amazonaws.com/i/88e62fzblbluz1dm7xjf.png",
    "tag_list": "computerscience, graphtheory, bytesized, history",
    "tags": [
        "computerscience",
        "graphtheory",
        "bytesized",
        "history"
    ],
    "slug": "byte-sized-episode-2-the-creation-of-graph-theory-34g1",
    "path": "/bytesized/byte-sized-episode-2-the-creation-of-graph-theory-34g1",
    "url": "https://dev.to/bytesized/byte-sized-episode-2-the-creation-of-graph-theory-34g1",
    "canonical_url": "https://dev.to/bytesized/byte-sized-episode-2-the-creation-of-graph-theory-34g1",
    "comments_count": 21,
    "positive_reactions_count": 326,
    "collection_id": 1693,
    "created_at": "2019-07-31T11:15:06Z",
    "edited_at": null,
    "crossposted_at": null,
    "published_at": "2019-08-01T15:47:54Z",
    "last_comment_at": "2019-08-06T16:48:10Z",
    "published_timestamp": "2019-08-01T15:47:54Z",
    "body_html": "<p>Today's episode of Byte Sized is about Leonhard Euler and the creation of <a href=\"https://en.wikipedia.org/wiki/Graph_theory\">Graph Theory</a>.</p>\n\n<p>For more about how Graph Theory works, check out this video from BaseCS!</p>\n\n\n<div class=\"ltag__link\">\n    <a href=\"/vaidehijoshi/graph-theory--basecs-video-series-1cpo\" class=\"video-image\" style=\"background-image: url(https://res.cloudinary.com/practicaldev/image/fetch/c_scale,fl_progressive,q_auto,w_880/f_auto/https://thepracticaldev.s3.amazonaws.com/i/e5fbqd3o22u3m4xazzha.png)\">\n      <span class=\"video-timestamp\">\n        <img src=\"https://res.cloudinary.com/practicaldev/image/fetch/s--uzSpN8Ek--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/video-camera-0c3050f8341db4d91f7d90272b61c637d9a2c7d42fdd00fc6ac9be048a935f71.svg\" alt=\"video camera\" loading=\"lazy\">\n        19:37</span>\n    </a>\n  <a href=\"/vaidehijoshi\" class=\"ltag__link__link\">\n    <div class=\"ltag__link__pic\">\n      <img src=\"https://res.cloudinary.com/practicaldev/image/fetch/s--2YcZC4Ad--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/practicaldev/image/fetch/s--E4i9wnhE--/c_fill%2Cf_auto%2Cfl_progressive%2Ch_150%2Cq_auto%2Cw_150/https://thepracticaldev.s3.amazonaws.com/uploads/user/profile_image/2882/K2evUksb.jpg\" alt=\"vaidehijoshi image\" loading=\"lazy\">\n    </div>\n  </a>\n  <a href=\"/vaidehijoshi/graph-theory--basecs-video-series-1cpo\" class=\"ltag__link__link\">\n    <div class=\"ltag__link__content\">\n      <h2>Graph Theory — BaseCS Video Series</h2>\n      <h3>Vaidehi Joshi ・ May 11 '18 ・ 1 min read</h3>\n      <div class=\"ltag__link__taglist\">\n        <span class=\"ltag__link__tag\">#computerscience</span>\n        <span class=\"ltag__link__tag\">#basecs</span>\n      </div>\n    </div>\n  </a>\n</div>\n\n\n<p>Follow <strong>Byte Sized</strong> for an adventure through computer history, a few minutes at a time. More great episodes to come.</p>\n\n\n<div class=\"ltag__user ltag__user__id__865\" style=\"border-color:#271679;box-shadow: 3px 3px 0px #271679;\">\n  <style>\n    .ltag__user__id__865 .follow-action-button {\n      background-color: #2C1989 !important;\n      color: #FFBFAB !important;\n      border-color: #2C1989 !important;\n    }\n  </style>\n  <a href=\"/bytesized\" class=\"ltag__user__link profile-image-link\">\n    <div class=\"ltag__user__pic\">\n      <img src=\"https://res.cloudinary.com/practicaldev/image/fetch/s--zREMEywt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/practicaldev/image/fetch/s--W5amefEA--/c_fill%2Cf_auto%2Cfl_progressive%2Ch_150%2Cq_auto%2Cw_150/https://thepracticaldev.s3.amazonaws.com/uploads/organization/profile_image/865/652f7998-32a8-4fd9-85ca-dd697d2a9ee9.png\" alt=\"bytesized image\" loading=\"lazy\">\n    </div>\n  </a>\n  <div class=\"ltag__user__content\">\n    <h2>\n<a href=\"/bytesized\" class=\"ltag__user__link\">Byte Sized</a><button class=\"cta follow-action-button\" data-info='{\"id\":865,\"className\":\"Organization\",\"style\":\"full\"}' data-follow-action-button=\"true\"></button>\n</h2>\n    <div class=\"ltag__user__summary\">\n      <a href=\"/bytesized\" class=\"ltag__user__link\">\n        Nibble on coding history with Vaidehi Joshi\n      </a>\n    </div>\n  </div>\n</div>\n\n\n\n<center>\n<h1>\n  <a name=\"todays-sponsor\" href=\"#todays-sponsor\" class=\"anchor\">\n  </a>\n  <strong>Today's Sponsor</strong>\n</h1>\n\n\n</center>\n\n\n<div class=\"ltag__user ltag__user__id__123\" style=\"border-color:#1d143e;box-shadow: 3px 3px 0px #1d143e;\">\n  <style>\n    .ltag__user__id__123 .follow-action-button {\n      background-color: #211746 !important;\n      color: #FBFBFD !important;\n      border-color: #211746 !important;\n    }\n  </style>\n  <a href=\"/heroku\" class=\"ltag__user__link profile-image-link\">\n    <div class=\"ltag__user__pic\">\n      <img src=\"https://res.cloudinary.com/practicaldev/image/fetch/s--yPojJK6d--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/practicaldev/image/fetch/s--4x1cqBSj--/c_fill%2Cf_auto%2Cfl_progressive%2Ch_150%2Cq_auto%2Cw_150/https://thepracticaldev.s3.amazonaws.com/uploads/organization/profile_image/123/38b10714-65da-4f1d-88ae-e9b28c1d7a5e.png\" alt=\"heroku image\" loading=\"lazy\">\n    </div>\n  </a>\n  <div class=\"ltag__user__content\">\n    <h2>\n<a href=\"/heroku\" class=\"ltag__user__link\">Heroku</a><button class=\"cta follow-action-button\" data-info='{\"id\":123,\"className\":\"Organization\",\"style\":\"full\"}' data-follow-action-button=\"true\"></button>\n</h2>\n    <div class=\"ltag__user__summary\">\n      <a href=\"/heroku\" class=\"ltag__user__link\">\n        Heroku is a container-based cloud Platform as a Service (PaaS). Developers use Heroku to deploy, manage, and scale modern apps. Our platform is elegant, flexible, and easy to use, offering developers the simplest path to getting their apps to market.\n      </a>\n    </div>\n  </div>\n</div>\n\n\n\n<div class=\"ltag__link\">\n  <a href=\"/ben\" class=\"ltag__link__link\">\n    <div class=\"ltag__link__pic\">\n      <img src=\"https://res.cloudinary.com/practicaldev/image/fetch/s--RELHeEj1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/practicaldev/image/fetch/s--Sb1rTJg1--/c_fill%2Cf_auto%2Cfl_progressive%2Ch_150%2Cq_auto%2Cw_150/https://thepracticaldev.s3.amazonaws.com/uploads/user/profile_image/1/f451a206-11c8-4e3d-8936-143d0a7e65bb.png\" alt=\"ben image\" loading=\"lazy\">\n    </div>\n  </a>\n  <a href=\"/devteam/why-dev-hosts-on-heroku-and-how-we-configure-our-service-1caj\" class=\"ltag__link__link\">\n    <div class=\"ltag__link__content\">\n      <h2>Why DEV hosts on Heroku (and how we configure our service)</h2>\n      <h3>Ben Halpern ・ Aug  1 ・ 3 min read</h3>\n      <div class=\"ltag__link__taglist\">\n        <span class=\"ltag__link__tag\">#meta</span>\n        <span class=\"ltag__link__tag\">#cloud</span>\n        <span class=\"ltag__link__tag\">#heroku</span>\n      </div>\n    </div>\n  </a>\n</div>\n\n\n",
    "body_markdown": "---\r\ntitle: Byte Sized Episode 2: The Creation of Graph Theory \r\npublished: true\r\ndescription: The full story of Leonhard Euler and the creation of this fundamental computer science principle, delivered in a few minutes.\r\ntags: computerscience, graphtheory, bytesized, history\r\ncover_image: https://thepracticaldev.s3.amazonaws.com/i/88e62fzblbluz1dm7xjf.png\r\nseries: Byte Sized Season 1\r\n---\r\n\r\nToday's episode of Byte Sized is about Leonhard Euler and the creation of [Graph Theory](https://en.wikipedia.org/wiki/Graph_theory).\r\n\r\nFor more about how Graph Theory works, check out this video from BaseCS!\r\n\r\n{% link https://dev.to/vaidehijoshi/graph-theory--basecs-video-series-1cpo %}\r\n\r\nFollow **Byte Sized** for an adventure through computer history, a few minutes at a time. More great episodes to come.\r\n\r\n{% organization bytesized %}\r\n\r\n<center>\r\n# **Today's Sponsor**\r\n</center>\r\n\r\n{% organization heroku %}\r\n\r\n{% link https://dev.to/devteam/why-dev-hosts-on-heroku-and-how-we-configure-our-service-1caj %}",
    "user": {
        "name": "Vaidehi Joshi",
        "username": "vaidehijoshi",
        "twitter_username": "vaidehijoshi",
        "github_username": "vaidehijoshi",
        "website_url": "http://www.vaidehi.com",
        "profile_image": "https://res.cloudinary.com/practicaldev/image/fetch/s--eDGAYAoK--/c_fill,f_auto,fl_progressive,h_640,q_auto,w_640/https://thepracticaldev.s3.amazonaws.com/uploads/user/profile_image/2882/K2evUksb.jpg",
        "profile_image_90": "https://res.cloudinary.com/practicaldev/image/fetch/s--htZnqMn3--/c_fill,f_auto,fl_progressive,h_90,q_auto,w_90/https://thepracticaldev.s3.amazonaws.com/uploads/user/profile_image/2882/K2evUksb.jpg"
    },
    "organization": {
        "name": "Byte Sized",
        "username": "bytesized",
        "slug": "bytesized",
        "profile_image": "https://res.cloudinary.com/practicaldev/image/fetch/s--sq0DrZfn--/c_fill,f_auto,fl_progressive,h_640,q_auto,w_640/https://thepracticaldev.s3.amazonaws.com/uploads/organization/profile_image/865/652f7998-32a8-4fd9-85ca-dd697d2a9ee9.png",
        "profile_image_90": "https://res.cloudinary.com/practicaldev/image/fetch/s--1Pt_ICL---/c_fill,f_auto,fl_progressive,h_90,q_auto,w_90/https://thepracticaldev.s3.amazonaws.com/uploads/organization/profile_image/865/652f7998-32a8-4fd9-85ca-dd697d2a9ee9.png"
    }
}

GET a comment by ID

curl https://dev.to/api/comments/gi9b

Output

{
    "type_of": "comment",
    "id_code": "gi9b",
    "body_html": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/REC-html40/loose.dtd\">\n<html><body>\n<p>I'm so happy we've upgraded to PostgreSQL 11, I can finally start using all the features under the sun ☀️</p>\n\n<p>😂</p>\n\n</body></html>\n",
    "user": {
        "name": "rhymes",
        "username": "rhymes",
        "twitter_username": "rhymes_",
        "github_username": "rhymes",
        "website_url": null,
        "profile_image": "https://res.cloudinary.com/practicaldev/image/fetch/s--qhCNe-v6--/c_fill,f_auto,fl_progressive,h_640,q_auto,w_640/https://thepracticaldev.s3.amazonaws.com/uploads/user/profile_image/2693/146201.jpeg",
        "profile_image_90": "https://res.cloudinary.com/practicaldev/image/fetch/s--IQPhTQnb--/c_fill,f_auto,fl_progressive,h_90,q_auto,w_90/https://thepracticaldev.s3.amazonaws.com/uploads/user/profile_image/2693/146201.jpeg"
    },
    "children": [
        {
            "id_code": "gia0",
            "body_html": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/REC-html40/loose.dtd\">\n<html><body>\n<p>You know that less than 2 weeks ago they released Postgres 12, so you'll have to do without <em>some</em> of the features under the sun 😜</p>\n\n</body></html>\n",
            "user": {
                "name": "Michael Kohl",
                "username": "citizen428",
                "twitter_username": "citizen428",
                "github_username": "citizen428",
                "website_url": "https://citizen428.net",
                "profile_image": "https://res.cloudinary.com/practicaldev/image/fetch/s--uTWxpGvR--/c_fill,f_auto,fl_progressive,h_640,q_auto,w_640/https://thepracticaldev.s3.amazonaws.com/uploads/user/profile_image/503/MangaMichi.jpg",
                "profile_image_90": "https://res.cloudinary.com/practicaldev/image/fetch/s--L0GRAgMR--/c_fill,f_auto,fl_progressive,h_90,q_auto,w_90/https://thepracticaldev.s3.amazonaws.com/uploads/user/profile_image/503/MangaMichi.jpg"
            },
            "children": [
                {
                    "id_code": "gib3",
                    "body_html": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/REC-html40/loose.dtd\">\n<html><body>\n<p>I know, but Heroku prudently keeps that for 3 months in beta.</p>\n\n<p>I guess we'll have to upgrade again next year :P</p>\n\n</body></html>\n",
                    "user": {
                        "name": "rhymes",
                        "username": "rhymes",
                        "twitter_username": "rhymes_",
                        "github_username": "rhymes",
                        "website_url": null,
                        "profile_image": "https://res.cloudinary.com/practicaldev/image/fetch/s--qhCNe-v6--/c_fill,f_auto,fl_progressive,h_640,q_auto,w_640/https://thepracticaldev.s3.amazonaws.com/uploads/user/profile_image/2693/146201.jpeg",
                        "profile_image_90": "https://res.cloudinary.com/practicaldev/image/fetch/s--IQPhTQnb--/c_fill,f_auto,fl_progressive,h_90,q_auto,w_90/https://thepracticaldev.s3.amazonaws.com/uploads/user/profile_image/2693/146201.jpeg"
                    }
                }
            ]
        }
    ]
}

Requires a token

GET all articles of a user

Can only get for self

Get all:

curl -H "api-key: API_KEY" https://dev.to/api/articles/me

Get published:

curl -H "api-key: API_KEY" https://dev.to/api/articles/me/published

Output

[
    {
        "type_of": "article",
        "id": 210080,
        "title": "Day 12 of⚡️ #30DaysOfWebPerf ⚡️: Image loading for the lazy",
        "description": "",
        "cover_image": null,
        "published": true,
        "published_at": "2019-11-23T14:09:29.465Z",
        "tag_list": [
            "webperf",
            "performance",
            "images",
            "webdev"
        ],
        "slug": "day-12-of-30daysofwebperf-image-loading-for-the-lazy-2p85",
        "path": "/thegreengreek/day-12-of-30daysofwebperf-image-loading-for-the-lazy-2p85",
        "url": "https://dev.to/thegreengreek/day-12-of-30daysofwebperf-image-loading-for-the-lazy-2p85",
        "canonical_url": "https://dev.to/thegreengreek/day-12-of-30daysofwebperf-image-loading-for-the-lazy-2p85",
        "comments_count": 0,
        "positive_reactions_count": 7,
        "page_views_count": 39,
        "published_timestamp": "2019-11-23T14:09:29Z",
        "body_markdown": "{% twitter 1198240350629965824 %}\n{% twitter 1198240352144175104 %}\n{% twitter 1198240353071116289 %}\n{% twitter 1198240372150943744 %}",
        "user": {
            "name": "Sia Karamalegos",
            "username": "thegreengreek",
            "twitter_username": "TheGreenGreek",
            "github_username": "siakaramalegos",
            "website_url": "https://sia.codes/",
            "profile_image": "https://res.cloudinary.com/practicaldev/image/fetch/s--51vB6XKP--/c_fill,f_auto,fl_progressive,h_640,q_auto,w_640/https://thepracticaldev.s3.amazonaws.com/uploads/user/profile_image/253984/29e0b0cd-a006-42f2-982e-53fc91d3c375.jpg",
            "profile_image_90": "https://res.cloudinary.com/practicaldev/image/fetch/s--P28c88x8--/c_fill,f_auto,fl_progressive,h_90,q_auto,w_90/https://thepracticaldev.s3.amazonaws.com/uploads/user/profile_image/253984/29e0b0cd-a006-42f2-982e-53fc91d3c375.jpg"
        }
    },
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment