HTTP Response Headers
Every Sheet Best response includes headers you can inspect to track usage and sheet size.
| Header | Description |
|---|---|
X-RateLimit-Limit | Maximum number of requests allowed for the current month. Depends on your plan. |
X-RateLimit-Plan | The plan currently associated with your account. |
X-RateLimit-Remaining | Requests remaining for the current month. When this hits 0 further requests return 402 Payment Required. |
X-Sheet-Columns | Total number of columns in the sheet backing this connection. |
X-Sheet-Rows | Total 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.