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/?q=api&page=874&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 10997 results for "api"(1568ms)

untitled_redCarpmain.tsx1 match

@nnwetzel•Updated 1 year ago
4async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",
7 );
8 return response.json();

untitled_crimsonFinchmain.tsx1 match

@rob_ne•Updated 1 year ago
4async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",
7 );
8 return response.json();

getVectorStoreBuildermain.tsx1 match

@bluemsn•Updated 1 year ago
31 const client = new PineconeClient();
32 await client.init({
33 apiKey: process.env.PINECONE,
34 environment: "asia-southeast1-gcp-free",
35 });

getWebLoaderBuildermain.tsx1 match

@bluemsn•Updated 1 year ago
39 ...options,
40 }, {
41 apiKey: process.env.ASSEMBLYAI,
42 });
43 },

getModelBuildermain.tsx5 matches

@bluemsn•Updated 1 year ago
11 // const { LangChainTracer } = await import("npm:langchain/callbacks");
12 // const client = new Client({
13 // apiUrl: "https://api.smith.langchain.com",
14 // apiKey: process.env.LANGSMITH,
15 //});
16
17 // const tracer = new LangChainTracer({ client });
18 const callbacks = options?.verbose !== false ? [] : [];
19 // Set up API key for each providers
20 const args = extend({ callbacks }, options);
21
22 if (spec?.provider === "openai")
23 args.openAIApiKey = process.env.OPENAI_API_KEY;
24 else if (spec?.provider === "huggingface")
25 args.apiKey = process.env.HUGGINGFACE;
26 // Populate model builders
27 const setup = cond([

untitled_moccasinWildebeestmain.tsx1 match

@rcurtiss•Updated 1 year ago
10 <link rel="preconnect" href="https://fonts.gstatic.com" />
11 <link
12 href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap"
13 rel="stylesheet"
14 />

chatmain.tsx1 match

@bluemsn•Updated 1 year ago
5 options = {},
6) => {
7 // Initialize OpenAI API stub
8 const { OpenAI } = await import(
9 "https://esm.sh/openai"

untitled_violetToucanmain.tsx1 match

@daanielzhou•Updated 1 year ago
7async function fetchRandomJoke() {
8 const response = await fetch(
9 "https://official-joke-api.appspot.com/random_joke",
10 );
11 return response.json();
4async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",
7 );
8 return response.json();

getDevToPublicPostsmain.tsx1 match

@xkonti•Updated 1 year ago
1export const getDevToPublicPosts = async (username: string) => {
2 let data = await fetch(`https://dev.to/api/articles?username=${username}`);
3 return await data.json();
4};

daily-advice-app1 file match

@dcm31•Updated 2 days ago
Random advice app using Advice Slip API

gptApiTemplate1 file match

@charmaine•Updated 3 days ago
apiv1
papimark21