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=1&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 20501 results for "api"(4403ms)

claude-apimain.tsx4 matches

@ziyanwould•Updated 38 mins ago
4 const url = new URL(req.url);
5
6 // Change the host to 'api.x.ai'
7 url.host = "api.anthropic.com";
8
9 // Create a new request object with the modified URL
21 newRequest.headers.delete("cf-connecting-ip");
22
23 // Forward the modified request to api.x.ai
24 const response = await fetch(newRequest);
25
26 // Return the response from api.x.ai
27 return response;
28 } catch (error) {

blorpmain.tsx6 matches

@join•Updated 40 mins ago
87 - If the user asks to "show off" or "show your skills", you MUST use the special pre-canned "show-off" animation.
883. **Expressive Animation is Key - THE FINAL POLISH:**
89 - **Detailed & Fluid Mouth Sync:** This is critical. You must generate highly detailed and rapid mouth movements to match the spoken text.
90 - **Phonetic Mapping**: Break words down into their core sounds and map them to the available visemes: 'a' (for ah, cat), 'o' (for oh, food), 'e' (for see, me), 'f' (for f, v), 's' (for s, sh, ch), and 'm' (for m, b, p, and silent pauses).
91 - **Use 'm' for Pauses**: Use the 'm' viseme as the default closed-mouth state. Insert very short \`M:m@<ms>\` commands between words and even syllables to simulate natural speech breaks. This is the most important rule for creating realistic animation.
117 <title>AI Friend - Blorp</title>
118 <script src="https://cdn.tailwindcss.com"></script>
119 <link rel="preconnect" href="https://fonts.googleapis.com">
120 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
121 <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;700&family=Space+Mono&display=swap" rel="stylesheet">
122 <style>
123 :root {
343 const canvas = document.getElementById('particle-canvas');
344 const ctx = canvas.getContext('2d');
345 const API_URL = '${sourceUrl}';
346
347 let mouse = { x: 0, y: 0 };
558 resetIdleTimer(); setTypingIndicator(true);
559 try {
560 const response = await fetch(API_URL, {
561 method: 'POST',
562 headers: { 'Content-Type': 'application/json' },
563 body: JSON.stringify({ message: userInput, history: conversationHistory }),
564 });
565 if (!response.ok) throw new Error(\`API Error: \${response.statusText}\`);
566 const data = await response.json();
567 conversationHistory.push({ role: 'user', content: userInput }, { role: 'assistant', content: JSON.stringify(data) });

create-safehash-serversql.ts2 matches

@ianmenethil•Updated 51 mins ago
1/**
2 * valtown-sql-client.ts — Secure, generic Val Town SQL API client for Deno.
3 * Provides safe, parameterized CRUD and batch operations for use across your app.
4 * @fileoverview All SQL is sanitized and parameterized. No raw string interpolation.
5 * Requires a Val Town API token with SQLite access.
6 */
7import { sqlite } from "https://esm.town/v/std/sqlite";

create-safehash-servermain.tsx7 matches

@ianmenethil•Updated 1 hour ago
217
218 // 0) Generate page-load nonce (for meta-tag/cookie)
219 if (req.method === "GET" && path === "/api/page-nonce") {
220 const pageNonce = generateNonce();
221 await storeNonce(pageNonce);
232 }
233
234 // 1) Issue a one-time payment nonce (for API calls)
235 if (req.method === "POST" && path === "/api/create-payment-nonce") {
236 if (!isValidOrigin(origin)) {
237 return new Response(
273 if (
274 req.method === "POST"
275 && (path === "/api/create-payment-hash" || path === "/create-hash")
276 ) {
277 if (!isValidOrigin(origin)) {
342 }
343 const required = [
344 "apikey",
345 "username",
346 "password",
363 }
364 const {
365 apikey,
366 username,
367 password,
406 }
407 const payload = [
408 apikey,
409 username,
410 password,

puppetmain.tsx2 matches

@join•Updated 1 hour ago
209<script>
210(function() {
211 const API_URL = '${sourceUrl}';
212 const speakBtn = document.getElementById('speakBtn');
213 const speechText = document.getElementById('speechText');
343
344 try {
345 const response = await fetch(API_URL, {
346 method: 'POST',
347 headers: { 'Content-Type': 'application/json' },

MiniAppStarterREADME.md1 match

@arseniy•Updated 2 hours ago
12- Farcaster mini app manifest + webhook + embed metadata
13- Farcaster notifications (storing tokens, sending recurring notifications, ...)
14- Neynar API integration for Farcaster data
15
16

MiniAppStarterneynar.ts2 matches

@arseniy•Updated 2 hours ago
1const baseUrl = "/neynar-proxy?path=";
2// const baseUrl = "https://api.neynar.com/v2/farcaster/";
3
4export async function fetchNeynarGet(path: string) {
8 "Content-Type": "application/json",
9 "x-neynar-experimental": "true",
10 "x-api-key": "NEYNAR_API_DOCS",
11 },
12 });

MiniAppStarterneynar.ts4 matches

@arseniy•Updated 2 hours ago
1const NEYNAR_API_KEY = Deno.env.get('NEYNAR_API_KEY') || 'NEYNAR_API_DOCS'
2const headers = {
3 'Content-Type': 'application/json',
4 'x-api-key': NEYNAR_API_KEY,
5}
6
7export const fetchNeynarGet = async (path: string) => {
8 return await fetch('https://api.neynar.com/v2/farcaster/' + path, {
9 method: 'GET',
10 headers: headers,
13
14export const fetchNeynarPost = async (path: string, body: any) => {
15 return await fetch('https://api.neynar.com/v2/farcaster/' + path, {
16 method: 'POST',
17 headers: headers,

MiniAppStarterindex.tsx2 matches

@arseniy•Updated 2 hours ago
22 }));
23
24app.get("/api/counter/get", async c => c.json(await db.get("counter")));
25app.get("/api/counter/increment", async c => c.json(await db.set("counter", (await db.get("counter") || 0) + 1)));
26
27app.get('/neynar-proxy', async (c) => {

MiniAppStarterimage.tsx3 matches

@arseniy•Updated 2 hours ago
85
86const loadEmoji = (code) => {
87 // const api = `https://cdnjs.cloudflare.com/ajax/libs/twemoji/14.0.2/svg/${code.toLowerCase()}.svg`
88 const api = `https://cdn.jsdelivr.net/gh/shuding/fluentui-emoji-unicode/assets/${code.toLowerCase()}_color.svg`
89 return fetch(api).then((r) => r.text())
90}
91

claude-api1 file match

@ziyanwould•Updated 38 mins ago

api-workshop

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