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/$%7Bart_info.art.src%7D?q=api&page=1467&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 17453 results for "api"(7232ms)

val_town_openapimain.tsx1 match

@pomdtr•Updated 1 year ago
2
3export default async function() {
4 const resp = await blob.get("openapi.yaml")
5
6 return new Response(resp.body, {

reply_to_slack_messagemain.tsx1 match

@curtcox•Updated 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

@pomdtr•Updated 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

@callistus•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

openAiExamplemain.tsx1 match

@yawnxyz•Updated 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

@yawnxyz•Updated 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

@arunc•Updated 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

@pomdtr•Updated 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

@jamiedubs•Updated 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

@jamiedubs•Updated 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

RandomQuoteAPI

@Freelzy•Updated 14 hours ago

HAPI7 file matches

@dIgitalfulus•Updated 20 hours ago
Kapil01
apiv1