Val Town Code SearchReturn to Val Town

API Access

You can access search results via JSON API by adding format=json to your query:

https://codesearch.val.run/?q=api&page=853&format=json

For typeahead suggestions, use the /typeahead endpoint:

https://codesearch.val.run/typeahead?q=api

Returns an array of strings in format "username" or "username/projectName"

Found 11410 results for "api"(1494ms)

createTursoProxymain.tsx1 match

@pomdtr•Updated 10 months ago
29 app.all("*", async (c) => {
30 const { path } = c.req;
31 return await fetch(`https://api.val.town${path}`, {
32 method: c.req.method,
33 headers: c.req.raw.headers,

createGeneratedValREADME.md2 matches

@yawnxyz•Updated 11 months ago
1# Use GPT to generate vals on your account!
2
3Describe the val that you need, call this function, and you'll get a new val on your workspace generated by OpenAI's API!
4
5First, ensure you have a [Val Town API Token](https://www.val.town/settings/api), then call `@andreterron.createGeneratedVal({...})` like this [example](https://www.val.town/v/andreterron.untitled_tomatoKiwi):
6
7```javascript

honoTanaEndpointmain.tsx3 matches

@impedivity•Updated 11 months ago
1import { saveToTana } from "https://esm.town/v/impedivity/saveToTana";
2import { APIPlainNode } from "https://esm.town/v/nbbaier/tanaTypes";
3import { Hono } from "npm:hono";
4
5const token = Deno.env.get("tanaInputAPI");
6
7export const honoTanaEndpoint = async (req: Request) => {
10 let { text, url } = c.req.query();
11 console.log(c.req);
12 const payload: APIPlainNode = {
13 name: text,
14 children: [

tanaSavemain.tsx3 matches

@impedivity•Updated 11 months ago
1import { saveToTana } from "https://esm.town/v/impedivity/saveToTana";
2import { APIPlainNode } from "https://esm.town/v/nbbaier/tanaTypes";
3import { Hono } from "npm:hono";
4
5const token = Deno.env.get("tanaInputAPI");
6console.log(token);
7console.log(Request);
16 let { text, url } = c.req.query();
17 console.log(c.req);
18 const payload: APIPlainNode = {
19 name: text,
20 children: [

createTursoProxyREADME.md1 match

@pomdtr•Updated 11 months ago
15
16// use my private proxy
17setEnv("VALTOWN_API_URL", "<proxy-url>");
18
19// wire sqlite explorer to a turso db !

litExampleREADME.md1 match

@triptych•Updated 11 months ago
1# lit
2
3[Lit](https://lit.dev/docs/ssr/server-usage/) is kind of like Google's answer to React: it's a little more reliant on browser APIs like custom elements and the shadow DOM, a little less 'magic', like using JSX.
4
5This is an example of using Lit and rendering it straight to a string, which is something that's recently popular. It works pretty well, right off the bat: Lit provides nice ESM modules and a pretty smooth workflow!

aqiREADME.md1 match

@adrianlee•Updated 11 months ago
8
91. Click `Fork`
102. Change `location` (Line 4) to describe your location. It accepts fairly flexible English descriptions which it turns into locations via [nominatim's geocoder API](https://www.val.town/v/stevekrouse/nominatimSearch).
113. Click `Run`
12

twitterAlertREADME.md1 match

@kristencheung•Updated 11 months ago
13Change the `query` variable for what you want to get notified for.
14
15You can use [Twitter's search operators](https://developer.twitter.com/en/docs/twitter-api/v1/rules-and-filtering/search-operators) to customize your query, for some collection of keywords, filtering out others, and much more!
16
17## 3. Notification

react_tldrawmain.tsx1 match

@tfayyaz•Updated 11 months ago
16 <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
17 <style>
18 @import url("https://fonts.googleapis.com/css2?family=Inter:wght@500;700&display=swap");
19 @import url("https://esm.sh/tldraw@2.1.0/tldraw.css");
20

openAIStreamingREADME.md3 matches

@maxm•Updated 11 months ago
10assistant > Here are a few fun Val ideas you could build on Val Town:
11
121. **Random Joke Generator:** Fetch a random joke from an API and display it.
132. **Daily Weather Update:** Pull weather data for your location using an API and create a daily summary.
143. **Mini Todo List:** Create a simple to-do list app with add, edit, and delete functionalities.
154. **Chuck Norris Facts:** Display a random Chuck Norris fact sourced from an API.
165. **Motivational Quote of the Day:** Fetch and display a random motivational quote each day.
17

mod-interview-api1 file match

@twschiller•Updated 7 hours ago

daily-advice-app1 file match

@dcm31•Updated 3 days ago
Random advice app using Advice Slip API
apiv1
papimark21