Website Speed Check API
The Website Speed Check API analyzes a single URL and returns page performance metrics, request breakdowns, response codes, and per-file timing details.
API Metadata
| Field | Example | Description |
|---|---|---|
| name | website speed check | API name |
| provider | vebapi.com | Service provider |
| engine | v3-domain-master | Backend engine identifier |
| server | EU-4 | Serving region/node |
| version | 3 | API version |
Response
Successful response is JSON with these top-level keys:
| Key | Type | Description |
|---|---|---|
api |
object | Metadata about the API engine and server. |
summary |
object | High-level performance metrics for the URL. |
improve_page_performance |
array | Actionable recommendations with grades. |
response_codes |
array | Counts of HTTP status codes across fetched resources. |
content_size_by_content_type |
array | Bandwidth contribution by resource type. |
requests_by_content_type |
array | Request count contribution by resource type. |
content_size_by_domain |
array | Bandwidth contribution by domain. |
requests_by_domain |
array | Request count contribution by domain. |
file_requests |
array | Per-file fetch details (URL, size, timings, content-type, error). |
Field Reference
summary
| Field | Type | Description |
|---|---|---|
url |
string | Final tested URL (after normalization). |
performance_grade |
object | Overall score + letter grade. |
performance_grade.score |
integer | 0–100 score. |
performance_grade.grade |
string | Letter grade, e.g. A/B/C. |
page_size_bytes |
integer | Total bytes downloaded across fetched resources. |
page_size_kb |
number | Total KB downloaded across fetched resources. |
load_time_ms |
integer | Total load time for the main document in milliseconds. |
ttfb_ms |
integer | Time-to-first-byte for the main document in milliseconds. |
requests |
integer | Total number of requests fetched. |
unique_domains |
integer | Number of distinct domains used by resources. |
main |
object | Main document request details. |
summary.main
| Field | Type | Description |
|---|---|---|
http_code |
integer | HTTP status of the main document. |
content_type |
string | Content-Type header of the main document. |
header_size |
integer | Response header size (bytes) for main document. |
html_size_bytes |
integer | Main HTML size (bytes). |
redirect_count |
integer | Redirect hops for the main document. |
timings |
object | cURL-style timing breakdown for main document (seconds). |
timings
Timings are expressed in seconds (floating point). Convert to ms by multiplying by 1000.
| Field | Type | Description |
|---|---|---|
namelookup_time |
number | DNS resolution time. |
connect_time |
number | TCP connect time. |
appconnect_time |
number or null | TLS handshake time (if HTTPS) when available. |
pretransfer_time |
number | Time until transfer begins. |
starttransfer_time |
number | Time to first byte (TTFB) in seconds. |
total_time |
number | Total request time. |
redirect_time |
number | Time spent following redirects. |
improve_page_performance
| Field | Type | Description |
|---|---|---|
grade |
string | Letter grade for this rule (A–F). |
suggestion |
string | Recommendation title. |
detail |
string | Short explanation and count of affected assets. |
response_codes
| Field | Type | Description |
|---|---|---|
response_code |
integer | HTTP status code. |
responses |
integer | Number of resources returning this code. |
content_size_by_content_type
| Field | Type | Description |
|---|---|---|
content_type |
string | Resource category (Script, Image, HTML, CSS, Other). |
percent |
number | Percent of total downloaded size. |
size_kb |
number | Total size for this category in KB. |
requests_by_content_type
| Field | Type | Description |
|---|---|---|
content_type |
string | Resource category (Image, Script, CSS, Other, HTML). |
percent |
number | Percent of total requests. |
requests |
integer | Number of requests in this category. |
content_size_by_domain
| Field | Type | Description |
|---|---|---|
domain |
string | Hostname for the resource. |
percent |
number | Percent of total downloaded size. |
size_kb |
number | Total size for this domain in KB. |
requests_by_domain
| Field | Type | Description |
|---|---|---|
domain |
string | Hostname for the resource. |
percent |
number | Percent of total requests. |
requests |
integer | Total requests made to this domain. |
file_requests
| Field | Type | Description |
|---|---|---|
url |
string | Full resource URL fetched. |
domain |
string | Hostname extracted from the URL. |
status |
integer | HTTP status code for the resource. |
type |
string | Resource category (Script, Image, HTML, CSS, Other). |
size_bytes |
integer | Downloaded size in bytes (may be 0 for some beacons). |
timings |
object | Timing breakdown for this file (seconds). |
content_type |
string | Response Content-Type header. |
error |
string or null | Error message if the request failed, otherwise null. |
Error Responses
| HTTP Code | When | Example Body |
|---|---|---|
| 400 | Missing or invalid url parameter |
{"error":"Missing url parameter"} |
| 401 | Missing/invalid API key | {"error":"Unauthorized"} |
| 429 | Rate limit exceeded | {"error":"Rate limit exceeded"} |
| 500 | Unexpected server error | {"error":"Internal server error"} |
Changelog
| Version | Changes |
|---|---|
| 3 | Initial public version of Website Speed Check response schema. |