Formatos de datos
De forma predeterminada, Sheet Best devuelve las filas como una lista de registros. Añade el parámetro opcional _format a cualquier GET para cambiar la estructura de la respuesta. Añade _raw=1 para devolver tipos nativos (números, booleanos) en lugar de cadenas de texto.
El parámetro _format
| Formato | Estructura |
|---|---|
records | [{column: value}, ..., {column: value}] (predeterminado) |
dict | {column: {index: value}} |
list | {column: [values]} |
series | {column: Series(values)} |
split | {index: [...], columns: [...], data: [...]} |
index | {index: {column: value}} |
Ejemplo
curl 'https://api.sheetbest.com/sheets/<id>?_format=records'
curl 'https://api.sheetbest.com/sheets/<id>?_format=dict'
curl 'https://api.sheetbest.com/sheets/<id>?_format=list'
curl 'https://api.sheetbest.com/sheets/<id>?_format=series'
curl 'https://api.sheetbest.com/sheets/<id>?_format=split'
curl 'https://api.sheetbest.com/sheets/<id>?_format=index'
Records (predeterminado)

Dict

List

Series

Split

Index

Devolver tipos nativos con _raw
Los valores de las celdas se devuelven como cadenas de texto de forma predeterminada. Añade _raw=1 para obtener números, booleanos y otros tipos JSON nativos.
# Default: values are strings
curl 'https://api.sheetbest.com/sheets/<id>'
# Native types
curl 'https://api.sheetbest.com/sheets/<id>?_raw=1'
| Modo | Valor de ejemplo |
|---|---|
| Predeterminado (cadena) | "42" |
_raw=1 | 42 |


_raw se puede combinar con cualquier valor de _format.