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%22Optional%20title%22?q=api&page=958&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 13806 results for "api"(1229ms)

valSessionmain.tsx3 matches

@maxm•Updated 5 months ago
101 <pre><code class="language-typescript">import { ValSession } from "${rawUrl}";
102
103// Generate a token from your valtown api key.
104const token = await ValSession.new(Deno.env.get("valtown"));
105
127});
128
129type valSessionApi = typeof routes;
130
131const client = hc<valSessionApi>(httpEndpoint);
132
133export class ValSession {

bskymain.tsx1 match

@wilhelm•Updated 5 months ago
6
7export default async function(req: Request): Promise<Response> {
8 const url = "https://public.api.bsky.app/xrpc/app.bsky.feed.getAuthorFeed?actor=wilb.me&filter=posts_no_replies";
9
10 const data: Feed = await fetch(url).then((r) => r.json());

bskyREADME.md1 match

@wilhelm•Updated 5 months ago
1Showing my BlueSky posts using their public API

peacefulYellowBoamain.tsx1 match

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

scientificSalmonBonobomain.tsx1 match

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

obedientPeachPheasantmain.tsx1 match

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

invincibleTanMarmosetmain.tsx1 match

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

expertCoralDinosaurmain.tsx1 match

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

JokeGeneratorRealmain.tsx1 match

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

scribemain.tsx4 matches

@yawnxyz•Updated 5 months ago
8const groq = new Groq();
9import { HfInference } from "npm:@huggingface/inference";
10const hf = new HfInference(Deno.env.get("HUGGINGFACE_API_KEY"));
11
12const MAX_CHUNK_SIZE_BYTES = 25 * 1024 * 1024; // 25 MB in bytes
484
485Example:
486Transcript: "We need to implement a REST API with proper CRUD operations"
487Response: "REST API: Style of web API using HTTP methods. CRUD: Create, Read, Update, Delete - basic data operations."
488
489Transcript: "Let's grab coffee later"
664 if (sessionToken) {
665 try {
666 const response = await fetch(`${AUTH_SERVICE_URL}/api/auth/user`, {
667 headers: {
668 'Cookie': cookies,

new-val-api-demo

@shouser•Updated 4 hours ago
This is an example of using the API to create a val.

groq-api2 file matches

@cameronpak•Updated 8 hours ago
mux
Your friendly, neighborhood video API.
api