{"id":13748855,"url":"https://github.com/saleweaver/python-amazon-sp-api","last_synced_at":"2026-02-01T21:01:07.196Z","repository":{"id":36966852,"uuid":"322685925","full_name":"saleweaver/python-amazon-sp-api","owner":"saleweaver","description":"Python wrapper to access the amazon selling partner API","archived":false,"fork":false,"pushed_at":"2026-01-27T06:33:14.000Z","size":30954,"stargazers_count":615,"open_issues_count":1,"forks_count":247,"subscribers_count":18,"default_branch":"master","last_synced_at":"2026-01-27T19:44:28.565Z","etag":null,"topics":["amazon","mws","selling-partner-api","sp-api"],"latest_commit_sha":null,"homepage":"https://python-amazon-sp-api.readthedocs.io/en/latest/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/saleweaver.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"saleweaver","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2020-12-18T19:23:58.000Z","updated_at":"2026-01-27T06:32:18.000Z","dependencies_parsed_at":"2023-11-20T08:09:19.607Z","dependency_job_id":"54916408-c0f5-415c-b512-fc7b9f91a2d8","html_url":"https://github.com/saleweaver/python-amazon-sp-api","commit_stats":{"total_commits":929,"total_committers":57,"mean_commits":16.29824561403509,"dds":0.5629709364908504,"last_synced_commit":"628a1f2b6e76dee410c2b317c9de65c8dc039c57"},"previous_names":[],"tags_count":323,"template":false,"template_full_name":null,"purl":"pkg:github/saleweaver/python-amazon-sp-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saleweaver%2Fpython-amazon-sp-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saleweaver%2Fpython-amazon-sp-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saleweaver%2Fpython-amazon-sp-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saleweaver%2Fpython-amazon-sp-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saleweaver","download_url":"https://codeload.github.com/saleweaver/python-amazon-sp-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saleweaver%2Fpython-amazon-sp-api/sbom","scorecard":{"id":496741,"data":{"date":"2025-08-11","repo":{"name":"github.com/saleweaver/python-amazon-sp-api","commit":"9632461280c3d84470fdd0d31ccaab81729aab03"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.9,"checks":[{"name":"Maintained","score":10,"reason":"30 commit(s) and 6 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/2 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Security-Policy","score":4,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Warn: no linked content found","Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1","Info: Found text in security policy: SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: jobLevel 'contents' permission set to 'write': .github/workflows/version_increment.yml:12","Warn: jobLevel 'actions' permission set to 'write': .github/workflows/version_increment.yml:13","Warn: no topLevel permission defined: .github/workflows/dependabot-automerge.yml:1","Warn: no topLevel permission defined: .github/workflows/manual.yml:1","Warn: no topLevel permission defined: .github/workflows/python-publish.yml:1","Warn: no topLevel permission defined: .github/workflows/version_increment.yml:1"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Vulnerabilities","score":1,"reason":"9 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2019-217 / GHSA-462w-v97r-4m45","Warn: Project is vulnerable to: PYSEC-2014-8 / GHSA-8r7q-cvjq-x353","Warn: Project is vulnerable to: GHSA-cpwx-vrp4-4pq7","Warn: Project is vulnerable to: PYSEC-2014-82 / GHSA-fqh9-2qgg-h84h","Warn: Project is vulnerable to: PYSEC-2021-66 / GHSA-g3rq-g295-4j3m","Warn: Project is vulnerable to: GHSA-h5c8-rqwp-cp95","Warn: Project is vulnerable to: GHSA-h75v-3vvj-5mfj","Warn: Project is vulnerable to: PYSEC-2019-220 / GHSA-hj2j-77xm-mc5v","Warn: Project is vulnerable to: GHSA-q2x7-8rv6-6q7h"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/dependabot-automerge.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/saleweaver/python-amazon-sp-api/dependabot-automerge.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/dependabot-automerge.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/saleweaver/python-amazon-sp-api/dependabot-automerge.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/manual.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/saleweaver/python-amazon-sp-api/manual.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-publish.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/saleweaver/python-amazon-sp-api/python-publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-publish.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/saleweaver/python-amazon-sp-api/python-publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/version_increment.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/saleweaver/python-amazon-sp-api/version_increment.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/version_increment.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/saleweaver/python-amazon-sp-api/version_increment.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/version_increment.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/saleweaver/python-amazon-sp-api/version_increment.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/version_increment.yml:103: update your workflow using https://app.stepsecurity.io/secureworkflow/saleweaver/python-amazon-sp-api/version_increment.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/python-publish.yml:24","Warn: pipCommand not pinned by hash: .github/workflows/python-publish.yml:25","Warn: pipCommand not pinned by hash: .github/workflows/version_increment.yml:39","Warn: pipCommand not pinned by hash: .github/workflows/version_increment.yml:40","Info:   0 out of   7 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned","Info:   0 out of   4 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":10,"reason":"SAST tool is run on all commits","details":["Info: all commits (28) are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-19T20:36:10.647Z","repository_id":36966852,"created_at":"2025-08-19T20:36:10.648Z","updated_at":"2025-08-19T20:36:10.648Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28990680,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T20:57:35.821Z","status":"ssl_error","status_checked_at":"2026-02-01T20:57:29.580Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["amazon","mws","selling-partner-api","sp-api"],"created_at":"2024-08-03T07:00:50.936Z","updated_at":"2026-02-01T21:01:07.173Z","avatar_url":"https://github.com/saleweaver.png","language":"Python","readme":"[![CodeFactor](https://www.codefactor.io/repository/github/saleweaver/python-amazon-sp-api/badge)](https://www.codefactor.io/repository/github/saleweaver/python-amazon-sp-api)\n[![Downloads](https://static.pepy.tech/badge/python-amazon-sp-api)](https://pepy.tech/project/python-amazon-sp-api)\n[![Downloads](https://static.pepy.tech/badge/python-amazon-sp-api/month)](https://pepy.tech/project/python-amazon-sp-api)\n[![Downloads](https://static.pepy.tech/badge/python-amazon-sp-api/week)](https://pepy.tech/project/python-amazon-sp-api)\n\n# PYTHON-AMAZON-SP-API\n\n## Amazon Selling-Partner API\n\nA wrapper to access **Amazon's Selling Partner API** with an easy-to-use interface.\n\n---\n\n### New Features\n\n#### Async support!\n\n- httpx-based transport for sync clients, enabling connection pooling and consistent streaming behavior.\n- Async client package under `sp_api.asyncio` for non-blocking calls across services.\n\n\n# 🌟 Thank you for using python-amazon-sp-api! 🌟\n\nThis tool helps developers and businesses connect seamlessly with Amazon's vast marketplace, enabling powerful automations and data management.\n\nIf you appreciate this project and find it useful, please consider supporting its continued development:\n\n- 🙌 [GitHub Sponsors](https://github.com/sponsors/saleweaver)\n- 🌐 BTC Address: `bc1q6uqgczasmnvnc5upumarugw2mksnwneg0f65ws`\n- 🌐 ETH Address: `0xf59534F7a7F5410DBCD0c779Ac3bB6503bd32Ae5`\n\nYour support helps keep the project alive and evolving, and is greatly appreciated!\n\n\n----\n\n### Documentation\n\nDocumentation is available [here](https://python-amazon-sp-api.readthedocs.io/en/latest/)\n\n[![Documentation Status](https://img.shields.io/readthedocs/python-amazon-sp-api?style=for-the-badge)](https://python-amazon-sp-api.readthedocs.io/en/latest/index.html)\n\n\n### Q \u0026 A\n\nIf you have questions, please ask them in GitHub discussions \n\n[![discussions](https://img.shields.io/badge/github-discussions-brightgreen?style=for-the-badge\u0026logo=github)](https://github.com/saleweaver/python-amazon-sp-api/discussions)\n\nor\n\n[![join on slack](https://img.shields.io/badge/slack-join%20on%20slack-orange?style=for-the-badge\u0026logo=slack)](https://join.slack.com/t/sellingpartnerapi/shared_invite/zt-zovn6tch-810j9dBPQtJsvw7lEXSuaQ)\n\n\n### Installation\n[![Badge](https://img.shields.io/pypi/v/python-amazon-sp-api?style=for-the-badge)](https://pypi.org/project/python-amazon-sp-api/)\n```\npip install python-amazon-sp-api\npip install \"python-amazon-sp-api[aws]\" # if you want to use AWS Secret Manager Authentication.\npip install \"python-amazon-sp-api[aws-caching]\" # if you want to use the Cached Secrets from AWS\n```\n\n---\n### Usage\n\n```python\nfrom sp_api.api import Orders\nfrom sp_api.api import Reports\nfrom sp_api.api import DataKiosk\nfrom sp_api.api import Feeds\nfrom sp_api.base import SellingApiException\nfrom sp_api.base.reportTypes import ReportType\nfrom datetime import datetime, timedelta\n\n# DATA KIOSK API\nclient = DataKiosk()\n\nres = client.create_query(query=\"{analytics_salesAndTraffic_2023_11_15{salesAndTrafficByAsin(startDate:\\\"2022-09-01\\\" endDate:\\\"2022-09-30\\\" aggregateBy:SKU marketplaceIds:[\\\"ATVPDKIKX0DER\\\"]){childAsin endDate marketplaceId parentAsin sales{orderedProductSales{amount currencyCode}totalOrderItems totalOrderItemsB2B}sku startDate traffic{browserPageViews browserPageViewsB2B browserPageViewsPercentage browserPageViewsPercentageB2B browserSessionPercentage unitSessionPercentageB2B unitSessionPercentage}}}}\")\nprint(res)\n\n# orders API\ntry:\n    res = Orders().get_orders(CreatedAfter=(datetime.utcnow() - timedelta(days=7)).isoformat())\n    print(res.payload)  # json data\nexcept SellingApiException as ex:\n    print(ex)\n\n\n# report request     \ncreate_report_response = Reports().create_report(reportType=ReportType.GET_MERCHANT_LISTINGS_ALL_DATA)\n\n# submit feed\n# feeds can be submitted like explained in Amazon's docs, or simply by calling submit_feed\n\nFeeds().submit_feed(\u003cfeed_type\u003e, \u003cfile_or_bytes_io\u003e, content_type='text/tsv', **kwargs)\n\n# PII Data\n\nOrders(restricted_data_token='\u003ctoken\u003e').get_orders(CreatedAfter=(datetime.utcnow() - timedelta(days=7)).isoformat())\n\n# or use the shortcut\norders = Orders().get_orders(\n    LastUpdatedAfter=(datetime.utcnow() - timedelta(days=1)).isoformat()\n)\n```\n\n---\n\n### Async Usage\n\n```python\nimport asyncio\nfrom datetime import datetime, timedelta\n\nfrom sp_api.asyncio.api import Orders, Reports\nfrom sp_api.base.reportTypes import ReportType\n\n\nasync def main():\n    async with Orders() as orders_client:\n        res = await orders_client.get_orders(\n            LastUpdatedAfter=(datetime.utcnow() - timedelta(days=1)).isoformat()\n        )\n        print(res.payload)\n\n    async with Reports() as reports_client:\n        report = await reports_client.create_report(\n            reportType=ReportType.GET_MERCHANT_LISTINGS_ALL_DATA\n        )\n        print(report.payload)\n    \n    # OR \n    await Reports().create_report(\n        reportType=ReportType.GET_MERCHANT_LISTINGS_ALL_DATA\n    )\n\n    \nif __name__ == \"__main__\":\n    asyncio.run(main())\n```\n\n---\n\n\n### New endpoints\n\nYou can create a new endpoint file by running `make_endpoint \u003cmodel_json_url\u003e`\n\n```bash\nmake_endpoint https://raw.githubusercontent.com/amzn/selling-partner-api-models/main/models/listings-restrictions-api-model/listingsRestrictions_2021-08-01.json\n```\n\nThis creates a ready to use client. Please consider creating a pull request with the new code.\n\n\n### ADVERTISING API\n\nYou can use nearly the same client for the Amazon Advertising API. [@denisneuf](https://github.com/denisneuf) has built [Python-Amazon-Advertising-API](https://github.com/denisneuf/python-amazon-ad-api) on top of this client.\nCheck it out [here](https://github.com/denisneuf/python-amazon-ad-api)\n\n### DISCLAIMER\n\nWe are not affiliated with Amazon\n\n\n### LICENSE\n\n![License](https://img.shields.io/github/license/saleweaver/python-amazon-sp-api?style=for-the-badge)\n\n---\n\n### Base Client\n\nThe client is pretty extensible and can be used for any other API. Check it out here:\n\n[API Client](https://github.com/saleweaver/rapid_rest_client)\n\n\n![Alt](https://repobeats.axiom.co/api/embed/25e8a3fe715fe68f2996ab99fe2e6188cd96a459.svg \"Repobeats analytics image\")\n","funding_links":["https://github.com/sponsors/saleweaver"],"categories":["Python","Docs"],"sub_categories":["Library"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaleweaver%2Fpython-amazon-sp-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaleweaver%2Fpython-amazon-sp-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaleweaver%2Fpython-amazon-sp-api/lists"}