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=840&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 10974 results for "api"(1809ms)

jsrApimain.tsx2 matches

@vladimyr•Updated 1 year ago
13];
14
15// @see: https://jsr.io/docs/api#package-metadata
16const PkgMetaSchema = v.object({
17 scope: v.string(),
20});
21
22// @see: https://jsr.io/docs/api#package-version-metadata
23const PkgVerMetaSchema = v.object({
24 manifest: v.record(

jsrApi_exampleREADME.md1 match

@vladimyr•Updated 1 year ago
1Migrated from folder: jsr/jsrApi_example

jsrApiREADME.md1 match

@vladimyr•Updated 1 year ago
1Migrated from folder: jsr/jsrApi

CS1200main.tsx1 match

@parkddongddoong•Updated 1 year ago
4async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",
7 );
8 return response.json();

gsheet_callmain.tsx2 matches

@hiteshjoshi•Updated 1 year ago
6 );
7 const googleAuthOptions = {
8 scope: ["https://www.googleapis.com/auth/spreadsheets"],
9 };
10 const token = await getToken(service_account, googleAuthOptions);
11 const result = fetchJSON(
12 `https://sheets.googleapis.com/v4/spreadsheets/${sheet_id}/${action}`,
13 {
14 method,

fetchValmain.tsx2 matches

@vladimyr•Updated 1 year ago
1// SPDX-License-Identifier: 0BSD
2import { API_URL } from "https://esm.town/v/std/API_URL?v=5";
3import ky from "npm:ky";
4import * as v from "npm:valibot";
25
26export async function fetchVal(author: string, name: string) {
27 const prefixUrl = new URL("/v1/alias", API_URL);
28 const resp = await ky.get(`${author}/${name}`, { prefixUrl }).json();
29 return v.parse(ValSchema, resp);

codemirror_demoREADME.md1 match

@edjw•Updated 1 year ago
8- [theme](https://github.com/vadimdemedes/thememirror/tree/main/source/themes)
9
10## API
11
12You can access the code using the `code` property:

gsheet_callREADME.md3 matches

@apois•Updated 1 year ago
1# gsheet_call
2Wrapper around Google Sheets API v4.
3
4## Parameters
6- sheet_id: Google Sheet ID
7- method: HTTP method to use
8- action: Full URL with `https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}/` removed
9- data: HTTP request body
10
11## Requirements
12- a Google Cloud service account
13- the Google Sheets API v4 enabled in your Google Cloud project
14- the spreadsheet ID (provide it in the sheet_id parameter)
15

gsheet_callmain.tsx2 matches

@apois•Updated 1 year ago
6 );
7 const googleAuthOptions = {
8 scope: ["https://www.googleapis.com/auth/spreadsheets"],
9 };
10 const token = await getToken(service_account, googleAuthOptions);
11 const result = fetchJSON(
12 `https://sheets.googleapis.com/v4/spreadsheets/${sheet_id}/${action}`,
13 {
14 method,

amaranthYakmain.tsx2 matches

@stevekrouse•Updated 1 year ago
23 <head>
24 <title>SQLite Explorer</title>
25 <link rel="preconnect" href="https://fonts.googleapis.com" />
26 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
27 <link
28 href="https://fonts.googleapis.com/css2?family=Fira+Code:wght@300..700&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap"
29 rel="stylesheet"
30 />

daily-advice-app1 file match

@dcm31•Updated 2 days ago
Random advice app using Advice Slip API

gptApiTemplate1 file match

@charmaine•Updated 3 days ago
apiv1
papimark21