Introduction

The Calendar web page shows the schedule of meetings and activities of the Legislative Council of the current month, next three months, and past three months. There, links to corresponding home pages of the committees as well as available agendas are provided. When users follows a home page, they can find out the membership of the committee.

The meeting schedules since the Fifth Term can be obtained in the form of open data via web application programming interface (API) as described in this page.

Any comments are welcomed (please e-mail to pid@legco.gov.hk).


Web Application Programming Interface (API)

Note:
  1. For Internet Explorer users, please uncheck "Turn on feed reading view" in the "Settings" of the "Feed and Web slices" section under the "Content" tab of the Internet Options, and then re-start the browser in order to view data in XML format.
  2. Some browsers such as the Internet Explorer will download the data in JSON format instead of displaying them in the browsers. If you encounter such a case, you may download the file and open it with a text editor, or try to use some other browsers such as Chrome.
  3. When Chinese characters are used in a web api command, please perform URL encoding for it first, or use a browser such as Chrome that can encode Chinese characters automatically.

The web api provides the following information:

  1. Tterm (Legislative Council terms)
  2. Tsession (Legislative Council sessions)
  3. Tcommittee (committees)
  4. Tmembership (committee membership)
  5. Tmember (Legislative Council Members)
  6. Tmember_term (which term(s) a Member belongs to)
  7. Tmeeting (meeting schedule)
  8. Tmeeting_committee (which committee(s) holds a meeting)

Corresponding to the above information, the open data web api can be run at:

https://app.legco.gov.hk/ScheduleDB/odata/Tterm (JSON format)
https://app.legco.gov.hk/ScheduleDB/odata/Tterm?$format=xml (XML format)

https://app.legco.gov.hk/ScheduleDB/odata/Tsession (JSON format)
https://app.legco.gov.hk/ScheduleDB/odata/Tsession?$format=xml (XML format)

https://app.legco.gov.hk/ScheduleDB/odata/Tcommittee (JSON format)
https://app.legco.gov.hk/ScheduleDB/odata/Tcommittee?$format=xml (XML format)

https://app.legco.gov.hk/ScheduleDB/odata/Tmembership (JSON format)
https://app.legco.gov.hk/ScheduleDB/odata/Tmembership?$format=xml (XML format)

https://app.legco.gov.hk/ScheduleDB/odata/Tmember (JSON format)
https://app.legco.gov.hk/ScheduleDB/odata/Tmember?$format=xml (XML format)

https://app.legco.gov.hk/ScheduleDB/odata/Tmember_term (JSON format)
https://app.legco.gov.hk/ScheduleDB/odata/Tmember_term?$format=xml (XML format)

https://app.legco.gov.hk/ScheduleDB/odata/Tmeeting (JSON format)
https://app.legco.gov.hk/ScheduleDB/odata/Tmeeting?$format=xml (XML format)

https://app.legco.gov.hk/ScheduleDB/odata/Tmeeting_committee (JSON format)
https://app.legco.gov.hk/ScheduleDB/odata/Tmeeting_committee?$format=xml (XML format)

To get the meta data schema of the dataset, please run the following:

https://app.legco.gov.hk/ScheduleDB/odata/$metadata

The following query string options can be applied:

  • $format - specify whether the data to be returned in json or xml format, e.g. $format=json
  • $top=N - select only the first N entries of the set, where N is a positive integer, e.g. $top=10
  • $skip=N - select only the remaining entries (starting with Entry N+1) where N is a positive integer, e.g. $skip=10
  • $orderby - what values are used to order the retrieved data, e.g. $orderby=start_date_time
  • $select - select specific fields to be returned, e.g. $select=surname_eng,surname_chi,firstname_eng,firstname_chi
  • $filter - select specific entries according to provided conditions, e.g. $filter=substringof('Council Meeting',name_eng) eq true
  • $inlinecount - specify "$inlinecount=allpages" to include the total number of records in the returned data
  • $expand - link up data

For the available operators and functions to be used with $filter option, please refer to the documentation of the Open Data Protocol.


Examples

The following examples illustrate some of the ways to retrieve data according to the Open Data Protocol.