W3C API Overview

Introduction

This page describes the resources forming the W3C API. If you have any problems or requests, please submit an issue.

The W3C API is public and doesn't require authentication.

Schema

All API access is over HTTPS, and accessed from the api.w3.org domain. All data is sent and received as JSON.

The details about the different API endpoints are documented at https://api.w3.org/doc.

$ curl -i https://api.w3.org/groups
HTTP/1.1 200 OK
Content-Type: application/json
Cache-Control: public, s-maxage=900
Access-Control-Allow-Origin: *
Date: Mon, 23 Jul 2023 12:10:43 GMT
{...}

All timestamps are returned in ISO 8601 format:

YYYY-MM-DDTHH:MM:SSZ

Parameters

The W3C API takes optional parameters that can be passed as an HTTP query string parameter.

List of parameters:

Name Value Purpose Example
embed boolean By default, resources will be represented by links. On specific routes, the embed parameter allows to additionnaly embed related resources (see the HAL model for more details) https://api.w3.org/groups?embed=1
_doc 1 Show the documentation for a specific endpoint https://api.w3.org/groups?_doc=1
items Integer Specify how many items should be listed on a page. Default value: 100, max value: 1000 https://api.w3.org/groups?items=10
page Integer Specify which page should be displayed, Default value: 1 https://api.w3.org/groups?page=2

HTTP verbs

For now, the W3C API is read-only. Therefore the only HTTP verb we support is GET.

Pagination

As mentioned in the parameters section, requests that return multiple items will be paginated to 100 items by default. You can specify further pages with the ?page parameter. For some resources, you can also set a custom page size up to 1000 with the ?items parameter.

Note that page numbering is 1-based and that omitting the ?page parameter will return the first page.