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/$%7Bsuccess?q=api&page=979&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 12214 results for "api"(1226ms)

market_kelly_betmain.tsx1 match

@caseUpdated 1 year ago
35
36async function getMarket(slug: string) {
37 const res = await fetch(`https://api.manifold.markets/v0/slug/${slug}`);
38
39 if (!res.ok) {

getThreadsActivitymain.tsx1 match

@glommerUpdated 1 year ago
20
21async function getNewThreads() {
22 const resp = await fetch(`https://discord.com/api/guilds/${guild}/threads/active`, {
23 headers: {
24 "Authorization": `Bot ${token}`,

val2imgmain.tsx1 match

@pomdtrUpdated 1 year ago
7 const title = `@${author}/${name}`;
8
9 const resp = await fetch(`https://api.val.town/v1/alias/${author}/${name}`, {
10 headers: {
11 Authorization: `Bearer ${Deno.env.get("valtown")}`,

rpcREADME.md4 matches

@zarutianUpdated 1 year ago
1# RPC
2
3Turn any function into an API! This lets you call a function in Val Town without manually handling a `Request` or `Response` object.
4
5This val can be used as a replacement for the Run API, which implicitly did something similar.
6
7## Create an API from your function:
8
9This is how you can expose a function as an API:
10
111. Create an HTTP handler val

blogmain.tsx2 matches

@pomdtrUpdated 1 year ago
1// title: How does this work ?
2
3import { api } from "https://esm.town/v/pomdtr/api";
4import { article } from "https://esm.town/v/pomdtr/article";
5import { extractMetadata } from "https://esm.town/v/pomdtr/extractMetadata";
62
63async function findMyArticles() {
64 let { data: articles } = await api(`/v1/search/vals?query=${encodeURIComponent("#blog")}`);
65
66 return articles.filter(val => {

uploadByURLmain.tsx1 match

@stevedylandevUpdated 1 year ago
9 const data = new FormData()
10 data.append("file", blob)
11 const upload = await fetch('https://api.pinata.cloud/pinning/pinFileToIPFS', {
12 method: 'POST',
13 headers: {

search_heroiconsmain.tsx1 match

@pomdtrUpdated 1 year ago
2
3export default async function(ctx: BrowserContext) {
4 const resp = await fetch("https://api.iconify.design/collection?prefix=heroicons");
5 if (!resp.ok) {
6 throw new Error(await resp.text());

sqliteExplorerAppREADME.md1 match

@nbbaierUpdated 1 year ago
13## Authentication
14
15Login to your SQLite Explorer with [password authentication](https://www.val.town/v/pomdtr/password_auth) with your [Val Town API Token](https://www.val.town/settings/api) as the password.
16
17## Todos / Plans

glifJsonmain.tsx1 match

@cjpaisUpdated 1 year ago
12 return randomItems;
13 };
14 const url = `https://alpha.glif.xyz/api/glifs?id=${id}`;
15 try {
16 const response = await fetch(url);

mgsrBotEndpointmain.tsx1 match

@raymanUpdated 1 year ago
49 JSON.stringify(
50 await (await fetch(
51 "https://api.val.town/v1/eval/"
52 + encodeURIComponent(req.body.data.options[0].value),
53 {

social_data_api_project3 file matches

@tsuchi_yaUpdated 2 days ago

simple-scrabble-api1 file match

@bryUpdated 5 days ago
papimark21
socialdata
Affordable & reliable alternative to Twitter API: ➡️ Access user profiles, tweets, followers & timeline data in real-time ➡️ Monitor profiles with nearly instant alerts for new tweets, follows & profile updates ➡️ Simple integration