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=fetch&page=1027&format=json

For typeahead suggestions, use the /typeahead endpoint:

https://codesearch.val.run/typeahead?q=fetch

Returns an array of strings in format "username" or "username/projectName"

Found 10934 results for "fetch"(2744ms)

postWebhookTest1main.tsx2 matches

@stevekrouse•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export let postWebhookTest1 = fetchJSON(
4 "https://stevekrouse-postWebhook1.express.val.run",
5 {

textToImageDallemain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export const textToImageDalle = async (
16 message: string;
17 };
18 } = await fetchJSON(
19 "https://api.openai.com/v1/images/generations",
20 {

arenaHelpersmain.tsx3 matches

@korede•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const arenaHelpers = (async () => {
23 const url = `https://api.are.na/v2/users/${userId}/channels` +
24 (Object.keys(params).length ? `?${urlParams.toString()}` : "");
25 const response = await fetch(url, {
26 headers,
27 });
28 console.log("DEBUG", "end fetch user w channels");
29 return await response.json();
30 }

newChatGPT35main.tsx2 matches

@bingo16•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2import process from "node:process";
3
14 };
15 const getCompletion = async () => {
16 const response = await fetch("https://api.openai.com/v1/chat/completions", {
17 method: "POST",
18 headers: {

nameTopHNThreadCronmain.tsx2 matches

@elsif_maj•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2import { set } from "https://esm.town/v/std/set?v=11";
3import { topHNThreadByHour } from "https://esm.town/v/elsif_maj/topHNThreadByHour";
6 // Cheerio parses markup and provides an API to interact with the resulting data structure
7 const cheerio = await import("npm:cheerio"); // You can import NPM packages
8 const reply = await fetch("https://news.ycombinator.com/");
9 const replyText = await reply.text();
10 const $ = await cheerio.load(replyText);

aqimain.tsx2 matches

@ychu•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export let aqi = async () => {
4 let pm25 = (
5 await fetchJSON(
6 "https://api.openaq.org/v2/latest?" +
7 new URLSearchParams({

slackWebHookMessageExamplemain.tsx2 matches

@vtdocs•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2import process from "node:process";
3
4export const slackWebHookMessageExample = (async () => {
5 const res = await fetch(process.env.slackWebhookURL, {
6 method: "POST",
7 body: JSON.stringify({

telegramGetUpdatesmain.tsx2 matches

@vtdocs•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export const telegramGetUpdates = async (botToken: string) =>
4 fetchJSON(
5 `https://api.telegram.org/bot${botToken}/getUpdates`,
6 );

generateQRmain.tsx1 match

@galligan•Updated 1 year ago
1// fetch("https://api.val.town/v1/express/galligan.generateQR?url={url}"
2// QR Code Generator
3// 1. Right click on the bookmarks bar and add new bookmark

nameNationalitymain.tsx2 matches

@rodrigotellovaltown•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// Predict the nationality of a name
4export let nameNationality = fetchJSON(
5 "https://api.nationalize.io/?name=michael"
6);

HN-fetch-call3 file matches

@ImGqb•Updated 17 hours ago
fetch HackerNews by API

FRAMERFetchBasic1 file match

@bresnik•Updated 2 days ago