WAVE API (version 3.1) Details


API.requests are made by sending a request to

View the API changelog

The WAVE API is a shared service. To ensure optimal speed and availability to all users, please limit API calls to no more than 2 simultaneous requests, otherwise rate limiting may be implemented for your account. For faster analysis on unlimited URLs, check out the波站独立API.

Query Parameters

NOTE: All parameters are optional unless specified.

Parameter Meaning Notes
key Your API key. (REQUIRED) The API key is provided to you after you register. It can be regenerated by logging in.
url 要分析的页面的完整URL。(需要) The page must be publicly accessible (see authentication options below) in order to be analyzed. URLs must be URL encoded (e.g., ampersands, spaces, etc. escaped).
format json要么xml
The format in which results will be returned.
viewportwidth integer
Pixel width at which the page will be evaluated. This can be useful for testing pages at various responsive breakpoints.
evaldelay integer
Number of milliseconds to wait after the last page request before evaluating the page. This can be better ensure that pages that are heavily manipulated via scripting area fully formed before being evaluated. This can be set to 0 for static pages or increased for very dynamic pages or pages loading from slow sources.
reporttype 1,2,3, or4

reporttype=1 (costs 1 API credit) will return only the WAVE statistics for the page being analyzed - the number of errors, contrast errors, alerts, features, ARIA elements, and structural elements.

reporttype=2 (costs 2 API credits) will return the statistics above, as well as a listing of all WAVE items (e.g., types of errors and number of each) identified.

ReportType = 3(成本3 API学分)将返回所有上述元素的对比度数据和波浪项目相关联的每个元素的XPath。这可以允许您识别出现特定问题的每个页面中的位置。

ReportType = 4(成本3 API积分)将返回所有上述元件的所有内容,以及波浪项目相关联的每个元素的CSS选择值。这可以允许您识别出现特定问题的每个页面中的位置。

username 服务器身份验证所需的用户名 If the page to be analyzed is password protected and uses standard authentication, WAVE can use the username and password to authenticate before checking the page.
password Password required for server authentication Please note that username and password are sent in plain text and are passed through the WAVE system to your domain. We recommend using https or using theWAVE Stand-alone API.
useragent User agent string By default, the API uses an up-to-date browser user agent string for a modern Chrome browser on Mac when requesting the page. This can be overridden here. Be sure to usea valid user agent string.

Result Parameters

The following result parameters are returned forreporttype=1(or when no reporttype is specified)

Parameter Meaning
status:success Status of the API request (true or false). If false, a状态:错误message will be provided with error details.
status:httpstatuscode 从主机服务器返回HTTP代码(例如,“200”,“404”等)。这有助于过滤输出404或其他错误页面。
statistics:pagetitle Title of the page.
统计:PageURL. 页面的URL。由于重定向,这有时可能与请求中发送的URL不同。
statistics:time 波浪下载和分析页面所需的秒数。
statistics:creditsremaining Number of WAVE API credits remaining on account
统计:ALLITEMCOUNT. Sum of all categoryname:count items below, or number of distinct items returned by WAVE (must usereporttype=2+ to view them individually).
statistics:totalelements Number of DOM elements in the page.
统计:waveurl 完整在线波报告的URL。
categories:分类名称 数组of categories returned -错误,contrast,alert,feature,结构体, oraria
categories:分类名称:description A brief description of the category.
categories:分类名称:count Number of items in that category (e.g.,categories:errors:countreturns the number of errors detected).

In addition to all parameters above, the following result parameters are returned forreporttype=2

