CompaniesLogo

A simple, powerful API for accessing company logos worldwide

Repo Size: 2.3MB Stars: 256 Forks: 124 License: MIT

๐ŸŒŸ Features

โœ…

Free to Use

No registration or API keys required.

๐ŸŒ

Global Coverage

Access logos for companies worldwide.

โšก

Easy Integration

Simple API endpoint for SVG logos.

๐Ÿ“‚

Comprehensive Data

JSON file with company slugs and symbols.

๐Ÿ“Œ Supported Stock Exchanges

๐Ÿ‡บ๐Ÿ‡ธ

NYSE

๐Ÿ‡บ๐Ÿ‡ธ

NASDAQ

๐Ÿ‡ฌ๐Ÿ‡ง

LSE

๐Ÿ‡ฉ๐Ÿ‡ช

XETRA

๐Ÿ‡จ๐Ÿ‡ณ

SZSE

๐Ÿ‡ฏ๐Ÿ‡ต

TSE

๐Ÿ‡ฎ๐Ÿ‡ณ

NSE

๐Ÿ‡ฆ๐Ÿ‡บ

ASX

๐Ÿš€ Getting Started

Prerequisites

  • ๐Ÿ“Œ Basic knowledge of HTTP requests.
  • ๐Ÿ“Œ Access to companies.json file containing company slugs and exchange symbols.

Installation

No installation required! You can start using the API by making HTTP requests to the endpoint.

๐Ÿ”— API Usage

1๏ธโƒฃ Fetch Company Slugs

Get company slugs from the companies.json file. The file follows this format:

{
    "totalCount": 131280,
    "data": [
        {
            "s": "SZSE:000001",
            "d": [
                "ping-an"
            ]
        },
        {
            "s": "SZSE:000002",
            "d": [
                "china-vanke-co"
            ]
        }
    ]
}

2๏ธโƒฃ API Endpoint

https://logo.tradient.org/v1/{slug}.svg

Replace {slug} with the company slug from companies.json.

3๏ธโƒฃ Example Request

To fetch the Ping An logo (ping-an):

https://logo.tradient.org/v1/ping-an.svg

๐Ÿ“œ Sample Code (Python)

import requests

slug = "ping-an"
url = f"https://logo.tradient.org/v1/{slug}.svg"

response = requests.get(url)
if response.status_code == 200:
    with open(f"{slug}.svg", "wb") as file:
        file.write(response.content)
    print(f"Logo for {slug} saved successfully.")
else:
    print(f"Failed to fetch logo for {slug}. Status code: {response.status_code}")

๐Ÿงช Try it yourself

Enter a company slug and click "Fetch Logo" to test the API

Try these: apple microsoft amazon

๐Ÿค Contributing

Contributions are welcome! If you have any improvements, bug fixes, or feature suggestions, follow these steps:

1๏ธโƒฃ
Fork the repository & create a new branch.
2๏ธโƒฃ
Make your changes (document them well).
3๏ธโƒฃ
Test your changes thoroughly.
4๏ธโƒฃ
Create a pull request with a detailed explanation.

๐Ÿ“œ License

This project is licensed under the MIT License. See the LICENSE file for details.

๐Ÿ™Œ Acknowledgments

๐ŸŽ‰ Thanks to contributors and maintainers of the companies.json file for providing comprehensive data.

๐Ÿš€ Special thanks to Tradient for providing the logo API.