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=580&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 10642 results for "api"(821ms)

cerebras_coderREADME.md2 matches

@danielamah•Updated 4 months ago
6
71. Sign up for [Cerebras](https://cloud.cerebras.ai/)
82. Get a Cerebras API Key
93. Save it in a [Val Town environment variable](https://www.val.town/settings/environment-variables) called `CEREBRAS_API_KEY`
10
11# Todos

cerebras_codermain.tsx5 matches

@danielamah•Updated 4 months ago
212 } catch (error) {
213 Toastify({
214 text: "We may have hit our Cerebras Usage limits. Try again later or fork this and use your own API key.",
215 position: "center",
216 duration: 3000,
1024 };
1025 } else {
1026 const client = new Cerebras({ apiKey: Deno.env.get("CEREBRAS_API_KEY") });
1027 const completion = await client.chat.completions.create({
1028 messages: [
1149 <meta name="viewport" content="width=device-width, initial-scale=1.0">
1150 <title>CerebrasCoder</title>
1151 <link rel="preconnect" href="https://fonts.googleapis.com" />
1152 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
1153 <link
1154 href="https://fonts.googleapis.com/css2?family=DM+Mono:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500&family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap"
1155 rel="stylesheet"
1156 />
1165 <meta property="og:description" content="Turn your ideas into fully functional apps in less than a second – powered by Llama3.3-70b on Cerebras's super-fast wafer chips. Code is 100% open-source, hosted on Val Town."">
1166 <meta property="og:type" content="website">
1167 <meta property="og:image" content="https://stevekrouse-blob_admin.web.val.run/api/public/CerebrasCoderOG.jpg">
1168
1169

lastfm_exporter_dbmain.tsx5 matches

@archit•Updated 4 months ago
8 // Replace with your Last.fm username
9 const USERNAME = "architkhode";
10 const API_KEY = Deno.env.get("LASTFM_API_KEY");
11
12 if (!API_KEY) {
13 console.error("Last.fm API key not configured");
14 return;
15 }
32 // Fetch last played track
33 const lastfmResponse = await fetch(
34 `http://ws.audioscrobbler.com/2.0/?method=user.getrecenttracks&user=${USERNAME}&api_key=${API_KEY}&format=json&limit=1`,
35 );
36
38
39 // Log the entire response data for debugging
40 console.log("LastFM API Response:", JSON.stringify(data, null, 2));
41
42 // Extract last played track details

lastfm_exporter_dbREADME.md1 match

@archit•Updated 4 months ago
1A cron Val that fetches a LastFM user's recently played track and stores it in sqlite.
2
3Requires a LastFM API key store in the env vars.

labLoginGetUsersmain.tsx1 match

@svenlaa•Updated 4 months ago
2import { sqlite } from "https://esm.town/v/std/sqlite";
3export default async function(req: Request): Promise<Response> {
4 const res = await fetch("https://api.svenlaa.com/logiverse/logs");
5 const data = await res.json();
6 const ts = new Date().getTime();

STARTER_PROMPTSmain.tsx1 match

@silviudx•Updated 4 months ago
12 },
13 {
14 prompt: "weather dashboard for nyc using open-meteo API for NYC with icons",
15 title: "Weather App",
16 code:

cerebras_coderREADME.md2 matches

@cguilarte•Updated 4 months ago
6
71. Sign up for [Cerebras](https://cloud.cerebras.ai/)
82. Get a Cerebras API Key
93. Save it in a [Val Town environment variable](https://www.val.town/settings/environment-variables) called `CEREBRAS_API_KEY`
10
11# Todos

cerebras_codermain.tsx5 matches

@cguilarte•Updated 4 months ago
212 } catch (error) {
213 Toastify({
214 text: "We may have hit our Cerebras Usage limits. Try again later or fork this and use your own API key.",
215 position: "center",
216 duration: 3000,
1024 };
1025 } else {
1026 const client = new Cerebras({ apiKey: Deno.env.get("CEREBRAS_API_KEY") });
1027 const completion = await client.chat.completions.create({
1028 messages: [
1149 <meta name="viewport" content="width=device-width, initial-scale=1.0">
1150 <title>CerebrasCoder</title>
1151 <link rel="preconnect" href="https://fonts.googleapis.com" />
1152 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
1153 <link
1154 href="https://fonts.googleapis.com/css2?family=DM+Mono:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500&family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap"
1155 rel="stylesheet"
1156 />
1165 <meta property="og:description" content="Turn your ideas into fully functional apps in less than a second – powered by Llama3.3-70b on Cerebras's super-fast wafer chips. Code is 100% open-source, hosted on Val Town."">
1166 <meta property="og:type" content="website">
1167 <meta property="og:image" content="https://stevekrouse-blob_admin.web.val.run/api/public/CerebrasCoderOG.jpg">
1168
1169

checkTomorrowTempoEdfREADME.md1 match

@dotim•Updated 4 months ago
1Ce script permet de vérifier le statut du jour Tempo de demain (Bleu, Blanc ou Rouge) en utilisant l'API publique Couleur Tempo. S'il détecte un jour Rouge ou blanc, il envoie une notification pour avertir l'utilisateur. En cas d'erreur lors de la récupération des données, une notification d'erreur est également envoyée.
2
3Migrated from folder: automations/checkTomorrowTempoEdf

gemini_codermain.tsx2 matches

@awhitter•Updated 4 months ago
125 setLoading(true);
126 try {
127 const res = await fetch("/api/generate", {
128 method: "POST",
129 body: JSON.stringify({ prompt }),
187 const SCHEMA_VERSION = 1;
188
189 if (req.method === "POST" && new URL(req.url).pathname === "/api/generate") {
190 try {
191 const { prompt } = await req.json();

daily-advice-app1 file match

@dcm31•Updated 1 day ago
Random advice app using Advice Slip API

gptApiTemplate1 file match

@charmaine•Updated 2 days ago
apiv1
papimark21