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/image-url.jpg?q=api&page=1058&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 11820 results for "api"(1494ms)

myApimain.tsx1 match

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

runsmain.tsx2 matches

@stevekrouseUpdated 1 year ago
5 token: string;
6 error?: boolean;
7 source?: ("api" | "ui" | "interval" | "email")[];
8 since?: Date;
9 until?: Date;
35}> {
36 return fetchJSON(
37 "https://api.val.town/v1/me/runs?" + searchParams({
38 error: error?.toString(),
39 source: source,

discordGetGuildsmain.tsx2 matches

@stevekrouseUpdated 1 year ago
1import { discordAPI } from "https://esm.town/v/stevekrouse/discordAPI";
2
3// https://discord.com/developers/docs/resources/user#get-current-user-guilds
4export let discordGetGuilds = ({token, tokenType}) => discordAPI({
5 token,
6 tokenType,

mtmain.tsx2 matches

@stevekrouseUpdated 1 year ago
15export const mt = async (req, res) => {
16 const r = await fetchJSON(
17 "https://app.moderntreasury.com/api/user_onboardings",
18 {
19 method: "POST",
23 headers: await basicAuthorization(
24 process.env.mtOrganizationId,
25 process.env.mtApiKey,
26 ),
27 },

myApimain.tsx1 match

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

myApimain.tsx1 match

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

measureValTownE2emain.tsx2 matches

@dbcooperUpdated 1 year ago
8 for (let i = 0; i < count; i++) {
9 let start = Date.now();
10 await fetch("https://api.val.town/eval/(()=%3E1+1)()");
11 evalTimes.push(Date.now() - start);
12 }
23 for (let i = 0; i < count; i++) {
24 let start = Date.now();
25 await fetch("https://api.val.town/eval/@healeycodes.addOnes()");
26 userFuncTimes.push(Date.now() - start);
27 }

githubFollowersmain.tsx1 match

@snowcrashUpdated 1 year ago
3// GitHub followers
4export let githubFollowers = fetchJSON(
5 "https://api.github.com/users/stevekrouse/followers"
6);

myApimain.tsx1 match

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

shortenUrlmain.tsx1 match

@demoUpdated 1 year ago
5 url: url,
6 };
7 let resp = await fetch("https://api.util.fyi/shorten/", {
8 method: "POST",
9 headers: {

social_data_api_project3 file matches

@tsuchi_yaUpdated 8 hours ago

new-val-api-21 file match

@shouserUpdated 18 hours ago
This is an example of using the API to create a val.
papimark21
socialdata
Affordable & reliable alternative to Twitter API: ➡️ Access user profiles, tweets, followers & timeline data in real-time ➡️ Monitor profiles with nearly instant alerts for new tweets, follows & profile updates ➡️ Simple integration