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/$%7Bsuccess?q=api&page=1020&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 11844 results for "api"(1041ms)

mathFactmain.tsx1 match

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

myApimain.tsx1 match

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

nameTopHNThreadmain.tsx1 match

@elsif_maj•Updated 1 year ago
2
3export let nameTopHNThread = (async () => {
4 // Cheerio parses markup and provides an API to interact with the resulting data structure
5 const cheerio = await import("npm:cheerio"); // You can import NPM packages
6 const reply = await fetch("https://news.ycombinator.com/");

myApimain.tsx1 match

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

myApimain.tsx1 match

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

californiaBusinessNotificationsmain.tsx1 match

@tmcw•Updated 1 year ago
6 const { parse } = await import("https://deno.land/x/xml/mod.ts");
7 const res: any = await fetch(
8 "https://bizfileonline.sos.ca.gov/api/FilingDetail/business/4603/false",
9 {
10 headers: {

authRequestExmain.tsx3 matches

@stevekrouse•Updated 1 year ago
1import { exportedKeys } from "https://esm.town/v/stevekrouse/exportedKeys";
2import { runValAPIAuth } from "https://esm.town/v/stevekrouse/runValAPIAuth";
3
4export const authRequestEx = runValAPIAuth({
5 val: "@stevekrouse.exampleAuthApi",
6 args: [1, 3],
7 keys: exportedKeys,

limitmain.tsx1 match

@stevekrouse•Updated 1 year ago
46 //
47 const limit = await fetchJSON(
48 `https://api.rlimit.com/limit/${namespaceId}/${type}/${max}/${interval}/${key}?cost=${cost}&subNamespace=${subNamespace}&password=${pass}`,
49 );
50 return limit;

getPublicValsmain.tsx2 matches

@stevekrouse•Updated 1 year ago
3export const getPublicVals = async (username) => {
4 let { id } = await fetchJSON(
5 `https://api.val.town/v1/alias/${username}`,
6 );
7 return fetchJSON(
8 `https://api.val.town/v1/users/${id}/vals`,
9 );
10};

testMutateSemantics2main.tsx4 matches

@stevekrouse•Updated 1 year ago
1import { TEST_API } from "https://esm.town/v/stevekrouse/TEST_API";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
3
16}) {
17 const { data: last } = await fetchJSON(
18 `${TEST_API}/eval/${stateName}`
19 );
20 const now = Date.now();
21 await fetchJSON(
22 `${TEST_API}/eval/${mutator(now)}`
23 );
24 const { data: next } = await fetchJSON(
25 `${TEST_API}/eval/${stateName}`
26 );
27 const mutated = next === now;

simple-scrabble-api1 file match

@bry•Updated 8 hours ago

social_data_api_project3 file matches

@tsuchi_ya•Updated 16 hours ago
mux
Your friendly, neighborhood video API.
api