/search/releases

GET

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

Parameters

Name Type Description
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
q 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
upcoming query Determines whether to return Upcoming Release Calendar Entries or Published Releases
highlight query Determines whether to return HTML highlighted fields.

Responses

200: OK

Example value
{
  "type": "object",
  "required": [
    "took",
    "limit",
    "offset",
    "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
        },
        "postponed": {
          "description": "Number of postponed 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
        }
      }
    },
    "limit": {
      "description": "The number of Releases returned in the payload",
      "type": "number",
      "example": 10
    },
    "offset": {
      "description": "The offset of the first Release in the releases payload from the first Release in the complete ordered set of Releases which match the query",
      "type": "number",
      "example": 130
    },
    "releases": {
      "description": "List of matching Releases",
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "description",
          "uri"
        ],
        "properties": {
          "description": {
            "type": "object",
            "required": [
              "cancelled",
              "census",
              "finalised",
              "postponed",
              "published",
              "release_date",
              "summary",
              "title"
            ],
            "properties": {
              "cancellation_notice": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "cancelled": {
                "type": "boolean"
              },
              "census": {
                "type": "boolean"
              },
              "contact": {
                "type": "object",
                "required": [
                  "name",
                  "email"
                ],
                "properties": {
                  "email": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "telephone": {
                    "type": "string"
                  }
                }
              },
              "dataset_id": {
                "type": "string"
              },
              "edition": {
                "type": "string"
              },
              "finalised": {
                "type": "boolean"
              },
              "keywords": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "language": {
                "type": "string",
                "example": "English"
              },
              "latest_release": {
                "type": "boolean"
              },
              "meta_description": {
                "type": "string"
              },
              "national_statistic": {
                "type": "boolean"
              },
              "next_release": {
                "type": "string",
                "example": "14 August 2015"
              },
              "postponed": {
                "type": "boolean"
              },
              "provisional_date": {
                "type": "string",
                "format": "date-time"
              },
              "published": {
                "type": "boolean"
              },
              "release_date": {
                "type": "string",
                "format": "date-time"
              },
              "source": {
                "type": "string"
              },
              "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": {
              "dataset_id": {
                "type": "string"
              },
              "edition": {
                "type": "string"
              },
              "keywords": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "meta_description": {
                "type": "string"
              },
              "summary": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "topics": {
                "type": "array",
                "items": {
                  "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