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=fetch&page=11&format=json

For typeahead suggestions, use the /typeahead endpoint:

https://codesearch.val.run/typeahead?q=fetch

Returns an array of strings in format "username" or "username/projectName"

Found 10098 results for "fetch"(505ms)

demo-ai-mamain.js1 match

@h0a•Updated 8 hours ago
94 content.push({ type: 'text', text: prompt });
95
96 const response = await fetch('https://api.anthropic.com/v1/messages', {
97 method: 'POST',
98 headers: {

umbrellaRemindermain.tsx1 match

@louisjrdev•Updated 8 hours ago
1export async function testReminder() {
2 fetch('https://jsonplaceholder.typicode.com/todos/1')
3 .then(response => response.json())
4 .then(json => console.log(json)

umbrellaRemindermain.tsx2 matches

@louisjrdev•Updated 8 hours ago
1import { email } from "https://esm.town/v/std/email?v=9";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
3import { nominatimSearch } from "https://esm.town/v/stevekrouse/nominatimSearch";
4import { weatherGovGrid } from "https://esm.town/v/stevekrouse/weatherGovGrid";
14 lon,
15 });
16 let { properties: { periods } } = await fetchJSON(
17 grid.forecastHourly,
18 );

autonomous-valREADME.md1 match

@abrinz•Updated 8 hours ago
26};
27
28const response = await fetch("https://<your-val-id>.web.val.run/", {
29 method: "POST",
30 headers: {
hubspot

hubspothubspot-perplexity-report3 matches

@charmaine•Updated 8 hours ago
88 const contactId = event.objectId.toString();
89
90 const propertiesToFetch = ["email", "firstname", "lastname"];
91 const contactDetailsSdk = await hubspotClient.crm.contacts.basicApi.getById(
92 contactId,
93 propertiesToFetch,
94 );
95
167 };
168
169 const perplexityResponse = await fetch("https://api.perplexity.ai/chat/completions", {
170 method: "POST",
171 headers: {

TownieuseUser.tsx4 matches

@kenethcosam•Updated 8 hours ago
8 const [error, setError] = useState(null);
9
10 const fetchData = async () => {
11 try {
12 const userEndpoint = new URL(USER_ENDPOINT, window.location.origin);
13
14 const res = await fetch(userEndpoint);
15 const data = await res.json();
16 if (!res.ok) {
33
34 useEffect(() => {
35 fetchData();
36 }, []);
37
38 return { data, loading, error, refetch: fetchData };
39}
40

TownieuseProject.tsx5 matches

@kenethcosam•Updated 8 hours ago
9 const [error, setError] = useState(null);
10
11 const fetchData = async () => {
12 try {
13 const projectEndpoint = new URL(PROJECT_ENDPOINT, window.location.origin);
17 if (branchId) filesEndpoint.searchParams.append("branchId", branchId);
18
19 const { project } = await fetch(projectEndpoint).then((res) =>
20 res.json()
21 );
22 const { files } = await fetch(filesEndpoint).then((res) => res.json());
23
24 setData({ project, files });
34 useEffect(() => {
35 if (!projectId) return;
36 fetchData();
37 }, [projectId, branchId]);
38
39 return { data, loading, error, refetch: fetchData };
40}
41

TownieuseProjects.tsx4 matches

@kenethcosam•Updated 8 hours ago
8 const [error, setError] = useState(null);
9
10 const fetchData = async () => {
11 try {
12 const res = await fetch(ENDPOINT);
13 const data = await res.json();
14 if (!res.ok) {
32
33 useEffect(() => {
34 fetchData();
35 }, []);
36
37 return { data, loading, error, refetch: fetchData };
38}
39

TownieuseCreateProject.tsx1 match

@kenethcosam•Updated 8 hours ago
19 setError(null);
20 try {
21 const res = await fetch(ENDPOINT, {
22 method: "POST",
23 headers: {

TownieuseCreateBranch.tsx1 match

@kenethcosam•Updated 8 hours ago
12 setData(null);
13 setError(null);
14 const res = await fetch(ENDPOINT, {
15 method: "POST",
16 body: JSON.stringify({

agentplex-deal-flow-email-fetch1 file match

@anandvc•Updated 2 days ago

proxyFetch2 file matches

@vidar•Updated 5 days ago