Dev.to hub

Dev.to Trend API

One trending topic, its top-scoring posts, and optionally every post in it.

GET /v1/dev-to/trend

1 credit Failed requests are free

About this endpoint

GET /v1/dev-to/trend takes exactly one of id or slug and returns trend with id, name, slug, description, keyQuestions, score, articlesCount, coverImage, firstObservedAt and lastObservedAt. It also carries topArticles, each with id, title, slug, score and publishedAt.

Add include=articles to receive a page of the trend's full post objects in articles, using the same post shape as /v1/dev-to/articles, with page and limit controlling that list. Without include=articles, articles and page are null, and sending page or limit without it is refused. An unknown trend returns lookupStatus: not_found with trend null.

Dev.to Trend API FAQ

Why do page and limit need include=articles?

They apply to the trend's article list. Without include=articles there is no list to page, so those parameters are refused rather than ignored.

How many credits does a trend lookup cost?

Pricing is documented on the operation in the API registry (shown on this page). Confirm on every response with meta.creditsCharged: that field is the billing source of truth. Each paginated page is a separate billed request.

What does topArticles contain?

The trend's top-scoring posts with id, title, slug, score and publishedAt. For full post bodies, use the article route with each id.

Can I send a slug instead of an id?

Yes, but exactly one of the two. The slug is lowercase and can contain hyphens, for example a trend slug from the trends list.