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/$%7Burl%7D?q=api&page=80&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 12426 results for "api"(2252ms)

my-first-val02_http.tsx2 matches

@stevekrouseUpdated 1 week ago
10
11 // Look up the user's location from their IP
12 const geoResponse = await fetch(`http://ip-api.com/json/${ip}`);
13 const geoData = await geoResponse.json();
14
26 <style>
27 {`
28 @import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');
29 body { font-family: 'Share Tech Mono', monospace; background: #0a0a0a; color: #00ff00; }
30 .glow { text-shadow: 0 0 10px #00ff00; }

glastonewsindex.ts1 match

@bensomethingUpdated 1 week ago
2import fetch from "node:node-fetch"; // Ensure this is installed if not already
3import process from "node:process";
4import { BskyAgent } from "npm:@atproto/api";
5
6// Create a Bluesky Agent
57 : `applications/${DISCORD_APP_ID}/commands`;
58
59 console.log(`📡 Using API endpoint: ${endpoint}`);
60
61 try {
65
66 // Register the commands
67 const response = await fetch(`https://discord.com/api/v10/${endpoint}`, {
68 method: "PUT",
69 headers: {

Townieschema.tsx2 matches

@pomdtrUpdated 1 week ago
18 finish_reason?: string;
19 num_images?: number;
20 our_api_token: boolean;
21}
22
43 finish_reason TEXT,
44 num_images INTEGER,
45 our_api_token INTEGER NOT NULL,
46 finish_timestamp INTEGER
47 )

TownieuseProject.tsx2 matches

@pomdtrUpdated 1 week ago
2import { useAuth } from "./useAuth.tsx";
3
4const PROJECT_ENDPOINT = "/api/project";
5const FILES_ENDPOINT = "/api/project-files";
6
7export function useProject (projectId: string, branchId?: string) {

TownieuseProjects.tsx1 match

@pomdtrUpdated 1 week ago
2import { useAuth } from "./useAuth.tsx";
3
4const ENDPOINT = "/api/projects-loader";
5
6export function useProjects () {

TownieuseCreateProject.tsx1 match

@pomdtrUpdated 1 week ago
3import { useAuth } from "./useAuth.tsx";
4
5const ENDPOINT = "/api/create-project";
6
7export function useCreateProject () {

TownieuseCreateBranch.tsx1 match

@pomdtrUpdated 1 week ago
2import { useAuth } from "./useAuth.tsx";
3
4const ENDPOINT = "/api/create-branch";
5
6export function useCreateBranch (projectId: string) {

TownieuseChatLogic.ts4 matches

@pomdtrUpdated 1 week ago
6 project: any;
7 branchId: string | undefined;
8 anthropicApiKey: string;
9 bearerToken: string;
10 selectedFiles: string[];
16 project,
17 branchId,
18 anthropicApiKey,
19 bearerToken,
20 selectedFiles,
37 status,
38 } = useChat({
39 api: "/api/send-message",
40 body: {
41 project,
42 branchId,
43 anthropicApiKey,
44 selectedFiles,
45 images: images

TownieuseBranches.tsx1 match

@pomdtrUpdated 1 week ago
2import { useAuth } from "./useAuth.tsx";
3
4const ENDPOINT = "/api/project-branches";
5
6export function useBranches (projectId: string) {

vapi-minutes-db2 file matches

@henrywilliamsUpdated 57 mins ago

social_data_api_project3 file matches

@tsuchi_yaUpdated 2 days ago
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
artivilla
founder @outapint.io vibe coding on val.town. dm me to build custom vals: https://artivilla.com