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/?q=fetch&page=750&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 7882 results for "fetch"(1178ms)

stableDiffusionCreatemain.tsx2 matches

@calvinfo•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let stableDiffusionCreate = async (key, prompt) => {
10 "a9758cbfbd5f3c2094457d996681af52552901775aa2d6dd0b17fd15df959bef";
11 const data = { version: version, input: { prompt: prompt } };
12 const res = await fetch(url, {
13 method: "POST",
14 headers: headers,

isMyWebsiteDownmain.tsx3 matches

@summers•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2import process from "node:process";
3
10 let reason: string;
11 try {
12 const res = await fetch(URL);
13 if (res.status !== 200) {
14 reason = `(status code: ${res.status})`;
17 }
18 catch (e) {
19 reason = `couldn't fetch: ${e}`;
20 ok = false;
21 }

githubFollowersmain.tsx2 matches

@yosef_bayoude•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// GitHub followers
4export let githubFollowers = fetchJSON(
5 "https://api.github.com/users/stevekrouse/followers"
6);

bilitestmain.tsx2 matches

@nishui•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function bilitest(req: express.Request, res: express.Response) {
4 const axios = await fetch("npm:axios");
5 const url = "https://music.163.com/#/song?id=2008568696";
6 try {

githubReposmain.tsx2 matches

@joodaloop•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// GitHub repos
4export let githubRepos = fetchJSON(
5 "https://api.github.com/users/stealsocks/repos",
6);

buddhaQuoteOfTheDaymain.tsx2 matches

@noaoh•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const buddhaQuoteOfTheDay = (async () => {
4 const resp = await fetch("https://buddha-api.com/api/today");
5 const j = await resp.json();
6 const { text, byName } = j;

nameNationalitymain.tsx2 matches

@hetzelhouse•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=staci"
6);

fetchTwitterUsermain.tsx3 matches

@andreterron•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export async function fetchTwitterUser({ id, accessToken, query = "" }: {
4 id: string;
5 accessToken: string;
16 };
17}> {
18 const res = await fetchJSON(
19 `https://api.twitter.com/2/users/${id}?${query}`,
20 {

githubGistsmain.tsx2 matches

@evan•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// GitHub gists
4export let githubGists = fetchJSON(
5 "https://api.github.com/users/stevekrouse/gists"
6);

githubStarredmain.tsx2 matches

@sadfasdfasf•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// GitHub starred repos
4export let githubStarred = fetchJSON(
5 "https://api.github.com/users/stevekrouse/starred?per_page=10",
6);

fetchPaginatedData2 file matches

@nbbaier•Updated 1 week ago

FetchBasic1 file match

@fredmoon•Updated 1 week ago