{"id":22533418,"url":"https://github.com/kamilstanuch/google-apps-script-exa","last_synced_at":"2025-07-25T20:06:13.019Z","repository":{"id":259769119,"uuid":"879385548","full_name":"kamilstanuch/google-apps-script-exa","owner":"kamilstanuch","description":"Google Apps Script library for Exa.ai API integration.","archived":false,"fork":false,"pushed_at":"2024-10-27T19:30:06.000Z","size":751,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-16T09:16:41.978Z","etag":null,"topics":["api-client","exa","exaai","google-apps-script","google-apps-script-library","google-workspace","javascript","search-engine","semantic-search","web-search"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kamilstanuch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-27T19:03:16.000Z","updated_at":"2025-04-29T17:08:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"94e06acc-37bb-4ea7-be12-25ff3c5f2e35","html_url":"https://github.com/kamilstanuch/google-apps-script-exa","commit_stats":null,"previous_names":["kamilstanuch/google-apps-script-exa"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kamilstanuch/google-apps-script-exa","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamilstanuch%2Fgoogle-apps-script-exa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamilstanuch%2Fgoogle-apps-script-exa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamilstanuch%2Fgoogle-apps-script-exa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamilstanuch%2Fgoogle-apps-script-exa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kamilstanuch","download_url":"https://codeload.github.com/kamilstanuch/google-apps-script-exa/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamilstanuch%2Fgoogle-apps-script-exa/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267054009,"owners_count":24028203,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-25T02:00:09.625Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-client","exa","exaai","google-apps-script","google-apps-script-library","google-workspace","javascript","search-engine","semantic-search","web-search"],"created_at":"2024-12-07T09:08:13.204Z","updated_at":"2025-07-25T20:06:12.969Z","avatar_url":"https://github.com/kamilstanuch.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Exa.ai for Google Apps Script\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nAn unofficial Google Apps Script client for the Exa.ai API. This library provides a simple way to use Exa.ai's semantic search capabilities directly in Google Apps Script projects.\n\n![Exa.ai Google Apps Script Demo](exa_ai_google_apps_script.gif)\n\n## 🌟 Features\n\n- Full compatibility with Exa.ai API\n- Similar interface to the official `exa-js` npm package\n- Easy integration with Google Apps Script\n- Support for all Exa.ai search types and filters\n- Detailed logging for debugging\n- Comprehensive documentation and examples\n\n## 📋 Prerequisites\n\n1. An Exa.ai account and API key ([Get one here](https://exa.ai))\n2. Access to Google Apps Script ([script.google.com](https://script.google.com))\n\n## 🚀 Quick Start\n\n1. Open your Google Apps Script project\n2. Copy the contents of `exa.gs` into your project\n3. Set up your Exa.ai API key in Script Properties:\n   - Go to File -\u003e Project Settings -\u003e Script Properties\n   - Add a new property with:\n     - Name: `EXA_API_KEY`\n     - Value: Your Exa.ai API key\n4. Use the library in your project:\n\n```javascript\nfunction searchNews() {\n  const exa = new Exa(PropertiesService.getScriptProperties().getProperty('EXA_API_KEY'));\n  const results = exa.searchAndContents(\"Latest AI developments\", {\n    category: \"news_article\",\n    numResults: 5\n  });\n  return results;\n}\n```\n\n## 📖 API Documentation\n\n### Creating an Exa Client\n\n```javascript\nconst exa = new Exa(apiKey);\nexa.setLogging(true); // Optional: Enable debug logging\n```\n\n### Search Methods\n\n#### `searchAndContents(query, options)`\n\nSearches for content and returns results with full text and summaries.\n\n**Parameters:**\n\n- `query` (string): The search query\n- `options` (object): Search configuration\n\n**Available Options:**\n\n```javascript\n{\n  // Search Type\n  type: \"neural\" | \"keyword\" | \"auto\",  // Default: \"neural\"\n  \n  // Content Category\n  category: \"company\" | \"research_paper\" | \"news_article\" | \"pdf\" | \n           \"github\" | \"tweet\" | \"movie\" | \"song\" | \"personal_site\",\n  \n  // Basic Options\n  useAutoprompt: boolean,     // Default: true\n  numResults: number,         // Default: 10\n  livecrawl: \"always\" | \"fallback\",\n  \n  // Domain Filters\n  includeDomains: string[],   // e.g., [\"example.com\"]\n  excludeDomains: string[],   // e.g., [\"spam.com\"]\n  \n  // Date Filters (ISO format)\n  startPublishedDate: string, // e.g., \"2024-01-01T00:00:00.000Z\"\n  endPublishedDate: string,\n  startCrawlDate: string,\n  endCrawlDate: string,\n  \n  // Text Content Options\n  text: {\n    includeHtmlTags: boolean,\n    maxCharacters: number\n  },\n  \n  // Highlight Options\n  highlights: {\n    query: string,\n    numSentences: number,    \n    highlightsPerUrl: number \n  },\n  \n  // Summary Options\n  summary: {\n    query: string\n  }\n}\n```\n\n**Response Structure:**\n\n```javascript\n{\n  requestId: string,\n  resolvedSearchType: string,\n  results: [{\n    score: number,\n    title: string,\n    url: string,\n    publishedDate: string,\n    author: string,\n    text: string,\n    summary: string,\n    highlights: string[],\n    highlightScores: number[],\n    image?: string\n  }]\n}\n```\n\n## 📝 Examples\n\n### Simple News Search\n\n```javascript\nfunction searchNews() {\n  const exa = new Exa(PropertiesService.getScriptProperties().getProperty('EXA_API_KEY'));\n  \n  return exa.searchAndContents(\"AI news\", {\n    category: \"news_article\",\n    numResults: 5\n  });\n}\n```\n\n### Advanced Company Search\n\n```javascript\nfunction searchAICompanies() {\n  const exa = new Exa(PropertiesService.getScriptProperties().getProperty('EXA_API_KEY'));\n  \n  return exa.searchAndContents(\n    \"innovative AI startups in natural language processing\",\n    {\n      type: \"neural\",\n      category: \"company\",\n      numResults: 20,\n      startPublishedDate: \"2024-01-01T00:00:00.000Z\",\n      text: {\n        maxCharacters: 1000\n      },\n      highlights: {\n        query: \"AI capabilities and innovations\",\n        numSentences: 2\n      },\n      summary: {\n        query: \"What are their main AI products and innovations?\"\n      }\n    }\n  );\n}\n```\n\n## 🤝 Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 🙏 Acknowledgments\n\n- Thanks to [Exa.ai](https://exa.ai) for their excellent API\n- Built for the Google Apps Script community\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkamilstanuch%2Fgoogle-apps-script-exa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkamilstanuch%2Fgoogle-apps-script-exa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkamilstanuch%2Fgoogle-apps-script-exa/lists"}