Current Design

When we search the API for questions, one of the fields provided is closed_reason. This is a sample of the results:

  "question_id": 14707,
  "creation_date": 1380431224,
  "last_activity_date": 1380431224,
  "score": -1,
  "answer_count": 0,
  "closed_date": 1380460217,
  "title": "What is considered an actual termination date?",
  "tags": [
  "closed_reason": "off-topic",
  "view_count": 39,
  "owner": {
    "user_id": 10659,
    "display_name": "Jon Smeeth",
    "reputation": 1,
    "user_type": "registered",
    "profile_image": "https://www.gravatar.com/avatar/9dd9f1275a6193c18702f2adf332285b?s=128&d=identicon&r=PG&f=1",
    "link": "http://workplace.stackexchange.com/users/10659/jon-smeeth"
  "link": "http://workplace.stackexchange.com/questions/14707/what-is-considered-an-actual-termination-date",
  "is_answered": false

In this case, the closed_reason is listed solely as 'off-topic'. On The Workplace, there are two site-specific closed reasons:

  1. Questions seeking advice on what job to take, what skills to learn, etc. are off-topic as the answers are rarely useful to anyone else.
  2. Questions seeking legal advice are off-topic as they require answers by legal professionals. See: What is asking for legal advice?

This question was closed for the second reason, but there is absolutely no way to determine that from the API results.

Feature Request

Questions that have a site-specific off-topic close reason should have a custom closed_reason result in the API. Questions that are closed as a custom off-topic reasons should retain the current off-topic closed_reason. For instance, in this case the custom closed_reason would be legal as selected by moderators or the community when the site-specific closed reasons are chosen.


  "closed_reason": "legal",

Alternatively, an additional field could be added to the API called closed_description or something of the sort that will either return the site-specific close reason description, or the custom reason entered in to the box.


  "closed_reason": "off-topic",
  "closed_description": "Questions seeking legal advice are off-topic as they require answers by legal professionals. See: What is asking for legal advice?"


Site-specific closed reasons tend to be very different and useful to distinguish between. To figure out which things should be added as site-specific close reasons in the future, the custom closed reasons people enter would be useful, either as an API call, or by being able to distinguish custom closed questions from others on the list.

1 Answer 1


This has been implemented at some point in time. The 'questions' object in the API has been extended with 'closed_details':

This type represents details about a question closure.

This type is mostly analogous "gray box" that appears below closed and on hold questions.

The box is yellow blue now:

enter image description here

but its possible to retrieve its contents by changing the filter:

enter image description here

The example question above has been Roomba'ed, but here's another example: What are possible career transitions for a seasoned software developer? (from which the box above was taken). Its details can be fetched from the API via this link to the documentation or this direct link:

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .