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/$1?q=api&page=1431&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 17842 results for "api"(3473ms)

blobAdminREADME.md1 match

@psimyn•Updated 9 months ago
9[![](https://stevekrouse-button.express.val.run/Install)](https://www.val.town/v/stevekrouse/blob_admin_app/fork)
10
11It uses [basic authentication](https://www.val.town/v/pomdtr/basicAuth) with your [Val Town API Token](https://www.val.town/settings/api) as the password (leave the username field blank).
12
13# TODO

honEmeraldSnailmain.tsx2 matches

@stevekrouse•Updated 9 months ago
104
105 try {
106 const response = await fetch("/api/chat", {
107 method: "POST",
108 headers: { "Content-Type": "application/json" },
209
210async function server(request: Request): Promise<Response> {
211 if (request.method === "POST" && new URL(request.url).pathname === "/api/chat") {
212 const { Anthropic } = await import("https://esm.sh/@anthropic-ai/sdk@0.17.1");
213 const { messages } = await request.json();

dailyDadJokeREADME.md2 matches

@rahulg•Updated 9 months 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).

dailyDadJokemain.tsx1 match

@rahulg•Updated 9 months 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,

aqiREADME.md1 match

@unicorn•Updated 9 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

scrapeZillowAPIREADME.md1 match

@rochambeau314•Updated 9 months ago
1Migrated from folder: group_house/scrapeZillowAPI

scrapeCraigslistAPIREADME.md1 match

@rochambeau314•Updated 9 months ago
1Migrated from folder: group_house/scrapeCraigslistAPI

calculateTransitAPIREADME.md1 match

@rochambeau314•Updated 9 months ago
1Migrated from folder: group_house/calculateTransitAPI

sunsetNYCalendarmain.tsx3 matches

@ejfox•Updated 9 months ago
1// This approach uses the Sunset and Sunrise API to get sunset times for New York,
2// and creates a simple form to generate a calendar of events occurring before sunset.
3
107async function getSunsetTime(date: Date): Promise<Date> {
108 const formattedDate = `${date.getFullYear()}-${(date.getMonth() + 1).toString().padStart(2, '0')}-${date.getDate().toString().padStart(2, '0')}`;
109 const response = await fetch(`https://api.sunrise-sunset.org/json?lat=40.7128&lng=-74.0060&date=${formattedDate}&formatted=0`);
110
111 if (!response.ok) {
116
117 if (!data.results || !data.results.sunset) {
118 throw new Error("Invalid response from sunset API");
119 }
120

redditSearchmain.tsx5 matches

@sarahxc•Updated 9 months ago
11interface RedditSearchOptions {
12 query: string;
13 apiKey?: string;
14}
15
17export async function redditSearch({
18 query,
19 apiKey = Deno.env.get("BROWSERBASE_API_KEY"),
20}: RedditSearchOptions): Promise<ThreadResult[]> {
21 if (!apiKey) {
22 throw new Error("BrowserBase API key is required");
23 }
24
25 const puppeteer = new PuppeteerDeno({ productName: "chrome" });
26 const browser = await puppeteer.connect({
27 browserWSEndpoint: `wss://connect.browserbase.com?apiKey=${apiKey}&enableProxy=true`,
28 ignoreHTTPSErrors: true,
29 });

dailyQuoteAPI

@Souky•Updated 19 hours ago

HTTP

@Ncharity•Updated 21 hours ago
Daily Quote API
Kapil01
apiv1