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/?q=api&page=220&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 12884 results for "api"(1441ms)

OpenTownieProjects.tsx1 match

@charmaineUpdated 2 weeks ago
10
11async function loader({ bearerToken }: { bearerToken: string }) {
12 const data = await (await fetch("/api/projects-loader", {
13 headers: {
14 "Authorization": "Bearer " + bearerToken,

OpenTowniePreview.tsx1 match

@charmaineUpdated 2 weeks ago
125 onChange={handlePathChange}
126 className="px-2 py-1 text-sm w-32 md:w-40"
127 placeholder="Path (e.g., /api/data)"
128 />
129 <button

OpenTownieLogin.tsx8 matches

@charmaineUpdated 2 weeks ago
4export function Login() {
5 const [bearerToken, setBearerToken] = useLocalStorage("bearer", "");
6 const [anthropicApiKey, setAnthropicApiKey] = useLocalStorage("anthropic_api_key", "");
7
8 return (
11 <div className="text-center mb-8">
12 <h2 className="text-xl sm:text-2xl font-bold text-gray-800 mb-2 tracking-tight">Login to OpenTownie</h2>
13 <p className="text-sm sm:text-base text-gray-600 mb-4">Enter your API keys to get started</p>
14 </div>
15
20 <a
21 target="_blank"
22 href="https://www.val.town/settings/api"
23 className="text-indigo-600 hover:text-indigo-800 font-medium flex items-center transition-colors duration-200"
24 >
25 Val Town API Token
26 <svg
27 xmlns="http://www.w3.org/2000/svg"
78 <label className="block text-sm font-medium text-gray-700">
79 <div className="flex items-center mb-1">
80 <span>Anthropic API Key</span>
81 <a
82 href="https://console.anthropic.com/settings/keys"
91 <input
92 type="password"
93 value={anthropicApiKey}
94 onChange={(e: any) => setAnthropicApiKey(e.target.value)}
95 placeholder="sk-ant-xxxxx"
96 autoComplete="off"
124
125 <div className="text-center text-xs text-gray-500 mt-6 bg-gray-50 p-3 rounded-lg">
126 Your API keys are stored locally in your browser and never stored on our servers.
127 </div>
128 </div>

OpenTownieindex.ts2 matches

@charmaineUpdated 2 weeks ago
10app.get("*", async (c, next) => {
11 const path = c.req.path;
12 if (path.startsWith("/api/") || c.req.header("Accept")?.includes("application/json")) {
13 return next();
14 }
20});
21
22app.route("/api", backend);
23app.get("/frontend/*", c => {
24 return serveFile(c.req.path, import.meta.url);

OpenTownieHome.tsx6 matches

@charmaineUpdated 2 weeks ago
41 </h2>
42 <ol className="list-decimal pl-5 space-y-2 text-gray-700">
43 <li>Login with your Val Town API token</li>
44 <li>Add your Anthropic API key</li>
45 <li>Select a project to work on</li>
46 <li>Chat with Claude about your code</li>
90 </div>
91 <h3 className="font-medium text-gray-800 mb-1">Cost Tracking</h3>
92 <p className="text-sm text-gray-600">See estimated API usage costs for each interaction</p>
93 </div>
94 </div>
124 <ul className="list-disc pl-5 space-y-1 text-gray-700 mb-4">
125 <li>React frontend with TypeScript</li>
126 <li>Hono API server backend</li>
127 <li>Tailwind CSS for styling</li>
128 <li>Web Audio API for sound notifications</li>
129 <li>AI SDK for Claude integration</li>
130 </ul>
131 <p className="text-gray-700">
132 The application proxies requests to the Anthropic API and Val Town API, allowing Claude to view and edit your project files directly.
133 </p>
134 </div>

OpenTownieDirectoryTree.tsx1 match

@charmaineUpdated 2 weeks ago
236 ];
237
238 // Capitalize first letter
239 if (num >= 0 && num <= 10) {
240 const word = words[num];

OpenTownieCreateProject.tsx1 match

@charmaineUpdated 2 weeks ago
32
33 try {
34 const response = await fetch("/api/create-project", {
35 method: "POST",
36 headers: {

OpenTownieCreateBranch.tsx1 match

@charmaineUpdated 2 weeks ago
43
44 try {
45 const response = await fetch("/api/create-branch", {
46 method: "POST",
47 headers: {

OpenTownieChat.tsx5 matches

@charmaineUpdated 2 weeks ago
8import { ChatMessages } from "./ChatMessages.tsx";
9import { ChatInput } from "./ChatInput.tsx";
10import { ApiKeyWarning } from "./ApiKeyWarning.tsx";
11import { processFiles } from "./ImageUpload.tsx";
12import { Preview } from "./Preview.tsx";
15 project,
16 bearerToken,
17 anthropicApiKey,
18 setProject,
19}: {
20 project: any;
21 bearerToken: string;
22 anthropicApiKey: string;
23 setProject: (project: any) => void;
24}) {
57 project,
58 branchId,
59 anthropicApiKey,
60 bearerToken,
61 selectedFiles,
170
171 <div className="p-6 flex flex-col h-full w-full">
172 <ApiKeyWarning show={!anthropicApiKey} />
173
174 <div className="flex flex-col lg:flex-row gap-4">

OpenTownieBranchControl.tsx2 matches

@charmaineUpdated 2 weeks ago
37 setIsLoadingBranches(true);
38 try {
39 const response = await fetch(`/api/project-branches?projectId=${projectId}`, {
40 headers: {
41 "Authorization": `Bearer ${bearerToken}`,
107 const fetchBranches = async () => {
108 try {
109 const response = await fetch(`/api/project-branches?projectId=${projectId}`, {
110 headers: {
111 "Authorization": `Bearer ${bearerToken}`,

vapi-minutes-db1 file match

@henrywilliamsUpdated 1 day ago

vapi-minutes-db2 file matches

@henrywilliamsUpdated 1 day 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