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=api&page=1000&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 10997 results for "api"(1648ms)

testAndroidBingAppsmain.tsx1 match

@xuangong•Updated 1 year ago
5 const { default: axios } = await import("npm:axios");
6 const url =
7 "https://sapphire.api.microsoftapp.net/config/api/v1/get?setmkt=en-us&setplatform=android&setchannel=production&settenant=sapphire-bing";
8 try {
9 const response = await fetch(url, {

weddingAPImain.tsx1 match

@schwanksta•Updated 1 year ago
5sending an email each time. I'm using this to send this information
6to an RSVP sheet. */
7export let weddingAPI = (guest, yesno, count, additional, email) => {
8 const gsheet_append_example = gsheet_call(
9 process.env.google_service_account, // This is the file you download from the service account in Google. Just paste it in.

myApimain.tsx3 matches

@parweb•Updated 1 year ago
1import { myApi as myApi2 } from "https://esm.town/v/parweb/myApi";
2
3export function myApi(name) {
4 return myApi2("chris");
5}

pushovermain.tsx2 matches

@meatcar•Updated 1 year ago
2
3// Send a pushover message.
4// token, user, and other opts are as specified at https://pushover.net/api
5export async function pushover({ token, user, message, title, url, ...opts }) {
6 return await fetch("https://api.pushover.net/1/messages.json", {
7 method: "POST",
8 body: JSON.stringify({

myApimain.tsx1 match

@onemanwenttomow•Updated 1 year ago
1export function myApi(name) {
2 return "hello " + name + " 🎉";
3}

myApimain.tsx1 match

@ralphite•Updated 1 year ago
1export function myApi(name) {
2 return "hi " + name;
3}

githubReposmain.tsx1 match

@eburrito•Updated 1 year ago
3// GitHub repos
4export let githubRepos = fetchJSON(
5 "https://api.github.com/users/stevekrouse/repos"
6);

getSeattleSubwayTweetsmain.tsx1 match

@steven•Updated 1 year ago
3export let getSeattleSubwayTweets = async (request: Request): Promise<Response> => {
4 let data = await fetch(
5 `https://api.apify.com/v2/acts/quacker~twitter-url-scraper/runs/last/dataset/items?token=apify_api_wi6mnWH8aJ5yiwv3ePmYV7BI31yTE13ameye`,
6 );
7 let jsonData = await data.json();

myApimain.tsx1 match

@iyzg•Updated 1 year ago
1export function myApi(name) {
2 return "hi " + name;
3}

qq_svgmain.tsx2 matches

@envl•Updated 1 year ago
17 // stars for user
18 if (!repo) {
19 stars = await fetch(`https://api.github.com/users/${user}/repos`)
20 .then((r) => r.json())
21 .then((d) =>
26 else {
27 const res = await fetch(
28 `https://api.github.com/search/repositories?q=${user}/${repo}`,
29 );
30 const data = await res.json();

daily-advice-app1 file match

@dcm31•Updated 2 days ago
Random advice app using Advice Slip API

gptApiTemplate1 file match

@charmaine•Updated 3 days ago
apiv1
papimark21