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/?q=api&page=1123&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 14776 results for "api"(3341ms)

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

resyBookSlotmain.tsx3 matches

@vtdocs•Updated 8 months ago
1import { fetch } from "https://esm.town/v/std/fetch";
2import { resyPublicAPIKey } from "https://esm.town/v/vtdocs/resyPublicAPIKey";
3import { sleep } from "https://esm.town/v/vtdocs/sleep";
4
18 while (true) {
19 try {
20 const bookRes = await fetch(`https://api.resy.com/3/book`, {
21 method: "POST",
22 headers: {
23 "authorization": `ResyAPI api_key="${resyPublicAPIKey}"`,
24 "x-resy-auth-token": token,
25 "content-type": "application/x-www-form-urlencoded",

resyGetSlotBookingTokenmain.tsx3 matches

@vtdocs•Updated 8 months ago
1import { fetch } from "https://esm.town/v/std/fetch";
2import { resyPublicAPIKey } from "https://esm.town/v/vtdocs/resyPublicAPIKey";
3
4export const resyGetSlotBookingToken = async (
16 };
17 const detailsRes = await fetch(
18 `https://api.resy.com/3/details?${new URLSearchParams(detailsParams)}`,
19 {
20 "headers": {
21 "authorization": `ResyAPI api_key="${resyPublicAPIKey}"`,
22 "x-resy-auth-token": token,
23 "User-Agent":

resyGetMatchingSlotmain.tsx3 matches

@vtdocs•Updated 8 months ago
1import { fetch } from "https://esm.town/v/std/fetch";
2import { resyPublicAPIKey } from "https://esm.town/v/vtdocs/resyPublicAPIKey";
3
4export const resyGetMatchingSlot = async (
23 const endTime = new Date(`${day} ${end}`);
24 const slotsRes = await fetch(
25 `https://api.resy.com/4/find?lat=0&long=0&day=${day}&party_size=${partySize}&venue_id=${venueId}`,
26 {
27 "headers": {
28 "authorization":
29 `ResyAPI api_key="${resyPublicAPIKey}"`,
30 "x-resy-auth-token": token,
31 "User-Agent":

sqliteExplorerAppREADME.md1 match

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

book-lookup-notion6 file matches

@nucky•Updated 11 hours ago
use google book api to look up bibliographic metadata elements

openai_api_project_Pauline2 file matches

@Paulineseemann•Updated 11 hours ago
rapilot330
Kapil01