Skip to content

Forem API V1 API

by dev.to

API keyHTTPSSocial
Open documentation ↗

Overview

Access Forem articles, users and other resources via API. For a real-world example of Forem in action, check out [DEV](https://www.dev.to). All endpoints can be accessed with the 'api-key' header and a accept header, but some of them are accessible publicly without authentication. Dates and date times, unless otherwise specified, must be in the [RFC 3339](https://tools.ietf.org/html/rfc3339) format.

Forem API V1 is a social API from dev.to. Requests are authenticated with an API key. It is served over HTTPS. Its OpenAPI description documents 40 endpoints.

At a glance

Authentication
API key
HTTPS
Yes
CORS
Unknown
Category
Social
Base URL
https://dev.to/api
Version
1.0.0
Endpoints
40
Spec updated
2023-03-07

Make a first request

Replace the placeholders; the documentation says exactly where credentials go.

cURL
curl -X GET "https://dev.to/api/api/articles" \
  -H "Accept: application/json" \
  -H "X-API-Key: YOUR_API_KEY"
JavaScript
const response = await fetch("https://dev.to/api/api/articles", {
  method: "GET",
  headers: {
    "Accept": "application/json",
    "X-API-Key": "YOUR_API_KEY",
  },
});
const data = await response.json();
console.log(data);
Python
import requests

response = requests.request(
    "GET",
    "https://dev.to/api/api/articles",
    headers={
    "Accept": "application/json",
    "X-API-Key": "YOUR_API_KEY",
    },
    timeout=30,
)
print(response.json())

Endpoints

MethodPathWhat it does
POST/api/admin/usersInvite a User
GET/api/articlesPublished articles
POST/api/articlesPublish article
GET/api/articles/latestPublished articles sorted by published date
GET/api/articles/meUser's articles
GET/api/articles/me/allUser's all articles
GET/api/articles/me/publishedUser's published articles
GET/api/articles/me/unpublishedUser's unpublished articles
GET/api/articles/{id}Published article by id
PUT/api/articles/{id}Update an article by id
PUT/api/articles/{id}/unpublishUnpublish an article
GET/api/articles/{username}/{slug}Published article by path
GET/api/commentsComments
GET/api/comments/{id}Comment by id
GET/api/display_adsdisplay ads
POST/api/display_adsdisplay ads
GET/api/display_ads/{id}display ad
PUT/api/display_ads/{id}display ads
PUT/api/display_ads/{id}/unpublishunpublish
GET/api/followers/usersFollowers
GET/api/follows/tagsFollowed Tags
GET/api/organizations/{username}An organization
GET/api/organizations/{username}/articlesOrganization's Articles
GET/api/organizations/{username}/usersOrganization's users
GET/api/pagesshow details for all pages
POST/api/pagespages
GET/api/pages/{id}show details for a page
PUT/api/pages/{id}update details for a page
DELETE/api/pages/{id}remove a page
GET/api/podcast_episodesPodcast Episodes
GET/api/profile_images/{username}A Users or organizations profile image
POST/api/reactionscreate reaction
POST/api/reactions/toggletoggle reaction
GET/api/readinglistReadinglist
GET/api/tagsTags
GET/api/users/meThe authenticated user
GET/api/users/{id}A User
PUT/api/users/{id}/suspendSuspend a User
PUT/api/users/{id}/unpublishUnpublish a User's Articles and Comments
GET/api/videosArticles with a video

Questions

Does the Forem API V1 API need an API key?

Yes. The Forem API V1 API uses API key authentication; the documentation explains how to get credentials.

Does the Forem API V1 API support HTTPS?

Yes, the Forem API V1 API is served over HTTPS.

How many endpoints does the Forem API V1 API have?

Its OpenAPI description lists 40 endpoints in version 1.0.0. All of them are shown on this page.

What are alternatives to the Forem API V1 API?

Other Social APIs include Blogger, Facebook, Twitter, Pinterest, TikTok.

Compare alternatives →

Listed from APIs.guru (CC0).