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/image-url.jpg%20%22Image%20title%22?q=api&page=978&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 13140 results for "api"(1489ms)

townGenmain.tsx15 matches

@cofsana•Updated 8 months ago
1/**
2 * This val creates a website called TownGen that generates optimized prompts for Hono and Deno based on user input.
3 * It uses a simulated API for Hono and Deno features and incorporates a loading animation.
4 * The prompt is tested and debugged using a simulated API before presenting to the user.
5 * It includes a pill box multi-select for enhanced features from npm packages, organized into categories.
6 * A large submit button and a 10-second animation are added when generating the prompt.
16import { createRoot } from "https://esm.sh/react-dom/client";
17
18// Simulated API for Hono and Deno features
19const features = {
20 hono: [
34 "Built-in testing",
35 "Permissions system",
36 "Web standard APIs",
37 ],
38};
45 backend: {
46 icon: "🖧",
47 items: ["GraphQL", "RESTful API", "WebSockets", "gRPC", "Microservices", "Serverless", "Event-driven"],
48 },
49 database: {
201 content: [
202 "contentful",
203 "strapi",
204 "ghost",
205 "markdown-it",
262 "Add splash page",
263 "Add excessive emojis",
264 "Use Web Storage API for local data",
265 "Add a cookie consent banner",
266 "Implement a progress bar for long forms",
3043. Leverage Deno capabilities:
305 ${features.deno.map(feature => `- ${feature}`).join("\n ")}
3064. Implement RESTful API endpoints
3075. Add error handling and logging
3086. Include unit tests using Deno's built-in testing framework
318Please generate TypeScript code for a Hono application running on Deno that implements these features.`;
319
320 // Simulated API call for testing and debugging
321 const debuggedPrompt = await simulateDebugAPI(generatedPrompt);
322
323 setPrompt(debuggedPrompt);
333 "Add database integration",
334 "Implement authentication system",
335 "Set up API endpoints",
336 "Add error handling and logging",
337 "Implement unit tests",
347 "User authentication and authorization",
348 "Data persistence and retrieval",
349 "API integration",
350 "Error handling and logging",
351 "Performance optimization",
359 };
360
361 const simulateDebugAPI = async (prompt: string) => {
362 // Simulated API call for testing and debugging
363 await new Promise(resolve => setTimeout(resolve, 2000));
364 return prompt + "\n\nNote: This prompt has been tested and debugged for Hono and Deno compatibility.";
533 <meta name="viewport" content="width=device-width, initial-scale=1.0">
534 <title>TownGen - Val Generator</title>
535 <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap" rel="stylesheet">
536 <style>${css}</style>
537 </head>

townGenmain.tsx15 matches

@all•Updated 8 months ago
1/**
2 * This val creates a website called TownGen that generates optimized prompts for Hono and Deno based on user input.
3 * It uses a simulated API for Hono and Deno features and incorporates a loading animation.
4 * The prompt is tested and debugged using a simulated API before presenting to the user.
5 * It includes a pill box multi-select for enhanced features from npm packages, organized into categories.
6 * A large submit button and a 10-second animation are added when generating the prompt.
16import { createRoot } from "https://esm.sh/react-dom/client";
17
18// Simulated API for Hono and Deno features
19const features = {
20 hono: [
34 "Built-in testing",
35 "Permissions system",
36 "Web standard APIs",
37 ],
38};
45 backend: {
46 icon: "🖧",
47 items: ["GraphQL", "RESTful API", "WebSockets", "gRPC", "Microservices", "Serverless", "Event-driven"],
48 },
49 database: {
201 content: [
202 "contentful",
203 "strapi",
204 "ghost",
205 "markdown-it",
262 "Add splash page",
263 "Add excessive emojis",
264 "Use Web Storage API for local data",
265 "Add a cookie consent banner",
266 "Implement a progress bar for long forms",
3043. Leverage Deno capabilities:
305 ${features.deno.map(feature => `- ${feature}`).join("\n ")}
3064. Implement RESTful API endpoints
3075. Add error handling and logging
3086. Include unit tests using Deno's built-in testing framework
318Please generate TypeScript code for a Hono application running on Deno that implements these features.`;
319
320 // Simulated API call for testing and debugging
321 const debuggedPrompt = await simulateDebugAPI(generatedPrompt);
322
323 setPrompt(debuggedPrompt);
333 "Add database integration",
334 "Implement authentication system",
335 "Set up API endpoints",
336 "Add error handling and logging",
337 "Implement unit tests",
347 "User authentication and authorization",
348 "Data persistence and retrieval",
349 "API integration",
350 "Error handling and logging",
351 "Performance optimization",
359 };
360
361 const simulateDebugAPI = async (prompt: string) => {
362 // Simulated API call for testing and debugging
363 await new Promise(resolve => setTimeout(resolve, 2000));
364 return prompt + "\n\nNote: This prompt has been tested and debugged for Hono and Deno compatibility.";
533 <meta name="viewport" content="width=device-width, initial-scale=1.0">
534 <title>TownGen - Val Generator</title>
535 <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap" rel="stylesheet">
536 <style>${css}</style>
537 </head>

promptGenmain.tsx2 matches

@all•Updated 8 months ago
1/**
2 * This val creates a website that generates optimized prompts for Val Town based on user input.
3 * It uses the OpenAI API to generate prompts and incorporates a loading animation.
4 * The generated prompt is tailored to Val Town's specific features and best practices.
5 */
18 "TypeScript support",
19 "Deno runtime",
20 "Web APIs",
21];
22

