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/$%7Bart_info.art.src%7D?q=api&page=1637&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 18287 results for "api"(5258ms)

myApimain.tsx1 match

@ypxUpdated 1 year ago
1export function myApi(name) {
2 return "hi " + name;
3}

shittyValTownUImain.tsx2 matches

@vezUpdated 1 year ago
8 isInterval?: boolean;
9 }) =>
10 `fetch('https://api.val.town/eval/@vez.editVal(${JSON.stringify(body)})')`;
11 return res.send(`<h1>Shitty Val Town 2</h1>
12${(await getAllVals("@vez")).map(({ code, name }) => {
13 const editorId = `${name}-editor`;
14 const onClick = `(document.getElementById('${name}-button').textContent = 'save 🔄'), fetch('https://api.val.town/eval/@vez.editVal', { method: 'POST', body: JSON.stringify({ name: '${name}', code: document.getElementById('${editorId}').value })}).then(()=>(document.getElementById('${name}-button').textContent = 'save ✅'))`;
15 return `<h2>${name}</h2>
16<textarea id="${editorId}" rows="20" cols="120">${escapeHtml(

myApimain.tsx1 match

@namitUpdated 1 year ago
1export function myApi(name) {
2 return "hi " + name;
3}

myApimain.tsx1 match

@moschanUpdated 1 year ago
1export function myApi(name) {
2 return "hi " + name;
3}

postTweetmain.tsx1 match

@andreterronUpdated 1 year ago
8 };
9}) {
10 return fetchJSON(`https://api.twitter.com/2/tweets`, {
11 method: "POST",
12 headers: {

myApimain.tsx1 match

@saip009Updated 1 year ago
1export function myApi(name) {
2 return "hi " + name;
3}

tootLatestPostsmain.tsx1 match

@sebddUpdated 1 year ago
12 .map((item) =>
13 postToMastodon(
14 "https://mastodon.social/api/v1",
15 process.env.mastodonAccessToken,
16 `${item.title.charAt(0) === "↗" ? "🔗" : "✍️"} ${

topLichessmain.tsx1 match

@jdanUpdated 1 year ago
7 | "Bullet"
8 | "Computer"
9 | "Rapid"
10 | "Top Rated"
11 | "Blitz"

myApimain.tsx1 match

@eastercUpdated 1 year ago
1export function myApi(name) {
2 return "hi " + name;
3}

pipeSampleLLMToolmain.tsx2 matches

@webupUpdated 1 year ago
4
5export const pipeSampleLLMTool = (async () => {
6 const { SerpAPI } = await import("npm:langchain/tools");
7 const { PromptTemplate } = await import("npm:langchain/prompts");
8 const { StringOutputParser } = await import(
9 "npm:langchain/schema/output_parser"
10 );
11 const search = new SerpAPI(process.env.SERP);
12 const prompt = PromptTemplate.fromTemplate(
13 `Turn the following user input into a search query for a search engine:

github-api1 file match

@cricks_unmixed4uUpdated 18 hours ago

beeminder-api4 file matches

@cricks_unmixed4uUpdated 18 hours ago
Kapil01
apiv1