{"id":29166256,"url":"https://github.com/sertrafurr/duckduckai","last_synced_at":"2025-10-05T21:32:20.843Z","repository":{"id":274004437,"uuid":"921609908","full_name":"SertraFurr/DuckDuckAI","owner":"SertraFurr","description":"Python API Wrapper to interact with DuckDuckAI","archived":false,"fork":false,"pushed_at":"2025-04-03T13:33:29.000Z","size":31,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-29T21:44:14.004Z","etag":null,"topics":["ai","ai-wrapper","api","claude","claude-ai","duckduckgo","free","gpt","gpt-4o","llama","meta-llama","mistral","mistral-7b","package","pypi","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SertraFurr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2025-01-24T09:20:25.000Z","updated_at":"2025-04-03T13:33:32.000Z","dependencies_parsed_at":"2025-01-24T09:45:56.758Z","dependency_job_id":"dbfcb96b-6ae3-47ba-87e0-3129e5c5976e","html_url":"https://github.com/SertraFurr/DuckDuckAI","commit_stats":null,"previous_names":["ramona-flower/duckduckai","cyn-ically/duckduckai","sertrafurr/duckduckai"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SertraFurr/DuckDuckAI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SertraFurr%2FDuckDuckAI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SertraFurr%2FDuckDuckAI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SertraFurr%2FDuckDuckAI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SertraFurr%2FDuckDuckAI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SertraFurr","download_url":"https://codeload.github.com/SertraFurr/DuckDuckAI/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SertraFurr%2FDuckDuckAI/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262925001,"owners_count":23385463,"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","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":["ai","ai-wrapper","api","claude","claude-ai","duckduckgo","free","gpt","gpt-4o","llama","meta-llama","mistral","mistral-7b","package","pypi","python"],"created_at":"2025-07-01T08:10:36.361Z","updated_at":"2025-10-05T21:32:15.801Z","avatar_url":"https://github.com/SertraFurr.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DuckDuckAI\r\n\r\nDuckDuckAI is a Python package for interacting with DuckDuckGo's chat API. It allows you to fetch responses from DuckDuckGo's AI models and print them in a streamed format or as a complete response.\r\n\r\n## Installation\r\n\r\nTo install the DuckDuckAI package, you can use pip:\r\n\r\n```bash\r\npip install DuckDuckAI\r\n```\r\n\r\n## Usage\r\n\r\nYou can interact with DuckDuckAI by calling the `ask` function. It supports both streaming responses or returning the entire message at once.\r\n\r\n### Example\r\n\r\n```python\r\nfrom duckduckai import ask\r\n\r\n# Fetch response in streamed format (printing character by character)\r\nask(\"Tell me a joke\", stream=True)[0] # Use 0 if you want to retrieve the response only (No Cookies)\r\n\r\n# Fetch response as a complete message\r\nresponse = ask(\"Tell me a joke\", stream=False)\r\nprint(response)\r\n```\r\n\r\n### Parameters\r\n\r\n| Parameter | Type  | Description                                                         | Default       |\r\n|-----------|-------|---------------------------------------------------------------------|---------------|\r\n| query     | str   | The search query string.                                             | Required      |\r\n| stream    | bool  | Whether to stream results or fetch them all at once.                 | True          |\r\n| model     | str   | The model to use for the response.                                   | gpt-4o-mini   |\r\n\r\n## Available Models\r\n\r\nDuckDuckAI currently supports the following models:\r\n\r\n| Model ID | Description |\r\n|----------|-------------|\r\n| `gpt-4o-mini` | A smaller variant of GPT-4o designed for quick, concise responses with less computation. |\r\n| `meta-llama/Llama-3.3-70B-Instruct-Turbo` | Meta's large-scale Llama 3.3 model with 70 billion parameters designed for fast and accurate responses. |\r\n| `claude-3-haiku-20240307` | Anthropic's Claude 3 Haiku model optimized for efficient, high-quality responses. |\r\n| `mistralai/Mistral-Small-24B-Instruct-2501` | Mistral AI's 24 billion parameter model trained for instruction-based tasks. |\r\n| `o3-mini` | OpenAI's compact reasoning model optimized for lightweight performance. |\r\n\r\nAdditional models may be available but subject to access restrictions. Some models may require specific permissions or may not be available in all regions.\r\n\r\n## Advanced Usage\r\n\r\nYou can reuse the authentication token to make multiple requests more efficiently:\r\n\r\n```python\r\nfrom duckduckai import ask, fetch_x_vqd_token\r\n\r\n# Fetch a token once\r\ntoken = fetch_x_vqd_token()\r\n\r\n# Use the same token for multiple requests\r\nresponse1 = ask(\"What is quantum computing?\", model=\"gpt-4o-mini\", token=token)[0]  # Do not put [0] if you want the token in the response\r\nresponse2 = ask(\"Explain neural networks\", model=\"claude-3-haiku-20240307\", token=token)[0] # Do not put [0] if you want the token in the response\r\n```\r\n\r\n## License\r\n\r\nThis project is licensed under the Apache-2.0 license - see the LICENSE file for details.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsertrafurr%2Fduckduckai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsertrafurr%2Fduckduckai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsertrafurr%2Fduckduckai/lists"}