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=1494&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 17564 results for "api"(3172ms)

vtApiExamplemain.tsx3 matches

@neverstew•Updated 1 year ago
1import vtApi from "https://esm.town/v/neverstew/vtApi";
2
3const res = await vtApi.GET("/v1/search/vals", {
4 params: { query: { query: "api" } },
5});
6const vals = res.data.data;

vtApiExampleREADME.md1 match

@neverstew•Updated 1 year ago
1Migrated from folder: vtapi/vtApiExample

updateVtApiTypesmain.tsx3 matches

@neverstew•Updated 1 year ago
1import { updateValByName } from "https://esm.town/v/nbbaier/updateValByName?v=14";
2import openapiTS from "npm:openapi-typescript";
3
4export default async () => {
5 const output = await openapiTS("https://www.val.town/docs/openapi.yaml");
6 await updateValByName({
7 token: Deno.env.get("valtown"),
8 name: "vtApiTypes",
9 code: output,
10 });

vtApiTypesREADME.md1 match

@neverstew•Updated 1 year ago
1Migrated from folder: vtapi/vtApiTypes

updateVtApiTypesREADME.md1 match

@neverstew•Updated 1 year ago
1Migrated from folder: vtapi/updateVtApiTypes

cors_proxyREADME.md1 match

@taras•Updated 1 year ago
1```
2curl 'https://taras-free_open_router.web.val.run/api/v1/chat/completions' \
3 -H 'accept: application/json' \
4 -H 'authorization: Bearer THIS_IS_OVERRIDEN_ON_SERVER' \

fetch_docsmain.tsx3 matches

@andreterron•Updated 1 year ago
1import { API_URL } from "https://esm.town/v/std/API_URL";
2
3/**
7 * @param {string | URL | Request} input - The resource to fetch.
8 * @param {RequestInit} [requestInit] - Optional configuration data (HTTP
9 * method, headers, etc) ([Docs ↗](https://deno.land/api@v1.42.1?s=RequestInit))
10 */
11export async function fetch(input: string | URL | Request, requestInit?: RequestInit) {
12 const origReq = new Request(input, requestInit);
13 const url = new URL("/v1/fetch", API_URL);
14 url.searchParams.set("url", origReq.url);
15 const req = new Request(url, origReq);

fetchmain.tsx3 matches

@vladimyr•Updated 1 year ago
1import { API_URL } from "https://esm.town/v/std/API_URL";
2
3/**
7 * @param {string | URL | Request} input - The resource to fetch.
8 * @param {RequestInit} [requestInit] - Optional configuration data (HTTP
9 * method, headers, etc) ([Docs ↗](https://deno.land/api@v1.42.1?s=RequestInit))
10 */
11export async function fetch(input: string | URL | Request, requestInit?: RequestInit) {
12 const origReq = new Request(input, requestInit);
13 const url = new URL("/v1/fetch", API_URL);
14 url.searchParams.set("url", origReq.url);
15 const req = new Request(url, origReq);

sqlitemain.tsx3 matches

@std•Updated 1 year ago
1import { API_URL } from "https://esm.town/v/std/API_URL";
2import { LibsqlError, type TransactionMode } from "npm:@libsql/client";
3import { z } from "npm:zod";
35
36async function execute(statement: InStatement): Promise<ResultSet> {
37 const res = await fetch(`${API_URL}/v1/sqlite/execute`, {
38 method: "POST",
39 headers: {
49
50async function batch(statements: InStatement[], mode?: TransactionMode): Promise<ResultSet[]> {
51 const res = await fetch(`${API_URL}/v1/sqlite/batch`, {
52 method: "POST",
53 headers: {

fetchmain.tsx3 matches

@std•Updated 1 year ago
1import { API_URL } from "https://esm.town/v/std/API_URL";
2import { rawFetch } from "https://esm.town/v/std/rawFetch";
3
8 * @param {string | URL} input - The URL to fetch
9 * @param {RequestInit} [requestInit] - Optional configuration data (HTTP
10 * method, headers, etc) ([Docs ↗](https://deno.land/api@v1.42.1?s=RequestInit))
11 */
12export async function fetch(input: string | URL, requestInit?: RequestInit) {
14 url: input.toString(),
15 });
16 return rawFetch(`${API_URL}/v1/fetch?${query}`, {
17 ...requestInit,
18 headers: {

RandomQuoteAPI

@Freelzy•Updated 19 hours ago

HAPI7 file matches

@dIgitalfulus•Updated 1 day ago
Kapil01
apiv1