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=115&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 13806 results for "api"(2082ms)

TeachREADME.md2 matches

@Problewk•Updated 4 days ago
9 - Detailed facial features with realistic skin, eyes, and hair
10 - Lifelike animations and expressions
11- AI-powered responses using OpenAI's API
12- Interactive chat interface
13- Educational content delivery
34 - Advanced lighting setup for photorealistic rendering
35 - Facial animation system
36- OpenAI API for AI responses
37- Tailwind CSS for styling

doorutils.tsx1 match

@stevekrouse•Updated 4 days ago
31 .toString("base64");
32
33 const response = await fetch(`https://api.switch-bot.com/${path}`, {
34 headers: buildSwitchBotHeaders(),
35 ...args,

doorREADME.md5 matches

@stevekrouse•Updated 4 days ago
9[**Video demo**](https://www.tiktok.com/@stevekrouse/video/7398180191396318497?is_from_webapp=1&sender_device=pc)
10
11### Switchbot API Integration
12
13This Val authenticates to the Switchbot API with `SWITCHBOT_TOKEN` and `SWITCHBOT_KEY` environment variables.
14
15The application uses the Switchbot API to send a "press" command to the device with ID `D2353438164D` (Val Town Ground Floor device).
16
17Learn how to get your own Switchbot API keys here: [Switchbot Docs](https://github.com/OpenWonderLabs/SwitchBotAPI).
18
19### Project Structure
20
21- `main.tsx`: The main application file with Hono routes and UI components
22- `utils.tsx`: Utility functions for Switchbot API authentication and requests
23- `styles.tsx`: CSS styles for the web interface

YouthCareerToolkitREADME.md2 matches

@bolajeee•Updated 4 days ago
12- `PortfolioFormData` - Interface for the form data
13- `ContentType` - Type for the content type options
14- `GenerateRequest` - Interface for the API request
15- `GenerateResponse` - Interface for the API response
16
17## Utilities

YouthCareerToolkitREADME.md1 match

@bolajeee•Updated 4 days ago
191. The user fills out the form with their professional information
202. They select what type of content they want to generate
213. The form data is sent to the backend API
224. The generated content is displayed in the result container
235. The user can copy the content or regenerate it if needed

YouthCareerToolkitindex.html2 matches

@bolajeee•Updated 4 days ago
202
203 try {
204 // Send request to API
205 const response = await fetch('/api/generate', {
206 method: 'POST',
207 headers: {

stockAppViewInventoryView.tsx5 matches

@prashamtrivedi•Updated 4 days ago
3import { useState, useEffect } from "https://esm.sh/preact@10.19.6/hooks";
4import { User, Product, InventoryBatch } from "../../shared/types.ts";
5// import * as apiClient from "../apiClient.ts"; // Will be removed
6
7const API_BASE_URL = "/api";
8
9interface ViewInventoryViewProps {
28 if (searchTerm) queryParams.append("search", searchTerm);
29 const queryString = queryParams.toString();
30 let response = await fetch(`${API_BASE_URL}/products${queryString ? `?${queryString}` : ""}`, {
31 headers: { "Accept": "application/json", "X-User-Id": currentUser.id } // X-User-Id might not be strictly needed by backend for GET products
32 });
42 try {
43 // Direct fetch for total product quantity
44 const qtyResponse = await fetch(`${API_BASE_URL}/inventory/products/${p.id}/total`, {
45 headers: { "Accept": "application/json", "X-User-Id": currentUser.id } // X-User-Id might not be strictly needed
46 });
82 try {
83 // Direct fetch for inventory batches by product
84 const response = await fetch(`${API_BASE_URL}/inventory/batches?productId=${product.id}`, {
85 headers: { "Accept": "application/json", "X-User-Id": currentUser.id } // X-User-Id might not be strictly needed
86 });

stockAppExpiringItemsView.tsx3 matches

@prashamtrivedi•Updated 4 days ago
3import { useState, useEffect } from "https://esm.sh/preact@10.19.6/hooks";
4import { User, InventoryBatch } from "../../shared/types.ts";
5// import * as apiClient from "../apiClient.ts"; // Will be removed
6
7const API_BASE_URL = "/api";
8
9interface ExpiringItemsViewProps {
30 if (filterDays !== undefined) queryParams.append("days", String(filterDays));
31 const queryString = queryParams.toString();
32 const response = await fetch(`${API_BASE_URL}/inventory/expiring${queryString ? `?${queryString}` : ""}`, {
33 headers: { "Accept": "application/json", "X-User-Id": currentUser.id } // X-User-Id might not be strictly needed
34 });

TownieuseUser.tsx1 match

@Ana•Updated 4 days ago
1import { useState, useEffect } from "react";
2
3const USER_ENDPOINT = "/api/user";
4
5export function useUser() {

Townieuser-summary.ts1 match

@Ana•Updated 4 days ago
20 SUM(num_images) as total_images
21 FROM ${USAGE_TABLE}
22 WHERE our_api_token = 1
23 GROUP BY user_id, username
24 ORDER BY total_price DESC

new-val-api-demo

@shouser•Updated 5 hours ago
This is an example of using the API to create a val.

groq-api2 file matches

@cameronpak•Updated 9 hours ago
mux
Your friendly, neighborhood video API.
api