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/image-url.jpg%20%22Image%20title%22?q=api&page=999&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 12755 results for "api"(1752ms)

reply_to_slack_messagemain.tsx1 match

@curtcoxUpdated 1 year ago
4 // Note: `body.event` has information about the event like the sender and the message text
5 const text = await f(body);
6 const result = await fetchJSON("https://slack.com/api/chat.postMessage", {
7 headers: { "Authorization": `Bearer ${config.slackToken}` },
8 method: "POST",

val_town_clientmain.tsx3 matches

@pomdtrUpdated 1 year ago
1import { paths } from "https://esm.town/v/pomdtr/openapi_schema";
2import createClient2 from "npm:openapi-fetch";
3
4export default function createClient(options?: {
7}) {
8 return createClient2<paths>({
9 baseUrl: options?.baseUrl ?? "https://api.val.town",
10 headers: options?.token ? { Authorization: `Bearer ${options.token}` } : {},
11 });

aqiREADME.md1 match

@callistusUpdated 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

openAiExamplemain.tsx1 match

@yawnxyzUpdated 1 year ago
59 return c.redirect(`/?response=${encodeURIComponent(generatedResponse)}`);
60 } catch (error) {
61 console.error('OpenAI API error:', error);
62 return c.redirect('/?response=Error%20occurred.');
63 }

stringCodeRunnermain.tsx1 match

@yawnxyzUpdated 1 year ago
9 const payload = await c.req.json();
10 console.log('evaling using:', Deno.env.get('valtown'))
11 const response = await fetchJSON('https://api.val.town/v1/eval', {
12 method: 'POST',
13 body: JSON.stringify(payload),

twitterAlertREADME.md1 match

@aruncUpdated 1 year 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

val_town_client_exampleREADME.md2 matches

@pomdtrUpdated 1 year ago
1# Typed Client for the Val Town API
2
3Automatically generated using [open-api-typescript](https://www.npmjs.com/package/openapi-typescript) and [openapi-fetch](https://www.npmjs.com/package/openapi-fetch).

alchemyClientREADME.md2 matches

@jamiedubsUpdated 1 year ago
1simple wrapper for [Alchemy's blockchain APIs](https://docs.alchemy.com/reference/alchemy-gettokenbalances), for fetching blockchain data. Ethereum, Solana, etc
2
3uses my personal ALCHEMY_API_KEY, I forget if you can use it too or not! get your own if it doesn't work
4
5used by some of my other vals:

ethereumTokenBalancesREADME.md1 match

@jamiedubsUpdated 1 year ago
1fetch token balances from an Ethereum wallet. uses Alchemy. don't abuse my API key or I'll turn this off
2
3Use it like: https://jamiedubs-ethereumtokenbalances.web.val.run/?address=0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045

telegrammain.tsx1 match

@stevekrouseUpdated 1 year ago
25
26async function telegramRequest(path, body, authorization?: string) {
27 const response = await fetch("https://stevekrouse-telegramValTownAPI.web.val.run/" + path, {
28 method: "POST",
29 body: JSON.stringify(body),

vapi-minutes-db1 file match

@henrywilliamsUpdated 22 hours ago

vapi-minutes-db2 file matches

@henrywilliamsUpdated 1 day 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