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%20%22Image%20title%22?q=api&page=1059&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 11835 results for "api"(1213ms)

myApimain.tsx1 match

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

quotemain.tsx1 match

@nfelger•Updated 1 year ago
3export let quote = (async () => {
4 const quotes = await fetchJSON(
5 "https://zenquotes.io/api/random/"
6 );
7 return `"${quotes[0].q}" – ${quotes[0].a}`;

initialCommitmain.tsx2 matches

@jshawl•Updated 1 year ago
3export let initialCommit = async (org, repo) => {
4 const repoData = await fetchJSON(
5 `https://api.github.com/repos/${org}/${repo}`
6 );
7 const { created_at } = repoData;
8 const until = new Date(Date.parse(created_at) + 600).toISOString();
9 const json = await fetchJSON(
10 `https://api.github.com/repos/${org}/${repo}/commits?until=${until}`
11 );
12 return json;

getUrlContentmain.tsx1 match

@libo•Updated 1 year ago
7 const url = "https://blog.samaltman.com/how-to-be-successful";
8 const res = await fetch(
9 "https://extractus.deno.dev/extract?apikey=rn0wbHos2e73W6ghQf705bdF&type=article&url=" +
10 url
11 );

myApimain.tsx1 match

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

runsmain.tsx2 matches

@stevekrouse•Updated 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

@stevekrouse•Updated 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

@stevekrouse•Updated 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

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

myApimain.tsx1 match

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

simple-scrabble-api1 file match

@bry•Updated 2 hours ago

social_data_api_project3 file matches

@tsuchi_ya•Updated 10 hours ago
apiv1
papimark21