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=998&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 11659 results for "api"(2173ms)

myApimain.tsx1 match

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

githubStarredmain.tsx1 match

@mklwlodUpdated 1 year ago
3// GitHub starred repos
4export let githubStarred = fetchJSON(
5 "https://api.github.com/users/klapacz/starred"
6);

starWarsmain.tsx2 matches

@kallevUpdated 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);

myApimain.tsx1 match

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

bookReservationOnResymain.tsx7 matches

@alpUpdated 1 year ago
30}) => {
31 const { z } = await import("npm:zod");
32 const RESY_API_URL = "https://api.resy.com";
33 const RESY_DEFAULT_HEADERS = {
34 accept: "application/json, text/plain, */*",
35 "accept-encoding": "gzip, deflate, br",
36 "accept-language": "en-US,en;q=0.9",
37 authorization: 'ResyAPI api_key="VbWk7s3L4KiK5fzlO7JD3Q5EYolJI7n5"',
38 "x-origin": "https://resy.com",
39 origin: "https://resy.com/",
143 params.email
144 )}&password=${encodeURIComponent(params.password)}`;
145 const response = await fetch(`${RESY_API_URL}/3/auth/password`, {
146 method: "POST",
147 body: body,
164 seats: number;
165 }) => {
166 const url = `${RESY_API_URL}/3/details`;
167 const response = await fetch(url.toString(), {
168 method: "POST",
183 seats: number;
184 }) => {
185 const url = `${RESY_API_URL}/4/find`;
186 const searchParams = new URLSearchParams();
187 searchParams.set("lat", "0");
206 city: string;
207 }) => {
208 const url = `${RESY_API_URL}/3/venue`;
209 const searchParams = new URLSearchParams();
210 searchParams.set("url_slug", params.slug);
222 authToken: string;
223 }) => {
224 const response = await fetch(`${RESY_API_URL}/3/book`, {
225 method: "POST",
226 headers: {

myApimain.tsx1 match

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

myApimain.tsx1 match

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

ipmain.tsx1 match

@hanuUpdated 1 year ago
1import { fetchJSON } from "https://esm.town/v/hanu/fetchJSON";
2
3export let ip = await fetchJSON("https://api.ipify.org?format=json");

geolocationmain.tsx1 match

@juliendorraUpdated 1 year ago
2 const ip = req.options.headers["x-forwarded-for"];
3 const jsonresponse = await $stevekrouse.fetchJSON(
4 `http://ip-api.com/json/${ip}`
5 );
6 res.json({ ip: req });

myApimain.tsx1 match

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

new-val-api-21 file match

@shouserUpdated 18 hours ago
This is an example of using the API to create a val.

gptApiTemplate2 file matches

@charmaineUpdated 2 days 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