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=1438&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 16337 results for "api"(1491ms)

githubReposmain.tsx1 match

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

myApimain.tsx1 match

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

myApimain.tsx1 match

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

RateLimitDemomain.tsx1 match

@zzz•Updated 1 year ago
1import { upstashRateLimiter } from "https://esm.town/v/zzz/upstashRateLimiter";
2
3// https://api.val.town/v1/express/zzz.RateLimitDemo
4export async function RateLimitDemo(req, res) {
5 const ip = req.get("true-client-ip") ??

telegramWebhookEchoMessagemain.tsx1 match

@dpetrouk•Updated 1 year ago
9 // Verify this webhook came from our bot
10 if (
11 req.get("x-telegram-bot-api-secret-token") !==
12 process.env.telegramWebhookSecret
13 ) {

myApimain.tsx1 match

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

chatmain.tsx4 matches

@webup•Updated 1 year ago
5 options = {},
6) => {
7 // Initialize OpenAI API stub
8 const { Configuration, OpenAIApi } = await import(
9 "https://esm.sh/openai@3.3.0"
10 );
11 const configuration = new Configuration({
12 apiKey: process.env.OPENAI,
13 });
14 const openai = new OpenAIApi(configuration);
15 // Request chat completion
16 const messages = typeof prompt === "string"

myApimain.tsx1 match

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

myApimain.tsx1 match

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

getYoutubeLinkFromPageAPImain.tsx1 match

@wilt•Updated 1 year ago
1import { getYoutubeLinkFromPage } from "https://esm.town/v/wilt/getYoutubeLinkFromPage";
2
3export async function getYoutubeLinkFromPageAPI(req: Request) {
4 const url = new URL(req.url).searchParams.get("url");
5 if (!url || url === "undefined")

Schedule

@Ozy•Updated 51 mins ago
Schedule_api

googleGeminiAPI2 file matches

@michaelwschultz•Updated 17 hours ago
Kapil01
apiv1