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/$%7Bart_info.art.src%7D?q=api&page=970&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 12138 results for "api"(2218ms)

telegramWebhookEchoMessagemain.tsx1 match

@enyoUpdated 1 year ago
4 // Verify this webhook came from our bot
5 if (
6 req.headers.get("x-telegram-bot-api-secret-token")
7 !== Deno.env.get("telegramWebhookSecret")
8 ) {

muxWebhookHandlermain.tsx1 match

@mmccUpdated 1 year ago
5
6const replicate = new Replicate({
7 auth: process.env.REPLICATE_API_TOKEN,
8});
9

scrape2mdREADME.md1 match

@tarasUpdated 1 year ago
11
12### TODO
13https://chatcraft.org/api/share/tarasglek/IDYChVAilfePgVZb_T5pH POST from browser
14https://www.val.town/v/nbbaier/valToGH sync to github
15

wikipediaPagemain.tsx3 matches

@jamiedubsUpdated 1 year ago
11
12 try {
13 const apiUrl =
14 `https://en.wikipedia.org/w/api.php?action=query&prop=extracts&exintro&explaintext&format=json&origin=*&titles=${
15 encodeURIComponent(title)
16 }`;
17 const response = await fetch(apiUrl);
18 if (!response.ok) {
19 throw new Error(`HTTP error! status: ${response.status}`);

syntheticLootmain.tsx1 match

@jamiedubsUpdated 1 year ago
4
5// I <3 ether.actor, very convenient for fetching on-chain data
6// it's a little slow - Alchemy or another RPC/API provider would be faster
7const url = `https://ether.actor/0x869ad3dfb0f9acb9094ba85228008981be6dbdde/tokenURI`;
8

searchWikipediamain.tsx2 matches

@jamiedubsUpdated 1 year ago
13
14 try {
15 const searchUrl = `https://en.wikipedia.org/w/api.php?action=query&list=search&srsearch=${
16 encodeURIComponent(searchQuery)
17 }&srwhat=text&format=json&utf8=1&origin=*`;
27
28 const pageTitle = searchData.query.search[0].title;
29 const contentUrl = `https://en.wikipedia.org/w/api.php?action=query&prop=extracts&exintro&titles=${
30 encodeURIComponent(pageTitle)
31 }&format=json&utf8=1&origin=*`;

quote_of_the_daymain.tsx1 match

@robikUpdated 1 year ago
4export async function quote_of_the_day() {
5 const [qod] = await fetchJSON(
6 "https://zenquotes.io/api/today",
7 );
8 const formattedQuote = `"${qod.q}"

weatherInCitymain.tsx3 matches

@jamiedubsUpdated 1 year ago
10 }
11
12 const weatherApiUrl = `https://wttr.in/${encodeURIComponent(city)}?format=j1`;
13
14 try {
15 const weatherResponse = await fetch(weatherApiUrl);
16 if (!weatherResponse.ok) {
17 throw new Error(`Weather API request failed with status: ${weatherResponse.status}`);
18 }
19 const weatherData = await weatherResponse.json();

starWarsmain.tsx2 matches

@dannyUpdated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// Explore the Star Wars universe, from StarWarsAPI
4export let starWars = fetchJSON(
5 "https://swapi.dev/api/people/1/",
6);

untitled_magentaQuailmain.tsx1 match

@shiann3Updated 1 year ago
9async function fetchRandomJoke() {
10 const response = await fetch(
11 "https://official-joke-api.appspot.com/random_joke",
12 );
13 return response.json();

groq-vapi-demo1 file match

@yawnxyzUpdated 2 hours ago

social_data_api_project3 file matches

@tsuchi_yaUpdated 1 day ago
papimark21
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