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%22Image%20title%22?q=api&page=1054&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 11844 results for "api"(1021ms)

myApimain.tsx1 match

@mik639•Updated 1 year ago
1import { greet } from "https://esm.town/v/mik639/greet";
2
3export function myApi(name) {
4 console.email(greet(name), "Test email");
5}

myApimain.tsx1 match

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

getAaveV2Liquidationsmain.tsx1 match

@alexandre•Updated 1 year ago
8 );
9 const result = await fetch(
10 "https://gateway.thegraph.com/api/6e951d2948be69a241891fb15ec9cefb/deployments/id/QmYN4ofRb5CUg1WdpLhhNTVCuiiAt29hBKGjTnnxYh9zYt",
11 {
12 "headers": {

hasValTownStyleGuideUpdatedmain.tsx1 match

@stevekrouse•Updated 1 year ago
5export let hasValTownStyleGuideUpdated = async (since: Date) => {
6 let commits = await fetchJSON(
7 "https://api.github.com/repos/val-town/val.town/commits?path=/src/style.tsx&since=" +
8 since.toISOString(),
9 {

dsnyEventsFeedmain.tsx1 match

@tmcw•Updated 1 year ago
4 const ics = await import("npm:ics");
5 const events = await fetch(
6 "https://a827-donatenyc.nyc.gov/DSNYApi/api/Events/GetAllByBorough?borough=",
7 )
8 .then((r) => r.json());

chessTimemain.tsx1 match

@tmcw•Updated 1 year ago
3export let chessTime = (async () => {
4 const { secondsToHours } = await import("npm:date-fns");
5 const stats = await fetch("https://lichess.org/api/user/tmcw").then((r) =>
6 r.json()
7 );

unserializeableLogExmain.tsx3 matches

@stevekrouse•Updated 1 year ago
2
3export let unserializeableLogEx = (async () => {
4 const { Configuration, OpenAIApi } = await import("npm:openai");
5 const configuration = new Configuration({
6 apiKey: process.env.openai,
7 });
8 const openai = new OpenAIApi(configuration);
9 console.log(openai);
10})();
1import { testMutateSemantics } from "https://esm.town/v/stevekrouse/testMutateSemantics";
2
3export const unauthenticatedCantMutateThroughBadSetter = (api) =>
4 testMutateSemantics({
5 stateName: "@stevekrouse.testState",
6 api,
7 mutateExpected: false,
8 mutator: (now) => `@steveVT.mutateTestStateBad(${now})`,
1import { testMutateSemantics } from "https://esm.town/v/stevekrouse/testMutateSemantics";
2
3export const unauthenticatedCanMutateThroughSetter = (api) =>
4 testMutateSemantics({
5 stateName: "@stevekrouse.testState",
6 api,
7 mutateExpected: true,
8 mutator: (now) => `@stevekrouse.mutateTestState(${now})`,

referencesmain.tsx1 match

@stevekrouse•Updated 1 year ago
24}[]> {
25 const res = await fetchJSON(
26 "https://api.val.town/v1/me/references?" +
27 searchParams({
28 since: since?.toISOString(),

simple-scrabble-api1 file match

@bry•Updated 12 hours ago

social_data_api_project3 file matches

@tsuchi_ya•Updated 20 hours ago
apiv1
papimark21