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%20%22Optional%20title%22?q=api&page=1603&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 18017 results for "api"(1317ms)

myApimain.tsx1 match

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

myApimain.tsx1 match

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

fetchWikipediaContentmain.tsx2 matches

@fab1anUpdated 1 year ago
4 try {
5 const title = url.split("/wiki/")[1];
6 const apiUrl = `https://en.wikipedia.org/w/api.php?action=query&prop=extracts&exintro&explaintext&format=json&origin=*&titles=${title}`;
7 const response = await fetch(apiUrl);
8 const data = await response.json();
9 const pageId = Object.keys(data.query.pages)[0];

sendMessagemain.tsx1 match

@ptnUpdated 1 year ago
2
3export async function sendMessage(ptnKey: string, message: string) {
4 await fetch("https://app.phonetonote.com/hooks/zapier", {
5 body: JSON.stringify({
6 ptn_key: ptnKey,

myApimain.tsx1 match

@benfwallaUpdated 1 year ago
1export function myApi(name) {
2 var sentence = "hi " + name;
3 console.email(sentence);

myApimain.tsx1 match

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

myApimain.tsx1 match

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

apimain.tsx1 match

@uuzUpdated 1 year ago
2import { gpt3 } from "https://esm.town/v/patrickjm/gpt3?v=4";
3
4export let api = async ({ prompt = "讲一个笑话" }) => {
5 return gpt3({
6 openAiKey: process.env.openai_key,

githubNotificationsmain.tsx1 match

@pomdtrUpdated 1 year ago
3
4export async function githubNotifications() {
5 const res = await fetch("https://api.github.com/notifications?all=true", {
6 headers: {
7 Authorization: `Bearer ${process.env.GH_TOKEN}`,

nearestOpenStationmain.tsx1 match

@johnmuyskensUpdated 1 year ago
2
3export const nearestOpenStation = async ({ lon, lat }) => {
4 const gbfsDomain = "capitalbikeshare.com";
5 lon = +lon;
6 lat = +lat;

Apiify9 file matches

@wolfUpdated 18 mins ago

dailyQuoteAPI

@SoukyUpdated 2 days ago
Kapil01
apiv1