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/$%7Bsuccess?q=api&page=3&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 11482 results for "api"(880ms)

harmoniousPlumTapir1 file match

@davincidreamsUpdated 1 month ago

apiProxy2 file matches

@maxmUpdated 1 month ago

capitalMultipliers2 file matches

@vinaybjp12Updated 1 month ago

social_data6 file matches

@stevekrouseUpdated 1 month ago
Service for getting Twitter 𝕏 data without Twitter's API

fiberplaneHonoZodStarter10 file matches

@fiberplaneUpdated 2 months ago
Hono-Zod-OpenAPI with Fiberplane API Playground integration

API_Management

@aryandcUpdated 2 months ago

researchAgent2 file matches

@thesephistUpdated 2 months ago
This is a lightweight wrapper around Perplexity's web search API

lovingCoralTapir1 file match

@khennyybUpdated 2 months ago

healthyJadeTapir

@danisjerryUpdated 2 months ago

Towniesend-message.ts3 matches

@valdottownUpdated 1 hour ago
19 }
20
21 const { messages, project, branchId, anthropicApiKey, selectedFiles, images } = await c.req.json();
22 console.log("Original messages:", JSON.stringify(messages, null, 2));
23 console.log("Images received:", JSON.stringify(images, null, 2));
24
25 // Still allow users to pass their own key, or use ours
26 const apiKey = anthropicApiKey || Deno.env.get("ANTHROPIC_API_KEY");
27 const anthropic = createAnthropic({
28 apiKey,
29 });
30

TownieuseAuth.tsx11 matches

@valdottownUpdated 1 hour ago
3
4const TOKEN_KEY = "bearer";
5const ANTHROPIC_KEY = "anthropic_api_key";
6
7export function useAuth() {
8 const [token, setToken, removeToken] = useLocalStorage(TOKEN_KEY, "");
9 const [anthropicApiKey, setAnthropicApiKey, removeAnthropicApiKey] = useLocalStorage(ANTHROPIC_KEY, "");
10 const [error, setError] = useState(null);
11
12 const isAuthenticated = !!token;
13
14 const authenticate = async (valTownAPIKey: string, anthropicKey: string) => {
15 // replace all this with oauth when it's ready
16 try {
17 const res = await fetch("/api/user", {
18 headers: {
19 "Authorization": "Bearer " + valTownAPIKey,
20 },
21 });
25 setError(data.error);
26 removeToken();
27 removeAnthropicApiKey();
28 return;
29 }
30 setError(null);
31 setToken(valTownAPIKey);
32 setAnthropicApiKey(anthropicKey);
33 } catch (e) {
34 console.error(e);
35 setError(e.error);
36 removeToken();
37 removeAnthropicApiKey();
38 }
39 };
41 const logOut = () => {
42 removeToken();
43 removeAnthropicApiKey();
44 };
45
50 logOut,
51 token,
52 anthropicApiKey,
53 };
54}
apiv1
papimark21