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=1015&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 11504 results for "api"(3340ms)

nearbyJonBomain.tsx1 match

@jonbo•Updated 1 year ago
46 console.log("hi");
47
48 fetch("https://api.val.town/v1/run/jonbo.fetchBcycleCounts")
49 .then((response) => {
50 if (!response.ok) {

basicAPIExmain.tsx4 matches

@stevekrouse•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3// accessible via API at https://api.val.town/eval/@stevekrouse.basicAPIEx
4export const basicAPIEx = fetchJSON(
5 "https://date.nager.at/api/v2/publicholidays/2023/US"
6);
7// Bonus: the whole runtime is available in the URL Bar 🤯
8// ie https://api.val.town/eval/"The first holiday is "+ @stevekrouse.basicAPIEx[0].name

valBeeExamplemain.tsx1 match

@stevekrouse•Updated 1 year ago
4export const valBeeExample = async () => {
5 return (valbeeTest = fetchText(
6 "http://numbersapi.com/random/math"
7 ));
8};

twitterUsermain.tsx2 matches

@stevekrouse•Updated 1 year ago
12 twitterJSON({
13 url: handle
14 ? `https://api.twitter.com/2/users/by/username/${handle}`
15 : `https://api.twitter.com/2/users/${id}`,
16 bearerToken,
17 });

myApimain.tsx1 match

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

mathFactmain.tsx1 match

@kkga•Updated 1 year ago
3// Random math fact
4export let mathFact = fetchText(
5 "http://numbersapi.com/random/math"
6);

myApimain.tsx1 match

@frankysnow•Updated 1 year ago
1export function myApi(name: Interval) {
2 console.email("hi " + name);
3}

readMediumPostsmain.tsx1 match

@patrick_kw_chiu•Updated 1 year ago
5 const articlesDatabase = initDatabase({
6 appId: process.env.MONGODB_ARTICLES_APP_ID,
7 apiKey: process.env.MONGODB_ARTICLES_API_KEY,
8 databaseName: "medium",
9 });

myApimain.tsx1 match

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

githubUsermain.tsx1 match

@hultner•Updated 1 year ago
3// Github profile
4export let githubUser = fetchJSON(
5 "https://api.github.com/users/hultner"
6);

gptApiTemplate2 file matches

@charmaine•Updated 13 hours ago

mod-interview-api1 file match

@twschiller•Updated 1 day ago
artivilla
founder @outapint.io vibe coding on val.town. dm me to build custom vals: https://artivilla.com
mux
Your friendly, neighborhood video API.