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=543&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 6292 results for "api"(459ms)

code_search_is_easyREADME.md3 matches

@stevekrouse•Updated 1 year ago
11How does this new shiny search engine work? Well, it's quite simple.
12
131. I wrote a [Deno script](https://github.com/pomdtr/val-town-mirror/blob/main/scripts/pull.ts) that fetches all vals from the Val Town API.
142. I pushed the data to a [Github Repository](https://github.com/pomdtr/val-town-mirror)
153. I added a [Github Action](https://github.com/pomdtr/val-town-mirror/blob/main/.github/workflows/sync.yaml) that runs the script every hour to refresh the data.
164. I created a simple frontend on top of the Github Search API that allows you to search the data. It's [hosted on Val Town](https://www.val.town/v/pomdtr/val_town_search) (obviously).
17
18That was it. I didn't have to build a complex search engine, I just used the tools that were available to me.
19
20Is this a scalable solution for Val Town? Probably not.\
21Am I abusing the Github API? Maybe.\
22Does it work better than the current search feature of Val Town? Absolutely!
23

aqiREADME.md1 match

@debugtheworldbot•Updated 1 year 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

aqiREADME.md1 match

@hajitorus•Updated 1 year 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

scheduledNotifiermain.tsx2 matches

@austinm911•Updated 1 year ago
49
50 const response = await pushover({
51 token: Deno.env.get("PO_API_TOKEN")!,
52 user: Deno.env.get("PO_USER_KEY")!,
53 title,
58 console.log("Notified: ", response);
59 } catch (err) {
60 console.error("Error scraping newsletter ", err);
61 }
62};

scheduledNotifierREADME.md1 match

@austinm911•Updated 1 year ago
18- *scraper* Goes to bytes.dev and scrapes latest published newsletter
19- *inserter* Insert it to SQLite if this newsletter already not exists
20- *notifier* Uses Pushover API to send ios mobile notifications
21
22### Pushover notifications

dailyDadJokemain.tsx1 match

@ajn•Updated 1 year ago
3
4export async function dailyDadJoke() {
5 let { setup, punchline } = await fetchJSON("https://official-joke-api.appspot.com/random_joke");
6 return email({
7 text: punchline,

dailyDadJokeREADME.md2 matches

@ajn•Updated 1 year ago
113. 🤣🤣🤣🤣
12
13## API
14
15This val uses the [icanhazdadjoke API](https://icanhazdadjoke.com/api). You can find [more docs here](https://github.com/15Dkatz/official_joke_api), such as how to [filter by type](https://github.com/15Dkatz/official_joke_api?tab=readme-ov-file#grab-jokes-by-type).

valToGHmain.tsx2 matches

@nbbaier•Updated 1 year ago
1import { API_URL } from "https://esm.town/v/std/API_URL?v=5";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=42";
3import { Octokit } from "npm:@octokit/rest";
127
128 try {
129 const { code } = await fetchJSON(`${API_URL}/v1/alias/${vtUser}/${valName}`, {
130 headers: { "Authorization": `Bearer ${Deno.env.get("valtown")}` },
131 });

insecureSSLCertExamplemain.tsx1 match

@stevekrouse•Updated 1 year ago
1import { insecureFetch } from "https://esm.town/v/stevekrouse/insecureFetch";
2
3const url = "https://assignment-api.uspto.gov/patent/basicSearch?query=1234567&fields=main&rows=20";
4const data = await insecureFetch(url);
5const text = await data.text();

insecureFetchREADME.md1 match

@stevekrouse•Updated 1 year ago
8import { insecureFetch } from "https://esm.town/v/stevekrouse/insecureFetch";
9
10const url = "https://assignment-api.uspto.gov/patent/basicSearch?query=1234567&fields=main&rows=20";
11const data = await insecureFetch(url)
12const text = await data.text();

daily-advice-app1 file match

@dcm31•Updated 9 hours ago
Random advice app using Advice Slip API

runValAPIEx2 file matches

@charmaine•Updated 1 day ago
rapilot330
YoungPapi