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?q=fetch&page=768&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 8414 results for "fetch"(999ms)

ipmain.tsx2 matches

@hanu•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/hanu/fetchJSON";
2
3export let ip = await fetchJSON("https://api.ipify.org?format=json");

geolocationmain.tsx1 match

@juliendorra•Updated 1 year ago
1export let geolocation = async (req, res) => {
2 const ip = req.options.headers["x-forwarded-for"];
3 const jsonresponse = await $stevekrouse.fetchJSON(
4 `http://ip-api.com/json/${ip}`
5 );

getCNNNewsmain.tsx2 matches

@fab1an•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function getCNNNews() {
4 const response = await fetch(
5 "https://saurav.tech/NewsAPI/everything/cnn.json"
6 );

holidaysUSmain.tsx2 matches

@dosirak•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// Public holidays in the US in 2023
4export let holidaysUS = fetchJSON(
5 "https://date.nager.at/api/v3/PublicHolidays/2023/KR"
6);

fetchJavascriptWeeklyIssuesmain.tsx2 matches

@Timmy•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const fetchJavascriptWeeklyIssues = fetch("https://javascriptweekly.com/issues")
4 .then((res) => {
5 const domText = res.text();

getTelAvivMobilitySpotsmain.tsx2 matches

@rustyb•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3interface APIResponse {
10 // "https://gisn.tel-aviv.gov.il/arcgis/rest/services/IView2/MapServer/860/query?where=1=1&outFields=*&f=geojson";
11 const url = "https://app.digital4grids.com/api";
12 const json_data = await fetchJSON(url);
13 return { "json_data": [] };
14}

githubUsermain.tsx2 matches

@vtdocs•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export const githubUser = (async () => {
4 const username = "stevekrouse";
5 const user = await fetchJSON(
6 `https://api.github.com/users/${username}`,
7 );

honoExamplemain.tsx1 match

@jplhomer•Updated 1 year ago
4 app.get("/", (c) => c.text("Hono yes?"));
5 app.get("/yeah", (c) => c.text("Routing ok!"));
6 return app.fetch(req);
7};
8// Forked from @tmcw.honoExample

CLIBlogmain.tsx1 match

@joodaloop•Updated 1 year ago
1export const CLIBlog = (async () => {
2 // let response = await fetch(
3 // "https://example-files.online-convert.com/document/txt/example.txt",
4 // );

buddhaRandomQuotemain.tsx2 matches

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

fetchPaginatedData2 file matches

@nbbaier•Updated 2 weeks ago

FetchBasic1 file match

@fredmoon•Updated 2 weeks ago