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/$%7Burl%7D?q=api&page=991&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 12426 results for "api"(3019ms)

10 if (hash.startsWith("0x0")) {
11 const hash = new URL(url).pathname.split("/").pop();
12 const urlStream = await fetch(`https://api.blobscan.com/blobs/${hash}`);
13 const arrayBuffer = await urlStream.arrayBuffer();
14 const blob = new Blob([arrayBuffer], { type: "application/json" });
16 data.append("file", file);
17 } else {
18 const tx = await fetch(`https://api.blobscan.com/transactions/${hash}`);
19 const txData = await tx.json();
20
22 let folder = "blobs"
23 await Promise.all(txData.blobs.map(async (blob, index) => {
24 const blobStream = await fetch(`https://api.blobscan.com/blobs/${blob}`);
25 const arrayBuffer = await blobStream.arrayBuffer();
26 const blobFile = new Blob([arrayBuffer], { type: "application/json" });
35 console.log(data);
36
37 const response = await fetch("https://api.pinata.cloud/pinning/pinFileToIPFS", {
38 method: "POST",
39 headers: {

roseSalamanderREADME.md1 match

@andreterronUpdated 1 year ago
8
91. Click `Fork`
102. Change `location` (Line 4) to describe your location. It accepts fairly flexible English descriptions which it turns into locations via [nominatim's geocoder API](https://www.val.town/v/stevekrouse/nominatimSearch).
113. Click `Run`
12

codemirror_demoREADME.md1 match

@pomdtrUpdated 1 year ago
8- [theme](https://github.com/vadimdemedes/thememirror/tree/main/source/themes)
9
10## API
11
12You can access the code using the `code` property:

discord_note_to_selfmain.tsx2 matches

@wittjosiahUpdated 1 year ago
4 if (!dmId) {
5 console.log("Fetching dmId...", { userId });
6 const channelResponse = await fetch("https://discord.com/api/users/@me/channels", {
7 method: "POST",
8 headers: {
23 console.log("sending", body);
24
25 const dmResponse = await fetch(`https://discord.com/api/channels/${dmId}/messages`, {
26 method: "POST",
27 headers: {

resilientFetchmain.tsx2 matches

@easrngUpdated 1 year ago
1import { API_URL } from "https://esm.town/v/std/API_URL";
2async function proxiedFetch(req: Request): Promise<Response> {
3 let query = new URLSearchParams({
6 const headers = new Headers(req.headers);
7 headers.set("X-Valtown-Authorization", `Bearer ${Deno.env.get("valtown")}`);
8 return fetch(`${API_URL}/v1/fetch?${query}`, {
9 ...req,
10 headers,

aqiREADME.md1 match

@andreterronUpdated 1 year ago
8
91. Click `Fork`
102. Change `location` (Line 4) to describe your location. It accepts fairly flexible English descriptions which it turns into locations via [nominatim's geocoder API](https://www.val.town/v/stevekrouse/nominatimSearch).
113. Click `Run`
12

instructorExamplemain.tsx1 match

@inkpotmonkeyUpdated 1 year ago
4
5const openAISecrets = {
6 apiKey: getApiKey(),
7 organization: getOrganisationKey(),
8};

instructorExampleREADME.md1 match

@inkpotmonkeyUpdated 1 year ago
1Example copied https://instructor-ai.github.io/instructor-js/#usage into val.town
2
3You will need to fork this and properly set the apiKey and organisation for it to work.

aqiREADME.md1 match

@djfUpdated 1 year ago
8
91. Click `Fork`
102. Change `location` (Line 4) to describe your location. It accepts fairly flexible English descriptions which it turns into locations via [nominatim's geocoder API](https://www.val.town/v/stevekrouse/nominatimSearch).
113. Click `Run`
12

buttonmain.tsx1 match

@easrngUpdated 1 year ago
27 try {
28 const r = await fetch(
29 "https://fonts.googleapis.com/css2?family="
30 + encodeURIComponent("IBM Plex Sans:wght@600")
31 + "&text="

vapi-minutes-db2 file matches

@henrywilliamsUpdated 52 mins ago

social_data_api_project3 file matches

@tsuchi_yaUpdated 2 days ago
socialdata
Affordable & reliable alternative to Twitter API: ➡️ Access user profiles, tweets, followers & timeline data in real-time ➡️ Monitor profiles with nearly instant alerts for new tweets, follows & profile updates ➡️ Simple integration
artivilla
founder @outapint.io vibe coding on val.town. dm me to build custom vals: https://artivilla.com