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=21&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 19733 results for "api"(1706ms)

Glancerindex.ts2 matches

@glance•Updated 2 days ago
7
8// Import route modules
9import api from "./routes/api/api.routes.ts";
10import auth from "./routes/auth.ts";
11import root from "./routes/root.routes.ts";
34
35// Mount route modules
36app.route("/api", api);
37app.route("/tasks", tasks);
38app.route("/demo", demo);

Glancerindex.html1 match

@glance•Updated 2 days ago
9 <script src="https://cdn.tailwindcss.com"></script>
10 <link
11 href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap"
12 rel="stylesheet"
13 />

GlancerhealthCheck.ts2 matches

@glance•Updated 2 days ago
5// Initialize Notion client
6const notion = new Client({
7 auth: Deno.env.get("NOTION_API_KEY"),
8});
9
11 return {
12 status: "connected",
13 message: "Successfully connected to Notion API",
14 databases: response.results.map((db) => ({
15 title: db.title?.[0]?.plain_text || "Untitled",

GlancerdemoCache.ts1 match

@glance•Updated 2 days ago
6// Initialize Notion client
7const notion = new Client({
8 auth: Deno.env.get("NOTION_API_KEY"),
9});
10

GlancerApp.tsx6 matches

@glance•Updated 2 days ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { useEffect, useState } from "https://esm.sh/react@18.2.0";
3import { DemoData, isApiError, isNotionPage } from "../index.tsx";
4import { TOC } from "./content/demoTableOfContents.tsx";
5import { GenerateHTML } from "./content/generateHTML.tsx";
54 if (!demoData) return <div>No demo data available</div>;
55
56 // Handle error responses from the API
57 if (isApiError(demoData)) {
58 return (
59 <div>
60 <h3>API Response:</h3>
61 <p>
62 <strong>Status:</strong> {demoData.status}
145 ? "active"
146 : ""
147 } capitalize`}
148 onClick={() => {
149 closeMenu();
224 }}
225 >
226 <h1 className="capitalize">
227 {page.properties.Name?.title?.[0]?.plain_text
228 || "Untitled"}

Glancertasks.routes.ts1 match

@glance•Updated 2 days ago
11// Initialize Notion client
12export const notion = new Client({
13 auth: Deno.env.get("NOTION_API_KEY"),
14});
15

Glancerroot.routes.ts2 matches

@glance•Updated 2 days ago
6// Initialize Notion client
7const notion = new Client({
8 auth: Deno.env.get("NOTION_API_KEY"),
9});
10
21 {
22 status: "error",
23 message: "Failed to connect to Notion API",
24 error: error.message,
25 },

GlancerrelatedPages.controller.ts1 match

@glance•Updated 2 days ago
4// Initialize Notion client
5const notion = new Client({
6 auth: Deno.env.get("NOTION_API_KEY"),
7});
8

Glancer_README.md1 match

@glance•Updated 2 days ago
7### Task endpoints use /controllers to get and save data
8
9In order to keep the API easy to look and work with, the routes in /tasks handle routing but do not get data from or save data to Notion. The functions that connect to Notion live in the /controllers directory, and are _called_ from the endpoints in /tasks.
10
11### Naming convention for routes and controllers

Glancer_README.md1 match

@glance•Updated 2 days ago
1## /api
2
3This directory holds the endpoints that serve JSON for the /demo, and a few other endpoints that handle POSTS and GETs from the /frontend.
Plantfo

Plantfo8 file matches

@Llad•Updated 3 hours ago
API for AI plant info

scrapeCraigslistAPI1 file match

@shapedlines•Updated 1 day ago
apiry
snartapi