diff --git a/cookbook/github-trending/scrapegraph_sdk.ipynb b/cookbook/github-trending/scrapegraph_sdk.ipynb
new file mode 100644
index 0000000..ee762e4
--- /dev/null
+++ b/cookbook/github-trending/scrapegraph_sdk.ipynb
@@ -0,0 +1,2867 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "jEkuKbcRrPcK"
+ },
+ "source": [
+ "## \ud83d\udd77\ufe0f Extract Github Trending Repositories with Official Scrapegraph SDK\n",
+ "\n",
+ "[](https://www.runalph.ai/notebooks/scrapegraphai/scrapegraph-sdk-1) [](https://colab.research.google.com/drive/1SSsI0naieeHjHcJkW22CqNIZwLHWjXmd?usp=sharing)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "d7Zro0xiuo-l"
+ },
+ "source": [
+ ""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "IzsyDXEWwPVt"
+ },
+ "source": [
+ "### \ud83d\udd27 Install `dependencies`"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "id": "os_vm0MkIxr9"
+ },
+ "outputs": [],
+ "source": [
+ "%%capture\n",
+ "!pip install scrapegraph-py"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "apBsL-L2KzM7"
+ },
+ "source": [
+ "### \ud83d\udd11 Import `ScrapeGraph` API key"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "ol9gQbAFkh9b"
+ },
+ "source": [
+ "You can find the Scrapegraph API key [here](https://scrapegraphai.com/dashboard)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "executionInfo": {
+ "elapsed": 5826,
+ "status": "ok",
+ "timestamp": 1734439787062,
+ "user": {
+ "displayName": "ScrapeGraphAI",
+ "userId": "10474323355016263615"
+ },
+ "user_tz": -60
+ },
+ "id": "sffqFG2EJ8bI",
+ "outputId": "ab74193e-e746-4de6-d65d-33a2a26b5d86"
+ },
+ "outputs": [
+ {
+ "name": "stdin",
+ "output_type": "stream",
+ "text": [
+ "Scrapegraph API key:\n",
+ " \u00b7\u00b7\u00b7\u00b7\u00b7\u00b7\u00b7\u00b7\n"
+ ]
+ }
+ ],
+ "source": [
+ "import getpass\n",
+ "import os\n",
+ "\n",
+ "if not os.environ.get(\"SGAI_API_KEY\"):\n",
+ " os.environ[\"SGAI_API_KEY\"] = getpass.getpass(\"Scrapegraph API key:\\n\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "jnqMB2-xVYQ7"
+ },
+ "source": [
+ "### \ud83d\udcdd Defining an `Output Schema` for Webpage Content Extraction\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "VZvxbjfXvbgd"
+ },
+ "source": [
+ "If you already know what you want to extract from a webpage, you can **define an output schema** using **Pydantic**. This schema acts as a \"blueprint\" that tells the AI how to structure the response.\n",
+ "\n",
+ "Pydantic Schema Quick Guide
\n",
+ "\n",
+ "Types of Schemas \n",
+ "\n",
+ "1. Simple Schema \n",
+ "Use this when you want to extract straightforward information, such as a single piece of content. \n",
+ "\n",
+ "```python\n",
+ "from pydantic import BaseModel, Field\n",
+ "\n",
+ "# Simple schema for a single webpage\n",
+ "class PageInfoSchema(BaseModel):\n",
+ " title: str = Field(description=\"The title of the webpage\")\n",
+ " description: str = Field(description=\"The description of the webpage\")\n",
+ "\n",
+ "# Example Output JSON after AI extraction\n",
+ "{\n",
+ " \"title\": \"ScrapeGraphAI: The Best Content Extraction Tool\",\n",
+ " \"description\": \"ScrapeGraphAI provides powerful tools for structured content extraction from websites.\"\n",
+ "}\n",
+ "```\n",
+ "\n",
+ "2. Complex Schema (Nested) \n",
+ "If you need to extract structured information with multiple related items (like a list of repositories), you can **nest schemas**.\n",
+ "\n",
+ "```python\n",
+ "from pydantic import BaseModel, Field\n",
+ "from typing import List\n",
+ "\n",
+ "# Define a schema for a single repository\n",
+ "class RepositorySchema(BaseModel):\n",
+ " name: str = Field(description=\"Name of the repository (e.g., 'owner/repo')\")\n",
+ " description: str = Field(description=\"Description of the repository\")\n",
+ " stars: int = Field(description=\"Star count of the repository\")\n",
+ " forks: int = Field(description=\"Fork count of the repository\")\n",
+ " today_stars: int = Field(description=\"Stars gained today\")\n",
+ " language: str = Field(description=\"Programming language used\")\n",
+ "\n",
+ "# Define a schema for a list of repositories\n",
+ "class ListRepositoriesSchema(BaseModel):\n",
+ " repositories: List[RepositorySchema] = Field(description=\"List of GitHub trending repositories\")\n",
+ "\n",
+ "# Example Output JSON after AI extraction\n",
+ "{\n",
+ " \"repositories\": [\n",
+ " {\n",
+ " \"name\": \"google-gemini/cookbook\",\n",
+ " \"description\": \"Examples and guides for using the Gemini API\",\n",
+ " \"stars\": 8036,\n",
+ " \"forks\": 1001,\n",
+ " \"today_stars\": 649,\n",
+ " \"language\": \"Jupyter Notebook\"\n",
+ " },\n",
+ " {\n",
+ " \"name\": \"TEN-framework/TEN-Agent\",\n",
+ " \"description\": \"TEN Agent is a conversational AI powered by TEN, integrating Gemini 2.0 Multimodal Live API, OpenAI Realtime API, RTC, and more.\",\n",
+ " \"stars\": 3224,\n",
+ " \"forks\": 311,\n",
+ " \"today_stars\": 361,\n",
+ " \"language\": \"Python\"\n",
+ " }\n",
+ " ]\n",
+ "}\n",
+ "```\n",
+ "\n",
+ "Key Takeaways \n",
+ "- **Simple Schema**: Perfect for small, straightforward extractions. \n",
+ "- **Complex Schema**: Use nesting to extract lists or structured data, like \"a list of repositories.\" \n",
+ "\n",
+ "Both approaches give the AI a clear structure to follow, ensuring that the extracted content matches exactly what you need.\n",
+ "
| \n", + " | name | \n", + "description | \n", + "stars | \n", + "forks | \n", + "today_stars | \n", + "language | \n", + "
|---|---|---|---|---|---|---|
| 0 | \n", + "OMNeT++ NED | \n", + "No content available | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "No content available | \n", + "
| 1 | \n", + "OMNeT++ MSG | \n", + "No content available | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "No content available | \n", + "
| 2 | \n", + "ooc | \n", + "No content available | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "No content available | \n", + "
| 3 | \n", + "Opa | \n", + "No content available | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "No content available | \n", + "
| 4 | \n", + "Opal | \n", + "No content available | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "No content available | \n", + "
| ... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "
| 270 | \n", + "playcanvas/supersplat | \n", + "3D Gaussian Splat Editor | \n", + "7001 | \n", + "778 | \n", + "579 | \n", + "TypeScript | \n", + "
| 271 | \n", + "lsdefine/GenericAgent | \n", + "Self-evolving agent: grows skill tree from 3.3... | \n", + "10714 | \n", + "1205 | \n", + "174 | \n", + "Python | \n", + "
| 272 | \n", + "decolua/9router | \n", + "Unlimited FREE AI coding. Connect Claude Code,... | \n", + "7644 | \n", + "1262 | \n", + "803 | \n", + "JavaScript | \n", + "
| 273 | \n", + "affaan-m/everything-claude-code | \n", + "The agent harness performance optimization sys... | \n", + "178795 | \n", + "27573 | \n", + "1081 | \n", + "JavaScript | \n", + "
| 274 | \n", + "datawhalechina/hello-agents | \n", + "\ud83d\udcda \u300a\u4ece\u96f6\u5f00\u59cb\u6784\u5efa\u667a\u80fd\u4f53\u300b----\u4ece\u96f6\u5f00\u59cb\u7684\u667a\u80fd\u4f53\u539f\u7406\u4e0e\u5b9e\u8df5\u6559\u7a0b | \n", + "47116 | \n", + "5669 | \n", + "748 | \n", + "Python | \n", + "
275 rows \u00d7 6 columns
\n", + "\n",
+ "
\n",
+ "