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=1385&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 15629 results for "api"(4669ms)

openstreetmapAPIexamplemain.tsx2 matches

@tmcw•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const openstreetmapAPIexample = (async () => {
4 return (await fetch("https://api.openstreetmap.org/api/0.6/node/1", {
5 headers: { accept: "application/json" },
6 })).json();

apiExamplemain.tsx1 match

@stevekrouse•Updated 1 year ago
1import { runVal } from "https://esm.town/v/std/runVal";
2
3export const apiExample = runVal("patrickjm.gpt3", {
4 prompt: "write me a limerick about sandboxing javascript",
5});

nakedAPIExmain.tsx1 match

@stevekrouse•Updated 1 year ago
1export function nakedAPIEx(req, res) {
2 res.send("my returned srting");
3}

runValmain.tsx2 matches

@std•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2import { API_URL } from "https://esm.town/v/std/API_URL";
3
4export function runVal(name, ...args) {
5 return fetch(`${API_URL}/v1/run/${name.replace("@", "")}`, {
6 method: "POST",
7 body: JSON.stringify({

myApimain.tsx1 match

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

api2main.tsx1 match

@endingwithali•Updated 1 year ago
1export function api2(req, res) {
2 res.send("<script>alert('hellow')</script>");
3}

myApimain.tsx1 match

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

hnFollowPollJobmain.tsx1 match

@sunkid•Updated 1 year ago
3export async function hnFollowPollJob({ lastRunAt }) {
4 untitled6313446 = fetch(
5 "https://market-backend.api.2gis.ru/5.0/product/items?q=water&point1=37.87550034485333,51.32652258650344&point2=37.94900977933917,51.293266520365684&locale=ru_RU&page=1&page_size=12&feature_config=categories_without_fake_first_level,range_price_type_supported,from_price_type_supported"
6 );
7}

myApimain.tsx1 match

@matallo•Updated 1 year ago
1export function myApi(name) {
2 console.email;
3 return "hi " + name;

emailNowcastPMAqimain.tsx1 match

@russbiggs•Updated 1 year ago
7
8 let res = await fetchJSON(
9 "https://api.openaq.org/v2/measurements?" +
10 new URLSearchParams({
11 limit: "100",

googleGeminiAPI2 file matches

@michaelwschultz•Updated 5 hours ago

HN-fetch-call2 file matches

@ImGqb•Updated 3 days ago
fetch HackerNews by API
Kapil01
apiv1