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/$1?q=api&page=13&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 18781 results for "api"(1291ms)

tracksAPI1 file match

@dthyresson•Updated 10 months ago

bearObservationsAPI1 file match

@chrisco•Updated 11 months ago

hfApiGateway1 file match

@iamseeley•Updated 11 months ago

vtApiTypes2 file matches

@neverstew•Updated 11 months ago

fetchAPI1 file match

@pomdtr•Updated 12 months ago

GitHubAPI2 file matches

@iamseeley•Updated 12 months ago

ValTownAPI2 file matches

@iamseeley•Updated 12 months ago

httpApiScreenshotPageExample1 file match

@charlypoly•Updated 1 year ago

generateValCodeAPI2 file matches

@yawnxyz•Updated 1 year ago

geolocation_api_demo1 file match

@stevekrouse•Updated 1 year ago

ChatApp.tsx8 matches

@c15r•Updated 47 mins ago
15
16export interface AppConfig {
17 anthropicApiKey: string;
18 mcpServers: MCPServerConfig[];
19 selectedModel: string;
39export default function App() {
40 const [config, setConfig] = useState<AppConfig>({
41 anthropicApiKey: "",
42 mcpServers: [],
43 selectedModel: "claude-3-5-sonnet-20241022",
53 // Load config from localStorage on mount
54 useEffect(() => {
55 const savedApiKey = localStorage.getItem("anthropic_api_key");
56 const savedMcpServers = localStorage.getItem("mcp_servers");
57 const savedMessages = localStorage.getItem("chat_messages");
60
61 setConfig({
62 anthropicApiKey: savedApiKey || "",
63 mcpServers: savedMcpServers ? JSON.parse(savedMcpServers) : DEFAULT_MCP_SERVERS,
64 selectedModel: savedModel || "claude-3-5-sonnet-20241022",
76 }
77
78 // Show settings if no API key is configured
79 if (!savedApiKey) {
80 setShowSettings(true);
81 }
84 // Save config to localStorage when it changes
85 useEffect(() => {
86 if (config.anthropicApiKey) {
87 localStorage.setItem("anthropic_api_key", config.anthropicApiKey);
88 }
89 localStorage.setItem("mcp_servers", JSON.stringify(config.mcpServers));

FarcasterSpacesSpace.tsx2 matches

@moe•Updated 55 mins ago
139
140 const queryFn = () =>
141 fetch(`/api/channels`)
142 .then((r) => r.json())
143 .then((r) => r?.data?.channels?.find((c) => c.channel_name == channel))
146
147 const join = async () => {
148 const response = await fetch(`/api/token?channel=${channel}&uid=${uid}`).then((r) => r.json())
149 console.log('response', response)
150 setToken(response.token)
apiry
snartapi