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%22Optional%20title%22?q=api&page=135&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 13941 results for "api"(1581ms)

aacourse-generator.ts5 matches

@msdโ€ขUpdated 5 days ago
27 */
28export async function generateCourseStructure(prompt: string): Promise<CourseStructure> {
29 // Check for OpenAI API key
30 const apiKey = Deno.env.get("OPENAI_API_KEY");
31 if (!apiKey) {
32 console.error("OpenAI API key is missing. Please set the OPENAI_API_KEY environment variable in Val Town.");
33 throw new Error("OpenAI API key is missing. Please set the OPENAI_API_KEY environment variable in Val Town.");
34 }
35

satori-syntax-highlighterREADME.md2 matches

@stevekrouseโ€ขUpdated 5 days ago
16โ”‚ โ”œโ”€โ”€ index.ts # Main entry point with Hono setup
17โ”‚ โ””โ”€โ”€ routes/
18โ”‚ โ””โ”€โ”€ highlighter-route.ts # Highlighter API route
19โ”œโ”€โ”€ frontend/
20โ”‚ โ”œโ”€โ”€ components/
37## Usage
38
39Visit the frontend page to customize and generate syntax-highlighted images. The API endpoint is available at `/api/highlighter` with the following parameters:
40
41- `code`: The code to highlight

satori-syntax-highlighterindex.tsx2 matches

@stevekrouseโ€ขUpdated 5 days ago
12});
13
14// API routes
15app.get("/api/highlighter", highlighterHandler);
16
17// Serve static files

satori-syntax-highlighterutils.ts1 match

@stevekrouseโ€ขUpdated 5 days ago
16): string {
17 return (
18 `${baseUrl}/api/highlighter?code=` +
19 encodeURIComponent(code) +
20 '&background=' +

JobChatApptypes.ts2 matches

@cipherโ€ขUpdated 5 days ago
19}
20
21// API response interfaces
22export interface ApiResponse<T> {
23 success: boolean;
24 data?: T;

NPLLMpackage-generator.ts1 match

@wolfโ€ขUpdated 5 days ago
32 * Compiles TypeScript to JavaScript
33 * This is a simple implementation that doesn't use the TypeScript compiler
34 * In a real-world scenario, you would use the TypeScript compiler API
35 */
36export function compileTypeScript(tsCode: string): string {

untitled-860checkCert.tsx2 matches

@jclack2โ€ขUpdated 5 days ago
19 clearTimeout(timeoutId);
20
21 // Unfortunately, the fetch API doesn't give us direct access to the certificate
22 // So we need to use the tls module in Node.js or Deno's TLS APIs
23
24 // For Val Town, we can use Deno's TLS connect function

NPLLMmod.ts2 matches

@wolfโ€ขUpdated 5 days ago
4import { npmPackageRoute } from "./routes/npm-package.ts";
5
6export const apiRoute = new Hono()
7 .route("/search", searchRoute)
8 .route("/package", packageRoute)
9 .route("/npm-package", npmPackageRoute);
10
11export type AppType = typeof apiRoute;
12
5 const host = "www.cdatacloud.net";
6
7 const analyzeRes = await fetch(`https://api.ssllabs.com/api/v3/analyze?host=${host}`);
8 const analyzeJson = await analyzeRes.json();
9
18
19 const endpointRes = await fetch(
20 `https://api.ssllabs.com/api/v3/getEndpointData?host=${host}&ip=${endpoint.ipAddress}`,
21 );
22 const endpointJson = await endpointRes.json();

sa_pro1README.md2 matches

@pro3โ€ขUpdated 5 days ago
24
25- Built on Val Town using TypeScript
26- Uses OpenAI's API for prompt expansion
27- Responsive design with Twind (Tailwind CSS in JS)
28- Error handling for API failures
29
30## Technical Stack

new-val-api-demo

@shouserโ€ขUpdated 21 hours ago
This is an example of using the API to create a val.

groq-api2 file matches

@cameronpakโ€ขUpdated 1 day ago
snartapi
mux
Your friendly, neighborhood video API.