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=871&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 10974 results for "api"(892ms)

untitled_coffeeMacawmain.tsx1 match

@shaniehurvitz•Updated 1 year ago
10async function fetchRandomJoke() {
11 const response = await fetch(
12 "https://official-joke-api.appspot.com/random_joke",
13 );
14 return response;

weatherGPTREADME.md1 match

@ellenchisa•Updated 1 year ago
1If you fork this, you'll need to set `OPENAI_API_KEY` in your [Val Town Secrets](https://www.val.town/settings/secrets).
2
3

emailRandomJokemain.tsx1 match

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

bilibili_methodsREADME.md1 match

@rebelpotato•Updated 1 year ago
1Methods for accessing the bilibili api with a cookie.
2
3Migrated from folder: bilibili/bilibili_methods

untitled_crimsonSilkwormmain.tsx1 match

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

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 });

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