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/$%7Burl%7D?q=api&page=1019&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 12041 results for "api"(1420ms)

valVersionmain.tsx1 match

@neverstewUpdated 1 year ago
31 : {};
32 return fetchJSON(
33 `https://api.val.town/v1/vals/${id}/versions/${version}`,
34 { headers },
35 );

hiddenAPImain.tsx2 matches

@rd3mUpdated 1 year ago
1import { hiddenAPIInternal } from "https://esm.town/v/rd3m/hiddenAPIInternal";
2
3export let hiddenAPI = (arg) => hiddenAPIInternal(arg);

hnTopStoriesmain.tsx1 match

@axelavUpdated 1 year ago
3export let // View this in a web browser!
4
5// https://api3.val.town/express/async%20(req,%20res)%20=%3Eres.send(@healeycodes.hnTopStories)
6const hnTopStories = (async () => {
7 let valTownFetchLimit = 100;

discogsmain.tsx5 matches

@axelavUpdated 1 year ago
26 id: string;
27 }
28 const token = process.env.DISCOGS_API_TOKEN;
29 const toLowerCaseAndSort = (list: string[]) =>
30 list.map((t) => t.toLowerCase()).sort();
86 }> =>
87 fetchJSON(
88 `https://api.discogs.com/database/search?token=${token}&q=${query}${
89 isMaster ? "&type=master" : ""
90 }`
92 const getMasterRelease = async (id: string): Promise<DiscogsRelease> =>
93 fetchJSON(
94 `https://api.discogs.com/masters/${id}?token=${token}`
95 );
96 const getMainRelease = async (id: string): Promise<DiscogsRelease> =>
97 fetchJSON(
98 `https://api.discogs.com/releases/${id}?token=${token}`
99 );
100 const params = request.params;
135 response.set("Content-Type", "text/html");
136 response.send(
137 "No query. Use within val town: @axelav.discogs({q: 'Boards Of Canada Geogaddi'}) or as an API endpoint: https://api.val.town/eval/@axelav.discogs?q=Boards%20of%20Canada%20Geogaddi"
138 );
139}

examplebotendpointmain.tsx1 match

@mattxUpdated 1 year ago
42 data: {
43 content: `${await (await fetch(
44 "https://api.val.town/v1/eval/" +
45 encodeURIComponent(body.data.options[0].value),
46 {

airtable_get_samplemain.tsx1 match

@mattxUpdated 1 year ago
4export const airtable_get_sample = (async () => {
5 const data = await fetchJSON(
6 "https://api.airtable.com/v0/appXSrKDlwbAijRmD/All%20content/recxS2AKaE1klriwW",
7 {
8 headers: {

myApimain.tsx1 match

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

myApimain.tsx1 match

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

gqlmain.tsx2 matches

@wilhelmUpdated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let gql = (api, query, variables = {}) =>
4 fetch(api, {
5 method: "POST",
6 body: JSON.stringify({ query, variables }),

twitterAuthHandlermain.tsx1 match

@andreterronUpdated 1 year ago
30}> {
31 // Imports
32 const { Client, auth } = await import("npm:twitter-api-sdk");
33 //
34 const authClient = new auth.OAuth2User({

social_data_api_project3 file matches

@tsuchi_yaUpdated 17 hours ago

simple-scrabble-api1 file match

@bryUpdated 4 days 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