Parameter Meaning
categories:分类名称:items 数组of items in that category (e.g., types of errors within the error category)
categories:分类名称:items:id Distinct identifier for each item type. Example:categories:errors:items:alt_missingindicates the missing alternative text item is present.
categories:分类名称:items:id:count The number of that particular item returned. (Example:categories:errors:items:alt_missing:count:7indicates 7 missing alternative text items were found.
categories:分类名称:items:id:id The distinct identifier for that item. This can be useful for looking up item details in the WAVE documentation.
categories:分类名称:items:id:description 物品的简短描述。其他详细信息(项目意味着什么,为什么可以访问它,波浪算法和WCAG 2映射的可访问性至关重要)可通过查询来获取波文档using the item id.

In addition to all parameters above, the following result parameters are returned forreporttype=3

Parameter Meaning
categories:分类名称:items:id:xpaths:xpath 数组of XPath values for each item of that type.
categories:contrast:items:contrast:contrastdata 每个对比度项的对比度信息

In addition to the reporttype=1 and reporttype=2 parameters above, the following result parameters are returned forreporttype=4

Parameter Meaning
categories:分类名称:items:id:selectors:selector 每个类型的CSS选择器值的数组。
categories:contrast:items:contrast:contrastdata 每个对比度项的对比度信息


Basic Query




Basic XML Query



<?XML Version =“1.0”编码=“UTF-8”?> <结果> <状态> <成功> 200 Google

Get Item Details



{“status”:{“成功”:true,“httpstatuscode”:200},“统计”:{“pagetitle”:“google”,“pageull”:“”,“time”:1.27,“CreditsRemaining”:1487,“Allitemcount”:21,“Totnelements”:234,“Waveurl”:“”}“类别”:{ “错误”:{ “描述”: “错误”, “计数”:4 “项”:{ “language_missing”:{ “ID”: “language_missing”, “描述”:“文档语言missing", "count":1 }, "alt_spacer_missing":{ "id":"alt_spacer_missing", "description":"Spacer image missing alternative text", "count":1 }, "link_empty":{ "id":"link_empty", "description":"Empty link", "count":1 }, "label_missing":{ "id":"label_missing", "description":"Missing form label", "count":1 } } }, "contrast":{ "description":"Contrast Errors", "count":2, "items":{ "contrast":{ "id":"contrast", "description":"Very Low Contrast", "count":2 } } }, "alert":{ "description":"Errors", "count":5, "items":{ "h1_missing":{ "id":"h1_missing", "description":"Missing first level heading", "count":1 }, "title_redundant":{ "id":"title_redundant", "description":"Redundant title text", "count":1 }, "label_title":{ "id":"label_title", "description":"Unlabeled form element with title", "count":1 }, "link_suspicious":{ "id":"link_suspicious", "description":"Suspicious link text", "count":1 }, "heading_skipped":{ "id":"heading_skipped", "description":"Skipped heading level", "count":1 } } }, "feature":{ "description":"Features", "count":1, "items":{ "alt_link":{ "id":"alt_link", "description":"Linked image with alternative text", "count":1 } } }, "structure":{ "description":"Structural Elements", "count":5, "items":{ "table_layout":{ "id":"table_layout", "description":"Layout table", "count":2 }, "ol":{ "id":"ol", "description":"Ordered list", "count":1 }, "h2":{ "id":"h2", "description":"Heading level 2", "count":1 }, "iframe":{ "id":"iframe", "description":"Inline Frame", "count":1 } } }, "aria":{ "description":"ARIA", "count":4, "items":{ "aria":{ "id":"aria", "description":"ARIA", "count":4 } } } } }

The results include all statistics, and also the types of WAVE items found and the count of each item type. Note that this request type will cost 2 API credits.

Get Item Details + XPaths



{“status”:{“成功”:true,“httpstatuscode”:200},“统计”:{“pagetitle”:“google”,“pageull”:“”,“time”:1.27,“CreditsRemaining”:1487,“AllItemCount”:20,“Totnelements”:186,“Waveurl”:“”}“类别”:{ “错误”:{ “描述”: “错误”, “计数”:4 “项”:{ “language_missing”:{ “ID”: “language_missing”, “描述”:“文档语言缺少“,”count“:1,”xpath“:[”#“]},”alt_spacer_missing“:{id”:“alt_spacer_missing”,“描述”:“spacer opere缺少替代文本”,“count”:1,“XPaths”:[“\ / body [1] \ / centre [1] \ / span [1] \ / div [1] \ / div [1] \ /表[1] \ / tbody [1] \/ TR [2] \ / TD [1] \ / IMG [1] “]} ”link_empty“:{ ”ID“: ”link_empty“, ”描述“: ”空链接“, ”计数“:1,”XPaths“:[”\ / body [1] \ / div [1] \ / div [1] \ / div [1] \ / div [2] \ / li [1] \ / li [3] \ / a[1] “]} ”label_missing“:{ ”ID“: ”label_missing“, ”描述“: ”缺少形式标签“, ”计数“:1, ”的XPath“:[” \ / BODY [1] \ /TextArea [1]“]}}}}}}}”对比度“:{”描述“:”续RAST错误 “ ”计数“:2 ”项“:{ ”对比度“:{ ”ID“: ”对比度“, ”说明“: ”对比度非常低“, ”计数“:2 ”的XPath“:[”\ / body [1] \ / div [1] \ / div [1] \ / div [1] \ / div [1] \ / ol [1] \ / li [1] \ / a [1] \ / a [1]“,“\ / body [1] \ / div [1] \ / div [1] \ / div [1] \ / div [1] \ / ol [1] \ / li [2] \ / a [1] \ / a [1]”],“Contrastdata”:[[2.48,“#9a9aff”,“#ffffff”,false],[2.81,“#9a9a9a”,“#ffffff”,true]]}}},“警报”:{“描述“:” 警报”, “计数”:5 “项”:{ “h1_missing”:{ “ID”: “h1_missing”, “描述”: “缺少第一级标题”, “计数”:1, “的XPath”: “#”]} “title_redundant”:{ “ID”: “title_redundant”, “描述”: “冗余标题文本”, “计数”:1, “的XPath”:[“\ / BODY [1] \/ CENTER [1] \ / DIV [1] \ / A [1] \ / IMG [1] “]} ”LABEL_TITLE“:{ ”ID“: ”LABEL_TITLE“, ”描述“:” 与标题未标记的形式元件“,”count“:1,”xpath“:[”\ / body [1] \ / centre [1] \ / form [1] \ /表[1] \ / tbody [1] \ / tr [1]\/TD[2]\/DIV[1]\/INPUT[1]" ] }, "link_suspicious":{ "id":"link_suspicious", "description":"Suspicious link text", "count":1, "xpaths":[ "\/BODY[1]\/DIV[1]\/DIV[1]\/DIV[1]\/DIV[1]\/OL[1]\/LI[9]\/A[1]" ] }, "heading_skipped":{ "id":"heading_skipped", "description":"Skipped heading level", "count":1, "xpaths":[ "\/BODY[1]\/DIV[1]\/DIV[1]\/DIV[1]\/DIV[2]\/H2[1]" ] } } }, "feature":{ "description":"Features", "count":1, "items":{ "alt_link":{ "id":"alt_link", "description":"Linked image with alternative text", "count":1, "xpaths":[ "\/BODY[1]\/CENTER[1]\/DIV[1]\/A[1]\/IMG[1]" ] } } }, "structure":{ "description":"Structural Elements", "count":6, "items":{ "table_layout":{ "id":"table_layout", "description":"Layout table", "count":3, "xpaths":[ "\/BODY[1]\/CENTER[1]\/FORM[1]\/TABLE[1]\/TBODY[1]\/TR[1]\/TD[1]", "\/BODY[1]\/CENTER[1]\/SPAN[1]\/DIV[1]\/DIV[1]\/TABLE[1]\/TBODY[1]\/TR[1]\/TD[1]", "\/BODY[1]\/TABLE[1]\/TBODY[1]\/TR[1]\/TD[1]" ] }, "ol":{ "id":"ol", "description":"Ordered list", "count":1, "xpaths":[ "\/BODY[1]\/DIV[1]\/DIV[1]\/DIV[1]\/DIV[1]\/OL[1]\/LI[1]" ] }, "h2":{ "id":"h2", "description":"Heading level 2", "count":1, "xpaths":[ "\/BODY[1]\/DIV[1]\/DIV[1]\/DIV[1]\/DIV[2]\/H2[1]" ] }, "iframe":{ "id":"iframe", "description":"Inline Frame", "count":1, "xpaths":[ "\/BODY[1]\/IFRAME[1]" ] } } }, "aria":{ "description":"ARIA", "count":4, "items":{ "aria":{ "id":"aria", "description":"ARIA", "count":4, "xpaths":[ "\/BODY[1]\/DIV[1]\/DIV[1]\/DIV[1]\/DIV[1]\/OL[1]\/LI[9]\/A[1]", "\/BODY[1]\/DIV[1]\/DIV[1]\/DIV[1]\/DIV[1]\/OL[1]\/LI[9]\/DIV[1]", "\/BODY[1]\/DIV[1]\/DIV[1]\/DIV[1]\/DIV[2]\/OL[1]\/LI[3]\/A[1]", "\/BODY[1]\/DIV[1]\/DIV[1]\/DIV[1]\/DIV[2]\/OL[1]\/LI[3]\/DIV[1]" ] } } } } }


The item details and XPaths can also be returned in XML format with the following:


Get Item Details + CSS Selectors


Output will be as above, except that CSS selector values will be provided instead of XPath values. Selector values may be useful to associate a particular item with a distinct element within the page (e.g., determining which particular image in the page is missing alternative text). These can also be returned in XML format. This request will cost 3 API credits.

Getting WAVE Documentation

A separate API allows you to get details about WAVE items. A JSON file that provides summary details for all items is available at This can be retrieved in XML format at要么in HTML at





{ "name":"alt", "title":"Alternative text", "type":"feature", "summary":"Image alternative text is present.", "purpose":"Alternative text presents the content or function of an image to screen reader users or in other situations where images cannot be seen or are unavailable.", "actions":"Ensure that the alternative text conveys the content and function of the image accurately and succinctly. The alt attribute should be equivalent, accurate, and succinct.", "details":"A non-empty alt attribute is present on an image.", "guidelines":[ { "name":"1.1.1 Non-text Content (Level A)", "link":"\/\/\/standards\/wcag\/checklist#sc1.1.1" } ] }

XML documentation



<?xml版本=“1.0”编码=“UTF-8”?> <结果> alt 替代文本</ title> <type> feature </ type> <summary>图像替代文本存在。</ summary> <目的>替代文本呈现给屏幕阅读器用户的内容或函数,或者在无法看到或不可用的其他情况下。</目的> <Actions>确保备用文本准确和简洁地传达图像的内容和功能。alt属性应该是等效的,准确和简洁的。</ actions> <详细信息>图像上存在非空alt属性。</详细信息> <指南> <item> <name> 1.1.1非文本内容(级别a)</ name> <link> // </ link> </ item> </ newel> </结果></div> <h3>反馈</h3> <p>如果您有关于Wave API规范的反馈或建议,请<a href="//">联系我们</a>.</p> </main> <footer> <h2>Need more than just one page at a time?</h2> <p>Pope Tech is an enterprise-level web accessibility evaluation system based on WAVE that provides site-wide monitoring and reporting of accessibility over time.</p> <p>Learn more at<a href=""><br><img src="//" alt="教皇技术徽标"></a></p> </footer> </body> </html>