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=1444&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 17714 results for "api"(4522ms)

ogImagemain.tsx3 matches

@moe•Updated 9 months ago
41
42const loadEmoji = (code) => {
43 // const api = `https://cdnjs.cloudflare.com/ajax/libs/twemoji/14.0.2/svg/${code.toLowerCase()}.svg`
44 const api = `https://cdn.jsdelivr.net/gh/shuding/fluentui-emoji-unicode/assets/${code.toLowerCase()}_color.svg`
45 return fetch(api).then((r) => r.text())
46}

notionRecurringTasksmain.tsx1 match

@ciebiada•Updated 9 months ago
4
5const DATABASE_ID = "519446a0d3ed47038fffd669b9ece770";
6const notion = new Client({ auth: process.env.NOTION_API_KEY });
7
8const intervalMapping = {

spacexmain.tsx1 match

@ngmi•Updated 9 months ago
1/** @jsxImportSource npm:hono@3/jsx */
2import { frameHtml } from "https://esm.town/v/moe/frameHtml"
3import { getLaunches } from "https://esm.town/v/moe/spacexapi"
4import { homeImage, launchImage } from "https://esm.town/v/moe/spaceximage"
5import { Hono } from "npm:hono"

smallwebmain.tsx1 match

@pinjasaur•Updated 9 months ago
14 const params = new URL(req.url).searchParams;
15 try {
16 const feed = await getText("https://kagi.com/api/v1/smallweb/feed/");
17 const parser = new DOMParser();
18 const atom = parser.parseFromString(feed, "text/html");

fetchIpfsPostsmain.tsx9 matches

@stevedylandev•Updated 9 months ago
5 try {
6 const soRes = await fetch(
7 `https://api.stackexchange.com/2.3/questions?fromdate=${startDate}&todate=${endDate}&order=desc&sort=creation&tagged=upload&site=stackoverflow`,
8 {
9 method: "GET",
24
25 const seRes = await fetch(
26 `https://api.stackexchange.com/2.3/questions?fromdate=${startDate}&todate=${endDate}&order=desc&sort=creation&tagged=s3&site=stackoverflow`,
27 {
28 method: "GET",
42 });
43
44 const fileApiRes = await fetch(
45 `https://api.stackexchange.com/2.3/questions?fromdate=${startDate}&todate=${endDate}&order=desc&sort=creation&tagged=fileapi&site=stackoverflow`,
46 )
47 const fileApiResData = await fileApiRes.json()
48 const fileApiArray = fileApiResData.items;
49 const newFileApiItems = fileApiArray
50 .filter(item => !item.is_answered)
51 .map(item => {
67 }).join("");
68
69 let formattedArray3 = newFileApiItems.map(obj => {
70 return `Post: <a href='${obj.link}'>${obj.title}</a></br>
71Creation Date: ${obj.date} </br> </br>`;
79${formattedArray2}
80
81<h2>Posts about File API</h2></br>
82${formattedArray3}
83`;

OpticonRemindermain.tsx1 match

@augustveix•Updated 9 months ago
26 // return discordWebhook({
27 // url:
28 // "https://discord.com/api/webhooks/1265415063200862231/nNfLgaIb53nFsamMBCjR8telo9HrwE1dlIIkJ5vJdLYLNNFqE3FK8IqAlExMBkQz8S5_",
29 // content: "bobobo",
30 // });

emailMeWhenBadAirQualitymain.tsx5 matches

@bcongdon•Updated 9 months ago
8 long: number;
9}) {
10 // Get date and API key
11 const now = new Date();
12 const apiKey = process.env.WEATHER_BIT_API_KEY;
13 if (!apiKey) {
14 throw new Error("Must define WEATHER_BIT_API_KEY in secrets");
15 }
16 const res = await fetch(
17 `https://api.weatherbit.io/v2.0/current/airquality?lat=${lat}&lon=${long}&key=${apiKey}`,
18 );
19 const jsonObj = await res.json();

easyAQIREADME.md1 match

@bcongdon•Updated 9 months ago
3Get the Air Quality Index (AQI) for a location via open data sources.
4
5It's "easy" because it strings together multiple lower-level APIs to give you a simple interface for AQI.
6
71. Accepts a location in basically any string format (ie "downtown manhattan")

spacexapiREADME.md1 match

@moe•Updated 9 months ago
1Migrated from folder: spacex/spacexapi

FetchBasicREADME.md1 match

@hunty•Updated 9 months ago
1# Framer Fetch: Basic
2
3A basic example of an API endpoint to use with Framer Fetch.

RandomQuoteAPI

@Freelzy•Updated 1 day ago

HAPI7 file matches

@dIgitalfulus•Updated 1 day ago
Kapil01
apiv1