valleBlogV0README.md1 match

@roadlabs•Updated 8 months ago
1* Fork this val to your own profile.
2* Create a [Val Town API token](https://www.val.town/settings/api), open the browser preview of this val, and use the API token as the password to log in.
3

valleBlogV0main.tsx1 match

@roadlabs•Updated 8 months ago
38 model: openai("gpt-4o", {
39 baseURL: "https://std-openaiproxy.web.val.run/v1",
40 apiKey: Deno.env.get("valtown"),
41 } as any),
42 messages: [

postmanClonemain.tsx2 matches

@maxm•Updated 8 months ago
1/**
2 * This val creates a Postman-like interface for testing HTTP requests directly in the browser.
3 * It uses React for the UI and the Fetch API to make requests.
4 * The server function serves the HTML and handles the API requests.
5 */
6

niceTodoListmain.tsx2 matches

@maxm•Updated 8 months ago
1/**
2 * This is a minimalist to-do list app using server-side rendering without any client-side JavaScript.
3 * It uses Val Town's SQLite for data persistence, Deno's standard library for HTML escaping,
4 * and custom SVG icons for a cohesive design.
5 */
84 <meta name="viewport" content="width=device-width, initial-scale=1.0">
85 <title>To Do List</title>
86 <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap" rel="stylesheet">
87 <style>
88 body {

blob_adminREADME.md1 match

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

getContentFromUrlmain.tsx5 matches

@yawnxyz•Updated 8 months ago
67
68export const getFirecrawlContent = async (url, opts = {}) => {
69 const apiKey = Deno.env.get("FIRECRAWL_API_KEY");
70 if (!apiKey) {
71 throw new Error("API key not found. Please set FIRECRAWL_API_KEY in your environment.");
72 }
73
97
98 try {
99 const response = await fetch("https://api.firecrawl.dev/v0/scrape", {
100 method: 'POST',
101 headers: {
102 "Authorization": `Bearer ${apiKey}`,
103 "Content-Type": "application/json"
104 },

czarkowyEdytorDatmain.tsx2 matches

@hasparus•Updated 8 months ago
2 * This app allows users to drop an image onto the canvas, add text to it, move the text around,
3 * edit the text directly on the canvas, and save the result to their local disk.
4 * We'll use the HTML5 Canvas API for image manipulation and the File System Access API for saving files.
5 * The app is styled with a playful and colorful design, using the Caveat font for a handwritten feel.
6 */
191 <head>
192 <title>CZARKOWY EDYTOR DAT NA OBRAZKACH</title>
193 <link href="https://fonts.googleapis.com/css2?family=Caveat&display=swap" rel="stylesheet">
194 <style>${css}</style>
195 </head>

vapi-minutes-db1 file match

@henrywilliams•Updated 2 days ago

vapi-minutes-db2 file matches

@henrywilliams•Updated 2 days ago
artivilla
founder @outapint.io vibe coding on val.town. dm me to build custom vals: https://artivilla.com
mux
Your friendly, neighborhood video API.