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=1373&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 14963 results for "api"(2249ms)

myApimain.tsx1 match

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

myApimain.tsx1 match

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

myApimain.tsx1 match

@caseywoolley•Updated 1 year ago
1export function myApi(name, welcome) {
2 return "hi " + name + `, ${welcome}`;
3}

upscaleThisUrlmain.tsx2 matches

@liamdanielduffy•Updated 1 year ago
3
4export const upscaleThisUrl = async (req, res) => {
5 const authToken = process.env.REPLICATE_API_TOKEN;
6 const url = "https://api.replicate.com/v1/predictions";
7 const jobId = req.body.jobId;
8 const imageUrl = req.body.imageUrl;

emailGithubReactionsmain.tsx1 match

@vtdocs•Updated 1 year ago
8 const username = "stevekrouse";
9 const events = await fetchJSON(
10 `https://api.github.com/users/${username}/events?per_page=100`,
11 {
12 headers: {

discordFetchmain.tsx1 match

@vtdocs•Updated 1 year ago
6 while (true) {
7 res = await fetchJSON(
8 `https://discord.com/api${route}`,
9 {
10 method,

resyPublicAPIKeymain.tsx1 match

@vtdocs•Updated 1 year ago
1export const resyPublicAPIKey = "VbWk7s3L4KiK5fzlO7JD3Q5EYolJI7n5";

resyVenueIdFromSlugAndCitymain.tsx3 matches

@vtdocs•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2import { resyPublicAPIKey } from "https://esm.town/v/vtdocs/resyPublicAPIKey";
3
4export const resyVenueIdFromSlugAndCity = async (
10}> => {
11 const venueRes = await fetch(
12 `https://api.resy.com/3/venue?url_slug=${slug}&location=${city}`,
13 {
14 "headers": {
15 "authorization":
16 `ResyAPI api_key="${resyPublicAPIKey}"`,
17 "x-resy-auth-token": resyToken,
18 "x-resy-universal-auth": resyToken,

myApimain.tsx1 match

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

weatherTestmain.tsx1 match

@ktm•Updated 1 year ago
3export async function weatherTest(lat, long) {
4 return "hi";
5 const URL = `https://api.weather.gov/points/${lat},${long}`;
6 return URL;
7 const res = await fetch(URL);

HN-fetch-call2 file matches

@ImGqb•Updated 10 hours ago
fetch HackerNews by API

token-server1 file match

@kwhinnery_openai•Updated 1 day ago
Mint tokens to use with the OpenAI Realtime API for WebRTC
rapilot330
Kapil01