1Migrated from folder: docs/api/run
6
7
81. Make sure you have your Val Town API Token saved in your secrets. See more about [authentication](https://docs.val.town/api/authentication) to understand how to generate a token.
91. Make sure you've [set up your turso database](https://www.val.town/v/std.turso)
101. **[👆Fork this val](https://www.val.town/v/neverstew.migration)**
1Migrated from folder: docs/api/aliasValExample
1Migrated from folder: docs/api/aliasExample
1Migrated from folder: docs/api/alias
1# Lookup a weather.gov grid by lat, lon
2
3Documentation: https://www.weather.gov/documentation/services-web-api
4
5> Forecasts are created at each NWS Weather Forecast Office (WFO) on their own grid definition, at a resolution of about 2.5km x 2.5km. The API endpoint for the 12h forecast periods at a specific grid location is formatted as:
6>
7> https://api.weather.gov/gridpoints/{office}/{gridX},{gridY}/forecast
8>
9> For example: https://api.weather.gov/gridpoints/TOP/31,80/forecast
10>
11> To obtain the grid forecast for a point location, use the /points endpoint to retrieve the current grid forecast endpoint by coordinates:
12>
13> https://api.weather.gov/points/{latitude},{longitude}
14>
15> For example: https://api.weather.gov/points/39.7456,-97.0892
16>
17
1Migrated from folder: Archive/what_is_an_api_video/site
35## Architecture
36
37This @std.turso function is the client or SDK to @std.tursoAPI, which acts as a "proxy" to Turso. It handles authentication, creates databases, and forwards on your SQL queries. You can get lower latency (~200ms vs ~800ms), more storage, databases, CLI & API access by having your own Turso account.
38
39Migrated from folder: turso/turso
1Migrated from folder: Archive/myApi
1# Handling query params
2
3You can grab query parameters out of any val that is operating using the [Web API](https://docs.val.town/api/web) using [URL#searchParams](https://developer.mozilla.org/en-US/docs/Web/API/URL/searchParams).
4
5This val demonstrates how to grab a single `name` parameter, as well as convert the entire query string into an object. It returns the all the query parameters found as a json response.