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%22Optional%20title%22?q=api&page=66&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 11661 results for "api"(2151ms)

heapify1 file match

@aeschylusUpdated 1 year ago

myApi1 file match

@dabeeeensterUpdated 1 year ago

API_BASE_URL1 file match

@mangadexUpdated 1 year ago

myApi1 file match

@carlvonblixenUpdated 1 year ago

myApi1 file match

@qaispalekarUpdated 1 year ago

myApi2 file matches

@mlucconeUpdated 1 year ago

myApi1 file match

@jacob_kettleUpdated 1 year ago

postHogAPICapture1 file match

@ianvphUpdated 1 year ago

myApi1 file match

@ollypollyUpdated 1 year ago

mastodon-pogodanew-file-2457.tsx2 matches

@tomaszUpdated 24 mins ago
47
48 // Upload to Mastodon
49 const mediaRes = await fetch("https://mastodon.online/api/v2/media", {
50 method: "POST",
51 headers: {
58
59 // Publish post
60 await fetch("https://mastodon.online/api/v1/statuses", {
61 method: "POST",
62 headers: {
4import { blob } from "https://esm.town/v/std/blob";
5
6// Discord API endpoints
7const API_BASE = "https://discord.com/api/v10";
8
9// Main types from C# application
10interface MapInfo {
11 MapName: string;
12 MapDetails: MapDetails;
29
30interface HellLetLooseMapData {
31 Maps: MapInfo[];
32}
33
139 }
140
141 const url = `${API_BASE}${endpoint}`;
142 const headers = {
143 "Authorization": `Bot ${token}`,
156 if (!response.ok) {
157 const error = await response.json();
158 console.error(`❌ Discord API error: ${response.status}`, error);
159 throw new Error(`Discord API error: ${response.status} ${JSON.stringify(error)}`);
160 }
161
344 title: initialEmbedData.InitialEmbedTitle || "Loading . . .",
345 description: initialEmbedData.InitialEmbedDescription
346 || "Due to Discord API rate limits this will take a few minutes.",
347 fields: [
348 {
468
469// Process variants for a map and add emoji reactions
470async function processMapVariants(messageId: string, channelId: string, map: MapInfo, variantOptions: any) {
471 const mapMetaVariants: string[] = [];
472 const mapEnabledVariants: string[] = [];
mux
Your friendly, neighborhood video API.
api