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=915&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 11410 results for "api"(1057ms)

annoymain.tsx4 matches

@rcurtiss•Updated 1 year ago
5export async function annoy() {
6 const resume = resume2;
7 // const boo = await import("https://esm.sh/@atproto/api");
8 const { default: BskyAgent } = await import("npm:@atproto/api");
9 console.log(BskyAgent);
10 const agent = new BskyAgent.BskyAgent({ service: "https://bsky.social" });
50 `;
51 console.log({ prompt });
52 const response = await fetch("https://api.openai.com/v1/completions", {
53 method: "POST",
54 headers: {
55 "Content-Type": "application/json",
56 "Authorization": "Bearer " + process.env.OPENAI_API_KEY, // Replace with your OpenAI API Key
57 },
58 body: JSON.stringify({

untitled_coffeeMartenmain.tsx1 match

@rohansolo156•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_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();

mod-interview-api1 file match

@twschiller•Updated 4 hours ago

daily-advice-app1 file match

@dcm31•Updated 3 days ago
Random advice app using Advice Slip API
mux
Your friendly, neighborhood video API.
api