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=652&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 12063 results for "api"(1899ms)

bluesky_bot_templatemain.tsx1 match

@alexweinUpdated 3 months ago
1import process from "node:process";
2import { AppBskyFeedPost, AtpAgent } from "npm:@atproto/api";
3
4const agent = new AtpAgent({

vividCopperWrenREADME.md2 matches

@vishu44Updated 3 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`

vividCopperWrenmain.tsx5 matches

@vishu44Updated 3 months ago
217 } catch (error) {
218 Toastify({
219 text: "We may have hit our Cerebras Usage limits. Try again later or fork this and use your own API key.",
220 position: "center",
221 duration: 3000,
970 };
971 } else {
972 const client = new Cerebras({ apiKey: Deno.env.get("CEREBRAS_API_KEY") });
973 const completion = await client.chat.completions.create({
974 messages: [
1095 <meta name="viewport" content="width=device-width, initial-scale=1.0">
1096 <title>CerebrasCoder</title>
1097 <link rel="preconnect" href="https://fonts.googleapis.com" />
1098 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
1099 <link
1100 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"
1101 rel="stylesheet"
1102 />
1111 <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."">
1112 <meta property="og:type" content="website">
1113 <meta property="og:image" content="https://stevekrouse-blob_admin.web.val.run/api/public/CerebrasCoderOG.jpg">
1114
1115

reverentAquaCuckooREADME.md2 matches

@vishu44Updated 3 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`

reverentAquaCuckoomain.tsx5 matches

@vishu44Updated 3 months ago
217 } catch (error) {
218 Toastify({
219 text: "We may have hit our Cerebras Usage limits. Try again later or fork this and use your own API key.",
220 position: "center",
221 duration: 3000,
970 };
971 } else {
972 const client = new Cerebras({ apiKey: Deno.env.get("CEREBRAS_API_KEY") });
973 const completion = await client.chat.completions.create({
974 messages: [
1095 <meta name="viewport" content="width=device-width, initial-scale=1.0">
1096 <title>CerebrasCoder</title>
1097 <link rel="preconnect" href="https://fonts.googleapis.com" />
1098 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
1099 <link
1100 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"
1101 rel="stylesheet"
1102 />
1111 <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."">
1112 <meta property="og:type" content="website">
1113 <meta property="og:image" content="https://stevekrouse-blob_admin.web.val.run/api/public/CerebrasCoderOG.jpg">
1114
1115

exuberantLimeReindeerREADME.md2 matches

@gunisettigokulUpdated 3 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`

exuberantLimeReindeermain.tsx5 matches

@gunisettigokulUpdated 3 months ago
217 } catch (error) {
218 Toastify({
219 text: "We may have hit our Cerebras Usage limits. Try again later or fork this and use your own API key.",
220 position: "center",
221 duration: 3000,
970 };
971 } else {
972 const client = new Cerebras({ apiKey: Deno.env.get("CEREBRAS_API_KEY") });
973 const completion = await client.chat.completions.create({
974 messages: [
1095 <meta name="viewport" content="width=device-width, initial-scale=1.0">
1096 <title>CerebrasCoder</title>
1097 <link rel="preconnect" href="https://fonts.googleapis.com" />
1098 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
1099 <link
1100 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"
1101 rel="stylesheet"
1102 />
1111 <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."">
1112 <meta property="og:type" content="website">
1113 <meta property="og:image" content="https://stevekrouse-blob_admin.web.val.run/api/public/CerebrasCoderOG.jpg">
1114
1115

cerebras_coderREADME.md2 matches

@gunisettigokulUpdated 3 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`

cerebras_codermain.tsx5 matches

@gunisettigokulUpdated 3 months ago
217 } catch (error) {
218 Toastify({
219 text: "We may have hit our Cerebras Usage limits. Try again later or fork this and use your own API key.",
220 position: "center",
221 duration: 3000,
970 };
971 } else {
972 const client = new Cerebras({ apiKey: Deno.env.get("CEREBRAS_API_KEY") });
973 const completion = await client.chat.completions.create({
974 messages: [
1095 <meta name="viewport" content="width=device-width, initial-scale=1.0">
1096 <title>CerebrasCoder</title>
1097 <link rel="preconnect" href="https://fonts.googleapis.com" />
1098 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
1099 <link
1100 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"
1101 rel="stylesheet"
1102 />
1111 <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."">
1112 <meta property="og:type" content="website">
1113 <meta property="og:image" content="https://stevekrouse-blob_admin.web.val.run/api/public/CerebrasCoderOG.jpg">
1114
1115

rm_ios_testmain.tsx15 matches

@arfanUpdated 3 months ago
255 `);
256
257 // GET /api/apps => return all apps
258 if (request.method === "GET" && request.url.endsWith("/api/apps")) {
259 const result = await sqlite.execute(`SELECT * FROM ${KEY}_apps`);
260 return new Response(JSON.stringify({ apps: result.rows }), {
262 });
263 }
264 // POST /api/apps => create new app
265 else if (request.method === "POST" && request.url.endsWith("/api/apps")) {
266 const app = await request.json();
267 const id = crypto.randomUUID();
274 });
275 }
276 // PUT /api/apps => update existing app
277 else if (request.method === "PUT" && request.url.endsWith("/api/apps")) {
278 const app = await request.json();
279 await sqlite.execute(
285 });
286 }
287 // DELETE /api/apps/:id => delete an app
288 else if (request.method === "DELETE" && /\/api\/apps\/[^/]+$/.test(request.url)) {
289 const segments = request.url.split("/");
290 const id = segments[segments.length - 1];
294 });
295 }
296 // POST /api/apps/import => bulk import (skip duplicates by name)
297 else if (request.method === "POST" && request.url.endsWith("/api/apps/import")) {
298 const { apps } = await request.json();
299 const existing = await sqlite.execute(`SELECT name FROM ${KEY}_apps`);
575 // Get all apps, build categories
576 const loadApps = async () => {
577 const response = await fetch("/api/apps");
578 const data = await response.json();
579 setApps(data.apps);
603 const handleSave = async (updatedApp: App) => {
604 const method = updatedApp.id ? "PUT" : "POST";
605 await fetch("/api/apps", {
606 method,
607 headers: { "Content-Type": "application/json" },
614 const handleDelete = async (id: string) => {
615 if (!window.confirm("Are you sure you want to delete this app?")) return;
616 const resp = await fetch(`/api/apps/${id}`, { method: "DELETE" });
617 if (resp.ok) {
618 await loadApps();
631 // Export
632 const handleExportApps = async () => {
633 const response = await fetch("/api/apps");
634 const data = await response.json();
635 const jsonStr = JSON.stringify(data.apps, null, 2);
652 const text = await file.text();
653 const importedApps = JSON.parse(text);
654 await fetch("/api/apps/import", {
655 method: "POST",
656 headers: { "Content-Type": "application/json" },

social_data_api_project3 file matches

@tsuchi_yaUpdated 1 day ago

simple-scrabble-api1 file match

@bryUpdated 4 days ago
papimark21
socialdata
Affordable & reliable alternative to Twitter API: ➡️ Access user profiles, tweets, followers & timeline data in real-time ➡️ Monitor profiles with nearly instant alerts for new tweets, follows & profile updates ➡️ Simple integration