/search/releases

GET

ONS query API specifically targeting already Published (or Cancelled) Releases, or upcoming Release Calendar Entries

Parameters

Name Type Description Possible Values
limit query The number of Resources requested, defaulted to 10 and limited to 1000.
offset query The offset into the complete ordered set of Resources which satisfy the query, which specifies the first Resource to return (starting at 0). Use this parameter as a pagination mechanism along with the limit parameter.
sort query The sort order of the returned set of Releases release_date_asc, release_date_desc, title_asc, title_desc, relevance
query query Query keywords
fromDate query Specifies candidate Releases by their ReleaseDate, which must be on or after the fromDate
toDate query Specifies candidate Releases by their ReleaseDate, which must be on or before the toDate
release-type query The type of releases to include in the results. type-upcoming, type-published, type-cancelled
highlight query Determines whether to return HTML highlighted fields.
census query Whether to only include census releases in the results.

Responses

200: OK

Example value
{
  "type": "object",
  "required": [
    "took",
    "breakdown",
    "releases"
  ],
  "properties": {
    "breakdown": {
      "type": "object",
      "required": [
        "total"
      ],
      "properties": {
        "cancelled": {
          "description": "Number of cancelled Releases",
          "type": "number",
          "example": 5
        },
        "census": {
          "description": "Number of Releases that are related to Census",
          "type": "number",
          "example": 5
        },
        "confirmed": {
          "description": "Number of confirmed Releases",
          "type": "number",
          "example": 5
        },
        "provisional": {
          "description": "Number of provisional Releases",
          "type": "number",
          "example": 5
        },
        "published": {
          "description": "Number of published Releases",
          "type": "number",
          "example": 5
        },
        "total": {
          "description": "Total number of Releases which match query",
          "type": "number",
          "example": 80
        }
      }
    },
    "releases": {
      "description": "List of matching Releases",
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "uri",
          "description"
        ],
        "properties": {
          "date_changes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "change_notice": {
                  "type": "string"
                },
                "previous_date": {
                  "type": "string"
                }
              }
            }
          },
          "description": {
            "type": "object",
            "required": [
              "title",
              "summary",
              "release_date",
              "published",
              "cancelled",
              "finalised",
              "postponed",
              "census"
            ],
            "properties": {
              "cancelled": {
                "type": "boolean"
              },
              "census": {
                "type": "boolean"
              },
              "finalised": {
                "type": "boolean"
              },
              "keywords": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "language": {
                "type": "string"
              },
              "postponed": {
                "type": "boolean"
              },
              "provisional_date": {
                "type": "string",
                "format": "date-time"
              },
              "published": {
                "type": "boolean"
              },
              "release_date": {
                "type": "string",
                "format": "date-time"
              },
              "summary": {
                "type": "string"
              },
              "title": {
                "type": "string"
              }
            }
          },
          "highlight": {
            "description": "Fields that contain at least 1 matching term from query 'q' parameter. The values contain the following embedded tags \"...\u003cem class=\"highlight\"\u003e{matched term}\u003c/em\u003e...\"",
            "type": "object",
            "properties": {
              "keywords": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "summary": {
                "type": "string"
              },
              "title": {
                "type": "string"
              }
            }
          },
          "uri": {
            "type": "string"
          }
        }
      }
    },
    "took": {
      "description": "Time taken to execute query in milliseconds",
      "type": "number",
      "example": 530
    }
  }
}

500: Internal server error

Example value
null