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/$%7Bsuccess?q=api&page=943&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 13036 results for "api"(1690ms)

WundergroundStationDisplayV2main.tsx5 matches

@CroniacUpdated 8 months ago
1// This approach will fetch weather data from a Wunderground API, parse the JSON response,
2// and display a simplified version of the current conditions in separate tiles. We'll use
3// the fetch API to make the HTTP request and React for rendering the UI.
4
5/** @jsxImportSource https://esm.sh/react */
29 const fetchWeather = () => {
30 setLastChecked(new Date());
31 fetch("/api/weather" + window.location.search)
32 .then(response => response.json())
33 .then(data => {
181 }
182
183 if (url.pathname === "/api/weather") {
184 try {
185 const wundergroundResponse = await fetch(
186 `https://api.weather.com/v2/pws/observations/current?stationId=${stationId}&format=json&units=e&apiKey=e1f10a1e78da46f5b10a1e78da96f525`,
187 );
188 const wundergroundData = await wundergroundResponse.json();

jsonToDalleFormmain.tsx2 matches

@weaverwhaleUpdated 8 months ago
141 // Initialize OpenAI here to avoid issues with Deno.env in browser context
142 if (!openai) {
143 const apiKey = Deno.env.get("OPENAI_API_KEY");
144 openai = new OpenAI({ apiKey });
145 }
146

hackerNewsDigestmain.tsx1 match

@yasarcelepUpdated 8 months ago
1// This cron emails Hacker News stories from its API every 3 days.
2
3import { email } from "https://esm.town/v/std/email";

quotableApiProxymain.tsx1 match

@johndturnUpdated 8 months ago
3export default async function proxy(req: Request) {
4 const resp = await fetch(
5 "http://api.quotable.io/quotes/random?limit=1",
6 );
7 const json = await resp.json();

quotableApiProxyREADME.md3 matches

@johndturnUpdated 8 months ago
1# Quotable API Proxy
2
3Small HTTP proxy to the Quotable API (`https://api.quotable.io`).
4
5I built this due to some DNSSEC issues that the Quotable API is currently experiencing.
6
7See this Github issue [here](https://github.com/lukePeavey/quotable/issues/239) for more information.

telegrambotmain.tsx1 match

@begoonUpdated 8 months ago
4const { BOT_TOKEN, ME } = env;
5
6const TELEGRAM = `https://api.telegram.org`;
7const BOT = `${TELEGRAM}/bot${BOT_TOKEN}`;
8

upsetSilverLimpetREADME.md4 matches

@danielchalefUpdated 8 months ago
7## Getting Started
8To run Slack Scout, you’ll need a
9- Browserbase API key
10- Slack Webhook URL: setup [here](https://docs.val.town/integrations/slack/send-messages-to-slack/)
11- Twitter Developer API key
12
13### Browserbase
19### Twitter
20
21We’ve decided to use the Twitter API to include Twitter post results. It costs $100 / month to have a Basic Twitter Developer account. _If you decide to use Browserbase, we can lend our token. Comment below for access._
22
23Once you have the `SLACK_WEBHOOK_URL`, `BROWSERBASE_API_KEY`, and `TWITTER_BEARER_TOKEN`, input all of these as [Val Town Environment Variables](https://www.val.town/settings/environment-variables).
24
25---

upsetSilverLimpetmain.tsx3 matches

@danielchalefUpdated 8 months ago
54 query: topic,
55 pages: 2,
56 apiKey: Deno.env.get("BROWSERBASE_API_KEY") ?? "",
57 });
58}
63 maxResults: 10,
64 daysBack: 1,
65 apiKey: Deno.env.get("TWITTER_BEARER_TOKEN") ?? "",
66 });
67}
98
99 if (!response.ok) {
100 throw new Error(`Slack API error: ${response.status} ${response.statusText}`);
101 }
102

wateryPeachEarwigREADME.md4 matches

@danielchalefUpdated 8 months ago
7## Getting Started
8To run Slack Scout, you’ll need a
9- Browserbase API key
10- Slack Webhook URL: setup [here](https://docs.val.town/integrations/slack/send-messages-to-slack/)
11- Twitter Developer API key
12
13### Browserbase
19### Twitter
20
21We’ve decided to use the Twitter API to include Twitter post results. It costs $100 / month to have a Basic Twitter Developer account. _If you decide to use Browserbase, we can lend our token. Comment below for access._
22
23Once you have the `SLACK_WEBHOOK_URL`, `BROWSERBASE_API_KEY`, and `TWITTER_BEARER_TOKEN`, input all of these as [Val Town Environment Variables](https://www.val.town/settings/environment-variables).
24
25---

wateryPeachEarwigmain.tsx3 matches

@danielchalefUpdated 8 months ago
54 query: topic,
55 pages: 2,
56 apiKey: Deno.env.get("BROWSERBASE_API_KEY") ?? "",
57 });
58}
63 maxResults: 10,
64 daysBack: 1,
65 apiKey: Deno.env.get("TWITTER_BEARER_TOKEN") ?? "",
66 });
67}
98
99 if (!response.ok) {
100 throw new Error(`Slack API error: ${response.status} ${response.statusText}`);
101 }
102

vapi-minutes-db1 file match

@henrywilliamsUpdated 2 days ago

vapi-minutes-db2 file matches

@henrywilliamsUpdated 2 days ago
papimark21
socialdata
Affordable & reliable alternative to Twitter API: ➡️ Access user profiles, tweets, followers & timeline data in real-time ➡️ Monitor profiles with nearly instant alerts for new tweets, follows & profile updates ➡️ Simple integration