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=1007&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 11889 results for "api"(1490ms)

getGithubStarsForRepomain.tsx1 match

@joeyUpdated 1 year ago
7export const getGithubStarsForRepo = async (username: string, project: string) => {
8 const res = await fetchJSON(
9 `https://api.github.com/repos/${username}/${project}`
10 );
11 return parseInt(res.stargazers_count);

holidaysUSmain.tsx1 match

@rjeliUpdated 1 year ago
3// Public holidays in the US in 2023
4export let holidaysUS = fetchJSON(
5 "https://date.nager.at/api/v2/publicholidays/2023/US"
6);

firstRunmain.tsx2 matches

@tylergawUpdated 1 year ago
1import { myApi } from "https://esm.town/v/tylergaw/myApi";
2
3export const firstRun = myApi("Fishboy!");
1export async function getAllVideosInYoutubePlaylist(playlistId, apiKey) {
2 const { default: axios } = await import("npm:axios");
3 if (!playlistId) {
5 return null;
6 }
7 if (!apiKey) {
8 console.warn("API Key is Invalid");
9 return null;
10 }
12 return await axios({
13 method: "GET",
14 url: "https://www.googleapis.com/youtube/v3/playlistItems",
15 params: {
16 key: apiKey,
17 part: "contentDetails,id,snippet",
18 playlistId,

myApimain.tsx1 match

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

myApimain.tsx1 match

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

myApimain.tsx1 match

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

myApimain.tsx1 match

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

GenerateQRmain.tsx1 match

@ramkarthikUpdated 1 year ago
1// fetch("https://api.val.town/v1/express/ramkarthik.GenerateQR?url={url}"
2export async function GenerateQR(req, res) {
3 const url = req.query.url;

githubStarredmain.tsx1 match

@jianUpdated 1 year ago
3// GitHub starred repos
4export let githubStarred = fetchJSON(
5 "https://api.github.com/users/stevekrouse/starred"
6);

social_data_api_project3 file matches

@tsuchi_yaUpdated 13 hours ago

simple-scrabble-api1 file match

@bryUpdated 1 day ago
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