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/$%7Burl%7D?q=api&page=993&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 12372 results for "api"(4732ms)

1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3await fetchJSON("https://api.val.town/v1/vals", {
4 headers: {
5 Authorization: `Bearer ${Deno.env.get("valtown")}`,

sqliteStylemain.tsx1 match

@stevekrouseUpdated 1 year ago
148 font-size: 1rem;
149 font-family: var(--main-font);
150 text-transform: capitalize;
151 display: flex;
152 align-items: center;
1// https://api.val.town/v1/express/liamdanielduffy.reactTodoListWebsite
2export const REACT_TODO_LIST_CONTENTS = {
3 body: `<div id="root"></div>

submitPRREADME.md2 matches

@nbbaierUpdated 1 year ago
1# Submit a PR from Val Town
2
3This val provides a (very) thin wrapper around the GH rest API methods for creating a pull request. It handles the creation of a Octokit client for you.
4
5## Usage
20## Parameters
21
22The function takes two parameters: your gh access token and an object that's identical to the object submitted to the gh API. See [GH's documentation](https://docs.github.com/en/rest/pulls/pulls?apiVersion=2022-11-28#create-a-pull-request) for more info!
23
24

aliasmain.tsx1 match

@stevekrouseUpdated 1 year ago
3export function alias<P extends Params>(params: P): Promise<Result<P>> {
4 const username = params.username;
5 let url = `https://api.val.town/v1/alias/${username}`;
6 if ("valName" in params)
7 url = url + `/${params.valName}`;

telegramWebhookEchoMessagemain.tsx1 match

@enyoUpdated 1 year ago
4 // Verify this webhook came from our bot
5 if (
6 req.headers.get("x-telegram-bot-api-secret-token")
7 !== Deno.env.get("telegramWebhookSecret")
8 ) {

muxWebhookHandlermain.tsx1 match

@mmccUpdated 1 year ago
5
6const replicate = new Replicate({
7 auth: process.env.REPLICATE_API_TOKEN,
8});
9

scrape2mdREADME.md1 match

@tarasUpdated 1 year ago
11
12### TODO
13https://chatcraft.org/api/share/tarasglek/IDYChVAilfePgVZb_T5pH POST from browser
14https://www.val.town/v/nbbaier/valToGH sync to github
15

wikipediaPagemain.tsx3 matches

@jamiedubsUpdated 1 year ago
11
12 try {
13 const apiUrl =
14 `https://en.wikipedia.org/w/api.php?action=query&prop=extracts&exintro&explaintext&format=json&origin=*&titles=${
15 encodeURIComponent(title)
16 }`;
17 const response = await fetch(apiUrl);
18 if (!response.ok) {
19 throw new Error(`HTTP error! status: ${response.status}`);

syntheticLootmain.tsx1 match

@jamiedubsUpdated 1 year ago
4
5// I <3 ether.actor, very convenient for fetching on-chain data
6// it's a little slow - Alchemy or another RPC/API provider would be faster
7const url = `https://ether.actor/0x869ad3dfb0f9acb9094ba85228008981be6dbdde/tokenURI`;
8

social_data_api_project3 file matches

@tsuchi_yaUpdated 2 days ago

simple-scrabble-api1 file match

@bryUpdated 6 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