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=59&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"(1267ms)

myApi1 file match

@hankenstein•Updated 1 year ago

myApi1 file match

@runarorama•Updated 1 year ago

myApi2 file matches

@robberfree•Updated 1 year ago

testApi2 file matches

@clayway•Updated 1 year ago

myApi1 file match

@jndev•Updated 1 year ago

myApi1 file match

@dialnco•Updated 1 year ago

myApi1 file match

@ctalke•Updated 1 year ago

myApi1 file match

@curran•Updated 1 year ago

myApi2 file matches

@acmu•Updated 1 year ago

myApi1 file match

@nik•Updated 1 year ago

ChatApp.tsx8 matches

@c15r•Updated 1 hour 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 1 hour 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