You can pass an optional querystring parameter to our API called _format
, that will format your data to several different formats for your convenience. We format data using records
format by default.
records | [{column -> value}, … , {column -> value}] |
dict | {column -> {index -> value}} |
list | {column -> [values]} |
series | {column -> Series(values)} |
split | {‘index’ -> [index], ‘columns’ -> [columns], ‘data’ -> [values]} |
index | {index -> {column -> value}} |
Shell
# Records curl 'https://sheet.best/api/sheets/cf969697-682a-40e3-bad4-d54803eeeacf?_format=records' # Dict curl 'https://sheet.best/api/sheets/cf969697-682a-40e3-bad4-d54803eeeacf?_format=dict' # List curl 'https://sheet.best/api/sheets/cf969697-682a-40e3-bad4-d54803eeeacf?_format=list' # Series curl 'https://sheet.best/api/sheets/cf969697-682a-40e3-bad4-d54803eeeacf?_format=series' # Split curl 'https://sheet.best/api/sheets/cf969697-682a-40e3-bad4-d54803eeeacf?_format=split' # Index curl 'https://sheet.best/api/sheets/cf969697-682a-40e3-bad4-d54803eeeacf?_format=index'
Python
import requests # Records requests.get("https://sheet.best/api/sheets/cf969697-682a-40e3-bad4-d54803eeeacf?_format=records") # Dict requests.get("https://sheet.best/api/sheets/cf969697-682a-40e3-bad4-d54803eeeacf?_format=dict") # List requests.get("https://sheet.best/api/sheets/cf969697-682a-40e3-bad4-d54803eeeacf?_format=list") # Series requests.get("https://sheet.best/api/sheets/cf969697-682a-40e3-bad4-d54803eeeacf?_format=series") # Split requests.get("https://sheet.best/api/sheets/cf969697-682a-40e3-bad4-d54803eeeacf?_format=split") # Index requests.get("https://sheet.best/api/sheets/cf969697-682a-40e3-bad4-d54803eeeacf?_format=index")
Javascript
// Records fetch( "https://sheet.best/api/sheets/cf969697-682a-40e3-bad4-d54803eeeacf?_format=records" ); // Dict fetch( "https://sheet.best/api/sheets/cf969697-682a-40e3-bad4-d54803eeeacf?_format=dict" ); // List fetch( "https://sheet.best/api/sheets/cf969697-682a-40e3-bad4-d54803eeeacf?_format=list" ); // Series fetch( "https://sheet.best/api/sheets/cf969697-682a-40e3-bad4-d54803eeeacf?_format=series" ); // Split fetch( "https://sheet.best/api/sheets/cf969697-682a-40e3-bad4-d54803eeeacf?_format=split" ); // Index fetch( "https://sheet.best/api/sheets/cf969697-682a-40e3-bad4-d54803eeeacf?_format=index" );
Records Format
Dict Format
List Format
Series Format
Split Format
Index Format
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article