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=1396&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 17515 results for "api"(6930ms)

sqliteExplorerAppREADME.md1 match

@teamgroove•Updated 8 months ago
13## Authentication
14
15Login to your SQLite Explorer with [password authentication](https://www.val.town/v/pomdtr/password_auth) with your [Val Town API Token](https://www.val.town/settings/api) as the password.
16
17## Todos / Plans

sqliteExplorerAppmain.tsx2 matches

@teamgroove•Updated 8 months ago
27 <head>
28 <title>SQLite Explorer</title>
29 <link rel="preconnect" href="https://fonts.googleapis.com" />
30
31 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
32 <link
33 href="https://fonts.googleapis.com/css2?family=Fira+Code:wght@300..700&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap"
34 rel="stylesheet"
35 />

aiTextEditormain.tsx4 matches

@sharanbabu•Updated 8 months ago
2 * This val creates a text editing tool using the Cerebras Llama 70B model.
3 * It includes a command input field with speech-to-text functionality, a collapsible additional context area,
4 * and a rich text editor. The user's command, additional context, and current text are sent to the Cerebras API,
5 * which returns the modified text to be displayed in the editor.
6 * We use React for the UI, the Web Speech API for speech recognition, and the Cerebras API for text processing.
7 */
8
14 const Cerebras = (await import("https://esm.sh/@cerebras/cerebras_cloud_sdk")).default;
15 const client = new Cerebras({
16 apiKey: Deno.env.get("CEREBRAS_API_KEY"),
17 });
18
46 });
47 } catch (error) {
48 console.error("Cerebras API Error:", error);
49 return new Response(JSON.stringify({ error: "Failed to process text" }), {
50 status: 500,

slackScoutREADME.md4 matches

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

slackScoutmain.tsx3 matches

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

smsjournalertextrelaymain.tsx6 matches

@cephalization•Updated 8 months ago
1/**
2 * This val creates a webhook endpoint that receives text messages and sends SMS replies using the TextBelt API.
3 * It uses blob storage to keep track of message history and conversation state.
4 * The TextBelt API is used for sending SMS messages without requiring an API key.
5 * The conversation history is stored as an array of message objects containing sender, content, date, and phone number.
6 * OpenAI's GPT-4 is used to generate contextual responses based on the conversation history.
19// This is the secret shared with the registration app in order to register users
20const sharedSecret = Deno.env.get("smsjournalersecret");
21// This is the key for the TextBelt API
22const textbeltKey = Deno.env.get("textbeltkey");
23
35// this is implemented per the textbelt docs but i cant verify the sig...
36function validateTextbeltRequestSignature(
37 apiKey: string,
38 timestamp: string,
39 requestSignature: string,
40 requestPayload: string,
41) {
42 const mySignature = createHmac("sha256", apiKey)
43 .update(
44 timestamp + requestPayload,
52}
53
54// Helper function to send SMS using TextBelt API
55async function sendSMS(phone: string, message: string) {
56 const response = await fetch("https://textbelt.com/text", {

blob_adminREADME.md1 match

@davisshaver•Updated 8 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

finalScrapermain.tsx7 matches

@rochambeau314•Updated 8 months ago
1// This val creates a form to input a Zillow or Craigslist link, determines the link type,
2// calls the appropriate scraping API, and renders the results in a table.
3// It uses React for the UI, fetch for API calls, and basic string manipulation for link validation.
4
5/** @jsxImportSource https://esm.sh/react */
92 if (request.method === "POST" && new URL(request.url).pathname === "/scrape") {
93 const { link } = await request.json();
94 let scrapingEndpoint;
95
96 if (link.includes("zillow.com")) {
97 scrapingEndpoint = "https://rochambeau314-scrapezillowapi.web.val.run?url=";
98 } else if (link.includes("craigslist.org")) {
99 scrapingEndpoint = "https://rochambeau314-scrapecraigslistapi.web.val.run?url=";
100 } else {
101 return new Response(JSON.stringify({ error: "Invalid link. Please provide a Zillow or Craigslist link." }), {
106
107 try {
108 const scrapeResponse = await fetch(`${scrapingEndpoint}${encodeURIComponent(link)}`);
109 if (!scrapeResponse.ok) {
110 throw new Error("Failed to scrape data");
113
114 // Calculate transit time
115 const transitResponse = await fetch(`https://rochambeau314-calculatetransitapi.web.val.run?address=${encodeURIComponent(scrapeResult.address)}`);
116 if (!transitResponse.ok) {
117 throw new Error("Failed to calculate transit time");

browserbaseUtilsmain.tsx2 matches

@browserbase•Updated 8 months ago
7export async function loadPageContent(url: string, options: LoadPageContentOptions = { textContent: false }) {
8 const browser = await puppeteer.connect({
9 browserWSEndpoint: `wss://connect.browserbase.com?apiKey=${Deno.env.get("BROWSERBASE_API_KEY")}`,
10 });
11
35export async function screenshotPage(url: string, options: ScreenshotPageOptions = { fullPage: true }) {
36 const browser = await puppeteer.connect({
37 browserWSEndpoint: `wss://connect.browserbase.com?apiKey=${Deno.env.get("BROWSERBASE_API_KEY")}`,
38 });
39

browserbasePuppeteerExamplemain.tsx1 match

@browserbase•Updated 8 months ago
2
3const browser = await puppeteer.connect({
4 browserWSEndpoint: `wss://connect.browserbase.com?apiKey=${Deno.env.get("BROWSERBASE_API_KEY")}`,
5});
6

RandomQuoteAPI

@Freelzy•Updated 18 hours ago

HAPI7 file matches

@dIgitalfulus•Updated 23 hours ago
Kapil01
apiv1