Stein Docs

Stein Docs

  • Docs
  • GitHub

›Getting Started

Getting Started

  • Introduction & Core Concepts
  • Create an API
  • Read Data from Sheet
  • Search for Data
  • Add Rows to Sheet
  • Update Rows
  • Delete Rows
  • Authentication
  • Using Client Libraries

Hosting

  • Introduction
  • Manual Installation & Setup

Stein Expedite

  • Introduction
  • Installation
  • Display Data from Sheet
  • Search for Data
  • Connect HTML Forms to Sheet

Search for Data

You can also search for specific records in your sheets.

Structuring the search query

Form a JSON string with your search options mapped as {column: value, ...}. Pass it as the search param to a GET request to your sheet's API URL.

Performing the request

Let's search for posts by Shiven Sinha in our Blog Posts Sheet.

cURL
Node.js
HTML
# Search Sheet1
$ curl 'https://api.steinhq.com/v1/storages/5cc158079ec99a2f484dcb40/Sheet1?search={"author":"Shiven Sinha"}'

# Response ↓ (trimmed for brevity)
# [{"title":"How to create a successful...","content":"Building a good landing page...","link":"https://uxdesign.cc/how-to...","author":"Shiven Sinha"}]
// Search Sheet1
const SteinStore = require("stein-js-client");
const store = new SteinStore(
"https://api.steinhq.com/v1/storages/5cc158079ec99a2f484dcb40"
);

store.read("Sheet1", { search: { author: "Shiven Sinha" } }).then(data => {
console.log(data);
});

// Logs ↓ (trimmed for brevity)
// [{"title":"How to create a successful...","content":"Building a good landing page...","link":"https://uxdesign.cc/how-to...","author":"Shiven Sinha"}]
<script src="https://unpkg.com/stein-js-client"></script>
<script>
const store = new SteinStore(
"https://api.steinhq.com/v1/storages/5cc158079ec99a2f484dcb40"
);

store.read("Sheet1", { search: { author: "Shiven Sinha" } }).then(data => {
console.log(data);
});

// Logs ↓ (trimmed for brevity)
// [{"title":"How to create a successful...","content":"Building a good landing page...","link":"https://uxdesign.cc/how-to...","author":"Shiven Sinha"}]
</script>

Optional request parameters

You can optionally limit and offset your response, as further exemplified in this section.

ParameterDescriptionType
limitMaximum number of rows to be returnedNumber (Integer)
offsetIndex of row from which response should start (default is 0)Number (Integer)

Return value

An array of objects, with each object representing the matching sheet rows.

← Read Data from SheetAdd Rows to Sheet →
  • Structuring the search query
  • Performing the request
  • Optional request parameters
  • Return value
Stein Logo
DocumentationOpen SourcePricingPartners

Privacy PolicyTerms of Service
© 2021 Stein