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=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 11523 results for "api"(2882ms)

hnSearchmain.tsx2 matches

@stevekrouse•Updated 1 year ago
3
4/* Search Hacker News via Agolia
5Look for the valid params: https://hn.algolia.com/api */
6export let hnSearch = async ({
7 search_by_date,
17 let cleaned_params = await searchParams(params);
18 let data = await fetchJSON(
19 `http://hn.algolia.com/api/v1/${type}?${cleaned_params}`
20 );
21 if (!data.hits && data.message) {

discordChannelmain.tsx1 match

@stevekrouse•Updated 1 year ago
3export function discordChannel({ botToken, serverId }) {
4 return fetchJSON(
5 `https://discord.com/api/guilds/${serverId}/channels`,
6 {
7 headers: {

spotifyAddToPlaylistmain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import { spotifyAPI } from "https://esm.town/v/stevekrouse/spotifyAPI";
2
3export let spotifyAddToPlaylist = ({ id, ...params }) => spotifyAPI({
4 endpoint: `playlists/${id}/tracks`,
5 method: 'POST',

addSendGridEmailmain.tsx1 match

@stevekrouse•Updated 1 year ago
3// called by supabase newsletter trigger (defined in sql editor)
4export let addSendGridEmail = ({ token, email, listId }) =>
5 fetchJSON("https://api.sendgrid.com/v3/marketing/contacts", {
6 method: "PUT",
7 headers: {

getWeatherByCoordsmain.tsx1 match

@onemanwenttomow•Updated 1 year ago
3export async function getWeatherByCoords(lat, long) {
4 const weather = await fetchJSON(
5 `https://api.open-meteo.com/v1/forecast?latitude=${lat}&longitude=${long}&hourly=temperature_2m,precipitation_probability&forecast_days=1`,
6 );
7 return weather;

meowmain.tsx1 match

@endingwithali•Updated 1 year ago
2
3export let meow = fetchJSON(
4 "https://pokeapi.co/api/v2/pokemon/ditto"
5);

githubReposmain.tsx1 match

@markthree•Updated 1 year ago
2
3export let githubRepos = fetchJSON(
4 "https://api.github.com/users/markthree/repos"
5);

myApimain.tsx1 match

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

githubmain.tsx1 match

@markthree•Updated 1 year ago
2
3export let github = fetchJSON(
4 "https://api.github.com/users/markthree"
5);

untitled_sendFormmain.tsx1 match

@joey•Updated 1 year ago
4 return renderHtml(
5 args,
6 `<form action="https://api.val.town/eval/@joey.untitled_handleForm">
7 Subject <input name="subject" /> <br/>
8 <textarea name="body" placeholder="Enter message body.."></textarea><br/>

gptApiTemplate2 file matches

@charmaine•Updated 1 day ago

mod-interview-api1 file match

@twschiller•Updated 1 day ago
apiv1
papimark21