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=1072&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 11798 results for "api"(1399ms)

wttrAstronomyToHTMLTablemain.tsx2 matches

@rwevUpdated 1 year ago
1import { snakeToTitleCase } from "https://esm.town/v/rwev/snakeToTitleCase";
2import { wrapInHTMLElements } from "https://esm.town/v/rwev/wrapInHTMLElements";
3
4export async function wttrAstronomyToHTMLTable(
7 let html = ``;
8 const R = await import("npm:ramda");
9 const wrapFn = R.curry(wrapInHTMLElements);
10 const headers = [
11 "date",

myApimain.tsx1 match

@sokratisUpdated 1 year ago
1export function myApi(name) {
2 console.log("Hello world!");
3 return "hi " + name;

bitlyAPImain.tsx2 matches

@galliganUpdated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export let bitlyAPI = ({ token, endpoint, ...params }) => {
4 if (params.body) {
5 params.body = JSON.stringify(params.body);
6 }
7 return fetchJSON(
8 `https://api-ssl.bitly.com/v4/${endpoint}`,
9 {
10 headers: {

getValTownTrpcmain.tsx1 match

@pomdtrUpdated 1 year ago
4 links: [
5 httpLink({
6 url: "https://www.val.town/api/trpc",
7 }),
8 ],

sunbeamValTownFnmain.tsx4 matches

@pomdtrUpdated 1 year ago
7 // extension manifest
8 app.get("/", async (c) => {
9 const resp = await fetch("https://api.val.town/v1/me", {
10 headers: {
11 Authorization: `Bearer ${valtownToken}`,
50 const { user } = params;
51 const endpoint = query
52 ? `https://api.val.town/v1/search/vals?query=${
53 encodeURIComponent(query)
54 }`
55 : `https://api.val.town/v1/users/${user}/vals`;
56 const resp = await fetch(endpoint, {
57 headers: {
96 app.post("/view-val", async (c) => {
97 const { params } = await c.req.json();
98 const resp = await fetch(`https://api.val.town/v1/vals/${params.val}`, {
99 headers: {
100 Authorization: `Bearer ${valtownToken}`,

myApimain.tsx1 match

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

checkRyanairmain.tsx2 matches

@SlugeRUpdated 1 year ago
11 // Currently only returns 1 flight..
12 // possible v4 endpoint here:
13 // https://www.ryanair.com/api/farfnd/v4/roundTripFares?departureAirportIataCode=STN&outboundDepartureDateFrom=2023-11-01&market=en-gb&adultPaxCount=1&arrivalAirportIataCode=RBA&searchMode=ALL&outboundDepartureDateTo=2023-11-30&inboundDepartureDateFrom=2023-11-01&inboundDepartureDateTo=2023-12-03&outboundDepartureDaysOfWeek=THURSDAY&durationFrom=1&durationTo=7&outboundDepartureTimeFrom=00:00&outboundDepartureTimeTo=23:59&inboundDepartureTimeFrom=00:00&inboundDepartureTimeTo=23:59
14 // possibly more info in this gist: https://gist.github.com/vool/bbd64eeee313d27a82ab
15 //
16 const BASE_URL = "https://services-api.ryanair.com/farfnd/3/";
17 const AIRPORT_FROM = "VNO";
18 const AIRPORT_TO = "MLA";

currencymain.tsx1 match

@csellisUpdated 1 year ago
3export let currency = async (base = "usd", desired?: string = "php") => {
4 let { rates } = await fetchJSON(
5 `https://open.er-api.com/v6/latest/${base}`,
6 );
7 return rates;

myApimain.tsx1 match

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

myApimain.tsx1 match

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

social_data_api_project3 file matches

@tsuchi_yaUpdated 5 hours ago

new-val-api-21 file match

@shouserUpdated 16 hours ago
This is an example of using the API to create a val.
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