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/$%7Bsuccess?q=api&page=998&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 20581 results for "api"(8610ms)

ProtoRunsApp.tsx1 match

@nbbaier•Updated 2 months ago
4import { RunForm } from "./RunForm.tsx";
5import { SignIn } from "./SignIn.tsx";
6import { AtUri } from "https://esm.sh/@atproto/api@0.15.5"
7
8type RunsResponse = {

ProtoRunsindex.tsx1 match

@wilhelm•Updated 2 months ago
3import { App } from "./components/App.tsx";
4import { BrowserOAuthClient, OAuthSession } from "https://esm.sh/@atproto/oauth-client-browser@0.3.15"
5import { Agent } from "https://esm.sh/@atproto/api@0.15.5"
6import { getClientMetadata } from "../shared/client_metadata.ts";
7import { ATProtoContext } from "./context.ts";

rotrankmain.tsx10 matches

@dcm31•Updated 2 months ago
59 let gd = dg;
60 try {
61 const gr = await fetch("/api/characters");
62 if (gr.ok) {
63 const fg = await gr.json();
70 let pd = dp;
71 try {
72 const pr = await fetch(`/api/personal-characters?userId=${userId}`);
73 if (pr.ok) {
74 const fp = await pr.json();
156 setPersonalCharacters(updatedPersonalChars);
157
158 // 6. Now proceed with API calls, using the calculated data
159 try {
160 console.log("Attempting to save rankings...");
161
162 const globalUpdate = fetch("/api/update-rankings", {
163 method: "POST",
164 headers: { "Content-Type": "application/json" },
166 body: JSON.stringify(updatedGlobalChars),
167 });
168 const personalUpdate = fetch("/api/update-personal-rankings", {
169 method: "POST",
170 headers: { "Content-Type": "application/json" },
438 }
439 };
440 if (url.pathname === "/api/characters" && req.method === "GET") {
441 const dc = [...defaultCharactersDefinition.map(c => ({ ...c }))];
442 const d = await getBlobJson("rotrank_characters", dc);
445 });
446 }
447 if (url.pathname === "/api/personal-characters" && req.method === "GET") {
448 const uid = url.searchParams.get("userId");
449 if (!uid)
458 });
459 }
460 if (url.pathname === "/api/update-rankings" && req.method === "POST") {
461 try {
462 const d = await req.json();
472 }
473 }
474 if (url.pathname === "/api/update-personal-rankings" && req.method === "POST") {
475 try {
476 const d = await req.json();
491 const scriptSrc = typeof import.meta !== "undefined" && import.meta.url ? `"${import.meta.url}"` : "\"./app.js\"";
492 const html =
493 `<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>RotRank</title><script src="https://cdn.tailwindcss.com"></script><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&family=Fredoka+One&display=swap" rel="stylesheet"><style>body{font-family:'Inter',system-ui,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}h1,h2,h3,.font-fredoka{font-family:'Fredoka One',cursive}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:#111827}::-webkit-scrollbar-thumb{background:#4f46e5;border-radius:4px}::-webkit-scrollbar-thumb:hover{background:#4338ca}.bg-gray-750{background-color:#3f4a5a}tailwind.config={theme:{extend:{colors:{'gray-750':'#3f4a5a'},fontFamily:{sans:['Inter','system-ui','sans-serif'],fredoka:['Fredoka One','cursive']}}}}</style></head><body class="bg-gray-900 text-white"><div id="root"><div class="flex items-center justify-center min-h-screen"><div class="text-center"><div class="animate-spin rounded-full h-16 w-16 border-t-2 border-b-2 border-pink-500 mx-auto mb-4"></div><h2 class="text-xl font-bold font-fredoka">Loading...</h2></div></div></div><script type="module">try{await import(${scriptSrc});}catch(e){console.error('Script load fail:',e);const r=document.getElementById('root');if(r)r.innerHTML='<p class="text-center text-red-500 p-8">Error loading app.</p>';}</script></body></html>`;
494 return new Response(html, { headers: { "Content-Type": "text/html" } });
495 } catch (e) {

ProtoRunscontext.ts1 match

@wilhelm•Updated 2 months ago
4 OAuthSession,
5} from "https://esm.sh/@atproto/oauth-client-browser@0.3.15";
6import { Agent } from "https://esm.sh/@atproto/api@0.15.5";
7
8export const ATProtoContext = createContext<{

rotrankcharacters.ts3 matches

@dcm31•Updated 2 months ago
50 },
51 {
52 "name": "Brr Brr Patapim",
53 "image_urls": [
54 "https://i.namu.wiki/i/7YoYRrE4zFdgRoaTvFzbY-rv7ELyxC83ePlyHc5RQulvgLVBCDe9ew5cSUxpEv3xlwFwwYRpkDYOfndIhbUwvw0ze3wrhLSUoh69lgRYPAwVZMH1L7Yj5NvEohsKaj8R4LjD_CuVnGa-duY0zutRpw.webp",
101 "name": "U Din Din Din Din Dun Ma Din Din Din Dun",
102 "image_urls": [
103 "https://i.namu.wiki/i/3DKk-5b7GavdmPJJzcp3n7QktZwPhhA4fEWs18GJKif8J8E4_l9ET_qSRRidUeFos0VTRWnPG4Vq1wHhbigKrRfxhxWfIo0Os84QjfzLvPd5i8x_yeZH8nJVyeXMR_TxeIXaPiwyCwpQ1fXY4_jp7w.webp",
104 "https://i.namu.wiki/i/SYFee6y61S8CA4aw8Ai8FWo14yJk-mxi6MsMmhte6hrqK12cjAz_3PMhBsNcUvDJC8rUCd0v4B6sW47Iq4ZUmxpF5t2QdnmnG4ieZOwKB9IELz502PHihBj63tYF57nmVdBNyS_7UeAhmBzmjQqSCA.webp",
105 ],
186 "name": "Chef Crabracadabra",
187 "image_urls": [
188 "https://i.namu.wiki/i/HKFo053Z6-f9GHTKSZp021rNoOn8DpBlCT7LkFv1_mY1BTxapIkWSUQJIzu-WC_yCuHz5Y6-9baK99P5fG7zC-nqJf5iF_t-WErxMAILl79C4QitHxTgMUNobhAGeUeNGp12wN2y3IjPf9NpjecTQw.webp",
189 ],
190 },

rotrankREADME.md1 match

@dcm31•Updated 2 months ago
13- **Tung Tung Tung Sahur**: An anthropomorphic wooden figure wielding a baseball bat
14- **Lirilì Larilà**: A cactus elephant wandering the desert with flippers
15- **Brr Brr Patapim**: A fantastical creature, half baboon and half bush
16- **Chimpanzini Bananini**: A hybrid of a chimpanzee and a banana
17- **Bombombini Gusini**: A goose hybridized with a fighter jet

brainrot_image_genmain.tsx5 matches

@dcm31•Updated 2 months ago
56 },
57 {
58 id: "brr-brr-patapim",
59 name: "Br Br Patapim",
60 description: "A fantastical creature, half baboon and half bush, with exaggerated features like big feet and a ham-shaped nose.",
61 prompt: "A surreal, low-poly 3D render of a bizarre creature that's half baboon, half bush or forest. It has a primate upper body emerging from or merged with plant elements, exaggerated big feet, and a comically large nose. Absurd Italian brainrot meme aesthetic.",
102 try {
103 const fal = createFalClient({
104 proxyUrl: "/api/fal/proxy",
105 });
106
324
325 // Handle FAL proxy requests
326 if (url.pathname === "/api/fal/proxy") {
327 return falProxyRequest(req);
328 }
338 <script src="https://cdn.tailwindcss.com"></script>
339 <style>
340 @import url('https://fonts.googleapis.com/css2?family=Fredoka+One&display=swap');
341
342 body {

ItalianBrainRotGeneratormain.tsx4 matches

@dcm31•Updated 2 months ago
35 try {
36 const fal = createFalClient({
37 proxyUrl: "/api/fal/proxy",
38 });
39
1371. Animal-object hybrids (like "Bombardiro Crocodilo" - a crocodile bomber plane)
1382. Animals with unusual footwear or clothing items
1393. Creatures with strange body part combinations (like "Brr Brr Patapim" - a monkey with a forest for a body)
1404. Technological-organic fusions (like "Hotspot Bro" - a skeleton with smartphone and Wi-Fi)
1415. Food-animal hybrids (like "Chimpanzini Bananini" - a banana-monkey hybrid)
241 }
242
243 if (url.pathname === "/api/fal/proxy") {
244 return falProxyRequest(req);
245 }
255 <title>Italian Brain Rot Character Generator</title>
256 <script src="https://cdn.tailwindcss.com"></script>
257 <link href="https://fonts.googleapis.com/css2?family=Fredoka+One&display=swap" rel="stylesheet">
258 <style>
259 body {

githubNotificationmain.tsx1 match

@stevekrouse•Updated 2 months ago
5 let events = (
6 await fetchJSON(
7 "https://api.github.com/users/worrydream/events",
8 ) || []
9 )?.filter((e) => new Date(e.created_at) > new Date(lastRunAt));

MyStevenspopulateDemo.ts1 match

@billogiovanni•Updated 2 months ago
7import "https://deno.land/std@0.224.0/dotenv/load.ts";
8
9console.log("THIS IS THE VALTOWN API: ${Deno.env.get("valtown")}")
10
11// Create the memories_demo table

claude-api1 file match

@ziyanwould•Updated 1 day ago

api-workshop

@danarddanielsjr•Updated 2 days ago
replicate
Run AI with an API
fiberplane
Purveyors of Hono tooling, API Playground enthusiasts, and creators of 🪿 HONC 🪿 (https://honc.dev)