Skip to main content

HTTP Response Headers

Every Sheet Best response includes headers you can inspect to track usage and sheet size.

HeaderDescription
X-RateLimit-LimitMaximum number of requests allowed for the current month. Depends on your plan.
X-RateLimit-PlanThe plan currently associated with your account.
X-RateLimit-RemainingRequests remaining for the current month. When this hits 0 further requests return 402 Payment Required.
X-Sheet-ColumnsTotal number of columns in the sheet backing this connection.
X-Sheet-RowsTotal number of rows in the sheet backing this connection.

Inspecting headers

curl -i 'https://api.sheetbest.com/sheets/<id>'
const res = await fetch('https://api.sheetbest.com/sheets/<id>');
console.log(res.headers.get('X-RateLimit-Remaining'));
console.log(res.headers.get('X-Sheet-Rows'));

When X-RateLimit-Remaining reaches 0 you've used your monthly allotment. Upgrade your plan to continue making requests.