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=1012&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 12456 results for "api"(2635ms)

getBlockFeesmain.tsx1 match

@aryanjUpdated 1 year ago
2
3export default async function(req: Request): Promise<Response> {
4 const blockFeesResp = await fetch("https://mempool.space/api/v1/mining/blocks/fees/3y");
5 const blockFees = await blockFeesResp.json();
6

getHashratemain.tsx1 match

@aryanjUpdated 1 year ago
2
3export const handler = async () => {
4 const resp = await fetch("https://mempool.space/api/v1/mining/hashrate/3y");
5 const { difficulty, hashrates } = await resp.json();
6

traced_http_valmain.tsx1 match

@saolsenUpdated 1 year ago
4 traced_handler,
5} from "https://esm.town/v/saolsen/tracing?v=126";
6import { trace } from "npm:@opentelemetry/api";
7
8init("traced_http_val");

plausibleREADME.md1 match

@saolsenUpdated 1 year ago
4
5I've been using `saolsen.val-name`.
6Note that there is no auth for the plausible events API, so if somebody forks the val it'll still work but
7track all their val page loads in your dashboard which is kinda weird but also kinda cool, idk.
8

testFetchCommentsValmain.tsx15 matches

@willthereaderUpdated 1 year ago
6export const testFetchCommentsVal = async () => {
7 const urls = [
8 "https://www.readtangle.com/members/api/comments/?post_id=0%3A6",
9 "https://www.readtangle.com/members/api/comments/?post_id=0%3A6",
10 "https://www.readtangle.com/members/api/comments/?post_id=0%3A6",
11 "https://www.readtangle.com/members/api/comments/?post_id=0%3A6",
12 "https://www.readtangle.com/members/api/comments/?post_id=0%3A6",
13 "https://www.readtangle.com/members/api/comments/?post_id=0%3A6",
14 "https://www.readtangle.com/members/api/comments/?post_id=0%3A6",
15 "https://www.readtangle.com/members/api/comments/?post_id=0%3A6",
16 "https://www.readtangle.com/members/api/comments/?post_id=0%3A6",
17 "https://www.readtangle.com/members/api/comments/?post_id=0%3A6",
18 "https://www.readtangle.com/members/api/comments/?post_id=0%3A6",
19 "https://www.readtangle.com/members/api/comments/?post_id=0%3A6",
20 "https://www.readtangle.com/members/api/comments/?post_id=0%3A6",
21 "https://www.readtangle.com/members/api/comments/?post_id=0%3A6",
22 "https://www.readtangle.com/members/api/comments/?post_id=0%3A6",
23 ]; // Await the resolution of the promise from testUrlConstructionVal
24 await fetchComments(urls); // Now urls is an array, so it can be passed to fetchComments

runGistmain.tsx1 match

@pomdtrUpdated 1 year ago
27 }
28
29 const gist = await fetchJSON(`https://api.github.com/gists/${id}`);
30 if (gist.owner.login != author) {
31 return new Response("Unauthorized", {

myApimain.tsx1 match

@chrisk_7777Updated 1 year ago
1let { userCount } = await import("https://esm.town/v/chrisk_7777/userCount");
2
3export function myApi(name) {
4 if (!userCount) {
5 userCount = [];

connect4_mcts_agentmain.tsx1 match

@saolsenUpdated 1 year ago
1import { init, traced_handler } from "https://esm.town/v/saolsen/tracing?v=109";
2import { trace } from "npm:@opentelemetry/api";
3init("connect4_mcts_agent");
4const tracer = trace.getTracer("connect4_mcts_agent");

zohoDeskApimain.tsx1 match

@julbrsUpdated 1 year ago
28): Promise<{ data: Ticket[] }> => {
29 const responseDesk = await axios.get(
30 `https://desk.zoho.com/api/v1/tickets`,
31 {
32 params: {

twitterWrappermain.tsx2 matches

@stevekrouseUpdated 1 year ago
13
14 let url = new URL(req.url);
15 console.log("https://api.twitter.com" + url.pathname + url.search);
16 return Response.json(
17 await twitterJSON({
18 url: "https://api.twitter.com/" + url.pathname + url.search,
19 bearerToken: Deno.env.get("twitter"),
20 }),

vapi-minutes-db2 file matches

@henrywilliamsUpdated 4 hours ago

social_data_api_project3 file matches

@tsuchi_yaUpdated 3 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