blob: 2d166781d1217b37d7b985186e97dde767277506 [file] [log] [blame]
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001{
2 "servicePath": "",
3 "title": "PageSpeed Insights API",
4 "schemas": {
5 "LighthouseAuditResultV5": {
6 "properties": {
7 "description": {
8 "type": "string",
9 "description": "The description of the audit."
10 },
11 "id": {
12 "description": "The audit's id.",
13 "type": "string"
14 },
15 "details": {
16 "type": "object",
17 "description": "Freeform details section of the audit.",
18 "additionalProperties": {
19 "description": "Properties of the object.",
20 "type": "any"
21 }
22 },
23 "numericValue": {
24 "format": "double",
25 "description": "A numeric value that has a meaning specific to the audit, e.g. the number of nodes in the DOM or the timestamp of a specific load event. More information can be found in the audit details, if present.",
26 "type": "number"
27 },
28 "warnings": {
29 "type": "any",
30 "description": "Possible warnings that occurred in the audit, can be null."
31 },
32 "title": {
33 "type": "string",
34 "description": "The human readable title."
35 },
36 "errorMessage": {
37 "type": "string",
38 "description": "An error message from a thrown error inside the audit."
39 },
40 "scoreDisplayMode": {
41 "description": "The enumerated score display mode.",
42 "type": "string"
43 },
44 "displayValue": {
45 "type": "string",
46 "description": "The value that should be displayed on the UI for this audit."
47 },
48 "score": {
49 "type": "any",
50 "description": "The score of the audit, can be null."
51 },
52 "explanation": {
53 "description": "An explanation of the errors in the audit.",
54 "type": "string"
55 }
56 },
57 "id": "LighthouseAuditResultV5",
58 "type": "object",
59 "description": "An audit's result object in a Lighthouse result."
60 },
61 "PagespeedApiLoadingExperienceV5": {
62 "type": "object",
63 "description": "The CrUX loading experience object that contains CrUX data breakdowns.",
64 "properties": {
65 "origin_fallback": {
66 "type": "boolean",
67 "description": "True if the result is an origin fallback from a page, false otherwise."
68 },
69 "id": {
70 "description": "The url, pattern or origin which the metrics are on.",
71 "type": "string"
72 },
73 "metrics": {
74 "description": "The map of .",
75 "type": "object",
76 "additionalProperties": {
77 "$ref": "UserPageLoadMetricV5"
78 }
79 },
80 "initial_url": {
81 "description": "The requested URL, which may differ from the resolved \"id\".",
82 "type": "string"
83 },
84 "overall_category": {
85 "description": "The human readable speed \"category\" of the id.",
86 "type": "string"
87 }
88 },
89 "id": "PagespeedApiLoadingExperienceV5"
90 },
91 "UserPageLoadMetricV5": {
92 "properties": {
93 "formFactor": {
94 "type": "string",
95 "description": "Identifies the form factor of the metric being collected."
96 },
97 "metricId": {
98 "type": "string",
99 "description": "Identifies the type of the metric."
100 },
101 "distributions": {
102 "type": "array",
103 "description": "Metric distributions. Proportions should sum up to 1.",
104 "items": {
105 "$ref": "Bucket"
106 }
107 },
108 "category": {
109 "type": "string",
110 "description": "The category of the specific time metric."
111 },
112 "percentile": {
113 "description": "We use this field to store certain percentile value for this metric. For v4, this field contains pc50. For v5, this field contains pc90.",
114 "format": "int32",
115 "type": "integer"
116 },
117 "median": {
118 "type": "integer",
119 "format": "int32",
120 "description": "The median number of the metric, in millisecond."
121 }
122 },
123 "id": "UserPageLoadMetricV5",
124 "description": "A CrUX metric object for a single metric and form factor.",
125 "type": "object"
126 },
127 "AuditRefs": {
128 "id": "AuditRefs",
129 "description": "A light reference to an audit by id, used to group and weight audits in a given category.",
130 "type": "object",
131 "properties": {
132 "group": {
133 "type": "string",
134 "description": "The category group that the audit belongs to (optional)."
135 },
136 "id": {
137 "description": "The audit ref id.",
138 "type": "string"
139 },
140 "weight": {
141 "description": "The weight this audit's score has on the overall category score.",
142 "format": "double",
143 "type": "number"
144 }
145 }
146 },
147 "PagespeedApiPagespeedResponseV5": {
148 "description": "The Pagespeed API response object.",
149 "id": "PagespeedApiPagespeedResponseV5",
150 "type": "object",
151 "properties": {
152 "lighthouseResult": {
153 "$ref": "LighthouseResultV5",
154 "description": "Lighthouse response for the audit url as an object."
155 },
156 "loadingExperience": {
157 "description": "Metrics of end users' page loading experience.",
158 "$ref": "PagespeedApiLoadingExperienceV5"
159 },
160 "kind": {
161 "type": "string",
162 "description": "Kind of result."
163 },
164 "id": {
165 "type": "string",
166 "description": "Canonicalized and final URL for the document, after following page redirects (if any)."
167 },
168 "originLoadingExperience": {
169 "$ref": "PagespeedApiLoadingExperienceV5",
170 "description": "Metrics of the aggregated page loading experience of the origin"
171 },
172 "version": {
173 "$ref": "PagespeedVersion",
174 "description": "The version of PageSpeed used to generate these results."
175 },
176 "captchaResult": {
177 "type": "string",
178 "description": "The captcha verify result"
179 },
180 "analysisUTCTimestamp": {
181 "description": "The UTC timestamp of this analysis.",
182 "type": "string"
183 }
184 }
185 },
186 "ConfigSettings": {
187 "description": "Message containing the configuration settings for the Lighthouse run.",
188 "type": "object",
189 "properties": {
190 "emulatedFormFactor": {
191 "type": "string",
192 "description": "The form factor the emulation should use."
193 },
194 "onlyCategories": {
195 "type": "any",
196 "description": "List of categories of audits the run should conduct."
197 },
198 "locale": {
199 "type": "string",
200 "description": "The locale setting."
201 },
202 "channel": {
203 "description": "How Lighthouse was run, e.g. from the Chrome extension or from the npm module.",
204 "type": "string"
205 }
206 },
207 "id": "ConfigSettings"
208 },
209 "LighthouseCategoryV5": {
210 "properties": {
211 "id": {
212 "description": "The string identifier of the category.",
213 "type": "string"
214 },
215 "auditRefs": {
216 "type": "array",
217 "items": {
218 "$ref": "AuditRefs"
219 },
220 "description": "An array of references to all the audit members of this category."
221 },
222 "manualDescription": {
223 "type": "string",
224 "description": "A description for the manual audits in the category."
225 },
226 "score": {
227 "type": "any",
228 "description": "The overall score of the category, the weighted average of all its audits. (The category's score, can be null.)"
229 },
230 "title": {
231 "description": "The human-friendly name of the category.",
232 "type": "string"
233 },
234 "description": {
235 "description": "A more detailed description of the category and its importance.",
236 "type": "string"
237 }
238 },
239 "description": "A Lighthouse category.",
240 "id": "LighthouseCategoryV5",
241 "type": "object"
242 },
243 "RuntimeError": {
244 "properties": {
245 "code": {
246 "description": "The enumerated Lighthouse Error code.",
247 "type": "string"
248 },
249 "message": {
250 "type": "string",
251 "description": "A human readable message explaining the error code."
252 }
253 },
254 "id": "RuntimeError",
255 "description": "Message containing a runtime error config.",
256 "type": "object"
257 },
258 "PagespeedVersion": {
259 "id": "PagespeedVersion",
260 "description": "The Pagespeed Version object.",
261 "properties": {
262 "minor": {
263 "type": "string",
264 "description": "The minor version number of PageSpeed used to generate these results."
265 },
266 "major": {
267 "type": "string",
268 "description": "The major version number of PageSpeed used to generate these results."
269 }
270 },
271 "type": "object"
272 },
273 "StackPack": {
274 "properties": {
275 "descriptions": {
276 "type": "object",
277 "additionalProperties": {
278 "type": "string"
279 },
280 "description": "The stack pack advice strings."
281 },
282 "title": {
283 "type": "string",
284 "description": "The stack pack title."
285 },
286 "iconDataURL": {
287 "type": "string",
288 "description": "The stack pack icon data uri."
289 },
290 "id": {
291 "description": "The stack pack id.",
292 "type": "string"
293 }
294 },
295 "description": "Message containing Stack Pack information.",
296 "type": "object",
297 "id": "StackPack"
298 },
299 "RendererFormattedStrings": {
300 "properties": {
301 "opportunitySavingsColumnLabel": {
302 "type": "string",
303 "description": "The heading for the estimated page load savings of opportunity audits."
304 },
305 "manualAuditsGroupTitle": {
306 "description": "The heading shown above a list of audits that were not computerd in the run.",
307 "type": "string"
308 },
309 "labDataTitle": {
310 "description": "The title of the lab data performance category.",
311 "type": "string"
312 },
313 "errorLabel": {
314 "type": "string",
315 "description": "The label shown next to an audit or metric that has had an error."
316 },
317 "auditGroupExpandTooltip": {
318 "type": "string",
319 "description": "The tooltip text on an expandable chevron icon."
320 },
321 "crcLongestDurationLabel": {
322 "type": "string",
323 "description": "The label for values shown in the summary of critical request chains."
324 },
325 "passedAuditsGroupTitle": {
326 "description": "The heading that is shown above a list of audits that are passing.",
327 "type": "string"
328 },
329 "toplevelWarningsMessage": {
330 "description": "The label shown preceding important warnings that may have invalidated an entire report.",
331 "type": "string"
332 },
333 "scorescaleLabel": {
334 "type": "string",
335 "description": "The label that explains the score gauges scale (0-49, 50-89, 90-100)."
336 },
337 "notApplicableAuditsGroupTitle": {
338 "description": "The heading shown above a list of audits that do not apply to a page.",
339 "type": "string"
340 },
341 "varianceDisclaimer": {
342 "type": "string",
343 "description": "The disclaimer shown below a performance metric value."
344 },
345 "lsPerformanceCategoryDescription": {
346 "description": "The disclaimer shown under performance explaning that the network can vary.",
347 "type": "string"
348 },
349 "errorMissingAuditInfo": {
350 "description": "The error string shown next to an erroring audit.",
351 "type": "string"
352 },
353 "crcInitialNavigation": {
354 "description": "The label for the initial request in a critical request chain.",
355 "type": "string"
356 },
357 "warningHeader": {
358 "description": "The label shown above a bulleted list of warnings.",
359 "type": "string"
360 },
361 "opportunityResourceColumnLabel": {
362 "description": "The heading for the estimated page load savings opportunity of an audit.",
363 "type": "string"
364 }
365 },
366 "description": "Message holding the formatted strings used in the renderer.",
367 "id": "RendererFormattedStrings",
368 "type": "object"
369 },
370 "CategoryGroupV5": {
371 "properties": {
372 "title": {
373 "description": "The human readable title of the group",
374 "type": "string"
375 },
376 "description": {
377 "description": "The description of what the category is grouping",
378 "type": "string"
379 }
380 },
381 "description": "Message containing a category",
382 "id": "CategoryGroupV5",
383 "type": "object"
384 },
385 "Environment": {
386 "properties": {
387 "hostUserAgent": {
388 "type": "string",
389 "description": "The user agent string of the version of Chrome used."
390 },
391 "networkUserAgent": {
392 "type": "string",
393 "description": "The user agent string that was sent over the network."
394 },
395 "benchmarkIndex": {
396 "description": "The benchmark index number that indicates rough device class.",
397 "format": "double",
398 "type": "number"
399 }
400 },
401 "type": "object",
402 "description": "Message containing environment configuration for a Lighthouse run.",
403 "id": "Environment"
404 },
405 "LighthouseResultV5": {
406 "description": "The Lighthouse result object.",
407 "id": "LighthouseResultV5",
408 "properties": {
409 "requestedUrl": {
410 "type": "string",
411 "description": "The original requested url."
412 },
413 "environment": {
414 "$ref": "Environment",
415 "description": "Environment settings that were used when making this LHR."
416 },
417 "configSettings": {
418 "$ref": "ConfigSettings",
419 "description": "The configuration settings for this LHR."
420 },
421 "userAgent": {
422 "description": "The user agent that was used to run this LHR.",
423 "type": "string"
424 },
425 "lighthouseVersion": {
426 "type": "string",
427 "description": "The lighthouse version that was used to generate this LHR."
428 },
429 "i18n": {
430 "$ref": "I18n",
431 "description": "The internationalization strings that are required to render the LHR."
432 },
433 "finalUrl": {
434 "type": "string",
435 "description": "The final resolved url that was audited."
436 },
437 "audits": {
438 "type": "object",
439 "additionalProperties": {
440 "$ref": "LighthouseAuditResultV5"
441 },
442 "description": "Map of audits in the LHR."
443 },
444 "runtimeError": {
445 "$ref": "RuntimeError",
446 "description": "A top-level error message that, if present, indicates a serious enough problem that this Lighthouse result may need to be discarded."
447 },
448 "stackPacks": {
449 "description": "The Stack Pack advice strings.",
450 "items": {
451 "$ref": "StackPack"
452 },
453 "type": "array"
454 },
455 "runWarnings": {
456 "items": {
457 "type": "any"
458 },
459 "type": "array",
460 "description": "List of all run warnings in the LHR. Will always output to at least `[]`."
461 },
462 "categoryGroups": {
463 "additionalProperties": {
464 "$ref": "CategoryGroupV5"
465 },
466 "type": "object",
467 "description": "Map of category groups in the LHR."
468 },
469 "fetchTime": {
470 "description": "The time that this run was fetched.",
471 "type": "string"
472 },
473 "categories": {
474 "description": "Map of categories in the LHR.",
475 "$ref": "Categories"
476 },
477 "timing": {
478 "$ref": "Timing",
479 "description": "Timing information for this LHR."
480 }
481 },
482 "type": "object"
483 },
484 "Timing": {
485 "description": "Message containing the performance timing data for the Lighthouse run.",
486 "id": "Timing",
487 "properties": {
488 "total": {
489 "format": "double",
490 "description": "The total duration of Lighthouse's run.",
491 "type": "number"
492 }
493 },
494 "type": "object"
495 },
496 "Bucket": {
497 "properties": {
498 "max": {
499 "description": "Upper bound for a bucket's range.",
500 "format": "int32",
501 "type": "integer"
502 },
503 "min": {
504 "description": "Lower bound for a bucket's range.",
505 "format": "int32",
506 "type": "integer"
507 },
508 "proportion": {
509 "type": "number",
510 "description": "The proportion of data in this bucket.",
511 "format": "double"
512 }
513 },
514 "type": "object",
515 "id": "Bucket",
516 "description": "A proportion of data in the total distribution, bucketed by a min/max percentage. Each bucket's range is bounded by min \u003c= x \u003c max, In millisecond."
517 },
518 "Categories": {
519 "id": "Categories",
520 "description": "The categories in a Lighthouse run.",
521 "properties": {
522 "accessibility": {
523 "$ref": "LighthouseCategoryV5",
524 "description": "The accessibility category, containing all accessibility related audits."
525 },
526 "performance": {
527 "$ref": "LighthouseCategoryV5",
528 "description": "The performance category, containing all performance related audits."
529 },
530 "best-practices": {
531 "$ref": "LighthouseCategoryV5",
532 "description": "The best practices category, containing all best practices related audits."
533 },
534 "seo": {
535 "$ref": "LighthouseCategoryV5",
536 "description": "The Search-Engine-Optimization (SEO) category, containing all seo related audits."
537 },
538 "pwa": {
539 "description": "The Progressive-Web-App (PWA) category, containing all pwa related audits.",
540 "$ref": "LighthouseCategoryV5"
541 }
542 },
543 "type": "object"
544 },
545 "I18n": {
546 "description": "Message containing the i18n data for the LHR - Version 1.",
547 "id": "I18n",
548 "type": "object",
549 "properties": {
550 "rendererFormattedStrings": {
551 "description": "Internationalized strings that are formatted to the locale in configSettings.",
552 "$ref": "RendererFormattedStrings"
553 }
554 }
555 }
556 },
557 "ownerDomain": "google.com",
558 "resources": {
559 "pagespeedapi": {
560 "methods": {
561 "runpagespeed": {
562 "id": "pagespeedonline.pagespeedapi.runpagespeed",
563 "description": "Runs PageSpeed analysis on the page at the specified URL, and returns PageSpeed scores, a list of suggestions to make that page faster, and other information.",
564 "response": {
565 "$ref": "PagespeedApiPagespeedResponseV5"
566 },
567 "path": "pagespeedonline/v5/runPagespeed",
568 "flatPath": "pagespeedonline/v5/runPagespeed",
569 "parameterOrder": [],
570 "httpMethod": "GET",
571 "scopes": [
572 "openid"
573 ],
574 "parameters": {
575 "utm_source": {
576 "description": "Campaign source for analytics.",
577 "type": "string",
578 "location": "query"
579 },
580 "captchaToken": {
581 "description": "The captcha token passed when filling out a captcha.",
582 "type": "string",
583 "location": "query"
584 },
585 "url": {
586 "location": "query",
587 "type": "string",
588 "description": "Required. The URL to fetch and analyze"
589 },
590 "category": {
591 "type": "string",
592 "enum": [
593 "CATEGORY_UNSPECIFIED",
594 "ACCESSIBILITY",
595 "BEST_PRACTICES",
596 "PERFORMANCE",
597 "PWA",
598 "SEO"
599 ],
600 "location": "query",
601 "repeated": true,
602 "enumDescriptions": [
603 "Default UNDEFINED category.",
604 "Accessibility (a11y), category pertaining to a website's capacity to be accessible to all users.",
605 "Best Practices, category pertaining to a website's conformance to web best practice.",
606 "Performance, category pertaining to a website's performance.",
607 "Progressive Web App (PWA), category pertaining to a website's ability to be run as a PWA.",
608 "Search Engine Optimization (SEO), category pertaining to a website's ability to be indexed by search engines."
609 ],
610 "description": "A Lighthouse category to run; if none are given, only Performance category will be run"
611 },
612 "strategy": {
613 "description": "The analysis strategy (desktop or mobile) to use, and desktop is the default",
614 "enum": [
615 "STRATEGY_UNSPECIFIED",
616 "DESKTOP",
617 "MOBILE"
618 ],
619 "enumDescriptions": [
620 "UNDEFINED.",
621 "Fetch and analyze the URL for desktop browsers.",
622 "Fetch and analyze the URL for mobile devices."
623 ],
624 "location": "query",
625 "type": "string"
626 },
627 "locale": {
628 "location": "query",
629 "description": "The locale used to localize formatted results",
630 "type": "string"
631 },
632 "utm_campaign": {
633 "description": "Campaign name for analytics.",
634 "location": "query",
635 "type": "string"
636 }
637 }
638 }
639 }
640 }
641 },
642 "canonicalName": "Pagespeed Insights",
643 "discoveryVersion": "v1",
644 "name": "pagespeedonline",
645 "version_module": true,
646 "fullyEncodeReservedExpansion": true,
647 "documentationLink": "https://developers.google.com/speed/docs/insights/v5/about",
648 "id": "pagespeedonline:v5",
649 "baseUrl": "https://pagespeedonline.googleapis.com/",
650 "icons": {
651 "x16": "http://www.google.com/images/icons/product/search-16.gif",
652 "x32": "http://www.google.com/images/icons/product/search-32.gif"
653 },
654 "ownerName": "Google",
655 "version": "v5",
656 "description": "The PageSpeed Insights API lets you analyze the performance of your website with a simple API. It offers tailored suggestions for how you can optimize your site, and lets you easily integrate PageSpeed Insights analysis into your development tools and workflow. ",
657 "batchPath": "batch",
658 "auth": {
659 "oauth2": {
660 "scopes": {
661 "openid": {
662 "description": "Associate you with your personal info on Google"
663 }
664 }
665 }
666 },
667 "rootUrl": "https://pagespeedonline.googleapis.com/",
668 "parameters": {
669 "fields": {
670 "location": "query",
671 "type": "string",
672 "description": "Selector specifying which fields to include in a partial response."
673 },
674 "callback": {
675 "type": "string",
676 "location": "query",
677 "description": "JSONP"
678 },
679 "$.xgafv": {
680 "enumDescriptions": [
681 "v1 error format",
682 "v2 error format"
683 ],
684 "type": "string",
685 "enum": [
686 "1",
687 "2"
688 ],
689 "description": "V1 error format.",
690 "location": "query"
691 },
692 "quotaUser": {
693 "location": "query",
694 "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.",
695 "type": "string"
696 },
697 "prettyPrint": {
698 "location": "query",
699 "description": "Returns response with indentations and line breaks.",
700 "default": "true",
701 "type": "boolean"
702 },
703 "uploadType": {
704 "location": "query",
705 "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
706 "type": "string"
707 },
708 "oauth_token": {
709 "description": "OAuth 2.0 token for the current user.",
710 "type": "string",
711 "location": "query"
712 },
713 "access_token": {
714 "description": "OAuth access token.",
715 "location": "query",
716 "type": "string"
717 },
718 "key": {
719 "type": "string",
720 "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
721 "location": "query"
722 },
723 "alt": {
724 "enumDescriptions": [
725 "Responses with Content-Type of application/json",
726 "Media download with context-dependent Content-Type",
727 "Responses with Content-Type of application/x-protobuf"
728 ],
729 "type": "string",
730 "default": "json",
731 "enum": [
732 "json",
733 "media",
734 "proto"
735 ],
736 "location": "query",
737 "description": "Data format for response."
738 },
739 "upload_protocol": {
740 "location": "query",
741 "type": "string",
742 "description": "Upload protocol for media (e.g. \"raw\", \"multipart\")."
743 }
744 },
745 "revision": "20200813",
746 "kind": "discovery#restDescription",
747 "protocol": "rest",
748 "mtlsRootUrl": "https://pagespeedonline.mtls.googleapis.com/",
749 "basePath": ""
750}