Query LSD by sending a GET request to our /api
endpoint with a “query” parameter. For example, enter the following into your search bar:
Or, similar to Stych, you could also just run a cURL statement. Type the following into your terminal.
curl "https://lsd.so/api?query=FROM%20https%3A%2F%2Fnews.ycombinator.com%20%7C%3E%20GROUP%20BY%20span.titleline%20%7C%3E%20SELECT%20a%20AS%20post"
Finally, here’s an example using JavaScript’s fetch API:
fetch(
`https://lsd.so/api?query=${
encodeURIComponent(
"FROM https://news.ycombinator.com |> GROUP BY span.titleline |> SELECT a AS post"
)
}`
);