Query for web data by sending a GET request to our /api
endpoint by providing your LSD as URL-encoded string in the “query” parameter.
For example, you could enter the following into your search bar:
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
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"
Lastly, 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"
)
}`
);