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=1062&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"(1563ms)

boredActivitiesmain.tsx1 match

@andreterronUpdated 1 year ago
2
3// Activity suggestions for when you're bored
4export let boredActivities = fetchJSON('https://www.boredapi.com/api/activity')

myApimain.tsx1 match

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

LoginPelotonmain.tsx1 match

@steveb1313Updated 1 year ago
6 res: express.Response,
7) {
8 let response = await fetch("https://api.onepeloton.com/auth/login", {
9 method: "POST",
10 mode: "no-cors",

GetPelotonUsermain.tsx2 matches

@steveb1313Updated 1 year ago
6 res: express.Response,
7) {
8 let response = await fetch("https://api.onepeloton.com/auth/login", {
9 method: "POST",
10 mode: "no-cors",
21 const session = await response.json();
22 let userResponse = await fetch(
23 `https://api.onepeloton.com/api/user/${session["user_id"]}`,
24 {
25 method: "GET",

myApimain.tsx1 match

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

githubStarredmain.tsx1 match

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

rimemain.tsx2 matches

@stevekrouseUpdated 1 year ago
3import { rimeRateLimitExceeded } from "https://esm.town/v/stevekrouse/rimeRateLimitExceeded";
4
5// We provide some amount of free usage to this API
6// Callable with my API key via api(@stevekrosue.rime, {text: "blah blah", ...})
7export async function rime({ text, speaker, key }: {
8 text: string;

testNasamain.tsx1 match

@stevekrouseUpdated 1 year ago
3
4export const testNasa = fetchJSON(
5 `https://api.nasa.gov/planetary/apod?api_key=${process.env.nasa}&date=1995-06-16`,
6);

untitled6667099main.tsx2 matches

@stevekrouseUpdated 1 year ago
1import { spotifyAPI } from "https://esm.town/v/stevekrouse/spotifyAPI";
2
3untitled6667099 = export let spotifyAddToPlaylist ({ id, ...params }) => spotifyAPI({
4 endpoint: `playlists/${id}/tracks`,
5 method: 'POST',
3
4export let untitled_scarletHoverfly = fetchJSON(
5 "https://api.val.town/v1/eval",
6 {
7 method: "POST",

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