Retrieving different data formats on GET

Created by Danny Chu, Modified on Tue, 26 Jul, 2022 at 2:39 PM by Danny Chu

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

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article