Skip to content

Discover competitors and lookalike companies with this feature-rich command-line interface. Export data in multiple formats and integrate seamlessly into your business intelligence workflows.

Notifications You must be signed in to change notification settings

apistemic/markets-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

12 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš€ Apistemic Markets Examples

Python 3.8+ License: MIT Code style: black

Powerful CLI tools and examples for the Apistemic Markets API ๐Ÿ“Š

Effortlessly discover competitors and lookalike companies with this feature-rich command-line interface. Export data in multiple formats and integrate seamlessly into your business intelligence workflows.

โœจ Features

  • ๐Ÿ” Competitor Discovery - Find direct competitors for any company
  • ๐ŸŽฏ Lookalike Analysis - Discover similar companies in your market
  • ๐Ÿ“Š Multiple Export Formats - CSV, JSON, Parquet, and formatted tables
  • โšก Fast & Reliable - Built on the robust Apistemic Markets API
  • ๐Ÿ› ๏ธ Developer Friendly - Clean Python code with type hints
  • ๐Ÿ“ˆ Business Ready - Perfect for market research and competitive analysis

๐Ÿš€ Quick Start

# Discover competitors
uv run python cli.py fetch competitors linkedin:startupradar

# Find lookalikes with CSV export, e.g. for Excel import
uv run python cli.py fetch lookalikes linkedin:crunchbase --format csv > crunchbase.csv

# Export to Parquet for data analysis
uv run python cli.py fetch competitors linkedin:uber-com --format parquet > uber.parquet

๐Ÿ“‹ Usage

Basic Commands

Get competitors in human-readable table format (default):

uv run python cli.py fetch competitors linkedin:startupradar
# score  organization.id    organization.name organization.description organization.website_url organization.linkedin_url  organization.employee_count  organization.founded_year
# 1.000            86910                 Uber We are Uber. The ...      http://www.uber.com     https://linkedin....                    122487                         <NA>
# 0.719           247381                 DiDi DiDi Global Inc. ...     http://www.didigl...     https://linkedin....                     25878                         <NA>
# 0.686           177350                 Lyft Whether itโ€™s an e...     https://www.lyft....     https://linkedin....                     25731                         2012
# 0.677           513291                 Bolt At Bolt, we're bu...           http://bolt.eu     https://linkedin....                     12674                         2013
# 0.640           150106                  Ola Ola is Indiaโ€™s la...       http://Olacabs.com     https://linkedin....                     27548                         2010
# 0.616           166825               Careem Careem is buildin...     http://www.careem...     https://linkedin....                      5945                         2012
# 0.585           239295                 Grab Grab is Southeast...     https://grab.careers     https://linkedin....                     49809                         2012
# 0.574           176962                Gojek Gojek is Southeas...     https://www.gojek...     https://linkedin....                         0                         <NA>
# 0.560           347141              inDrive inDrive is a glob...     http://www.inDriv...     https://linkedin....                      8588                         <NA>
# 0.532           213690             DoorDash At DoorDash, our ...     https://careersat...     https://linkedin....                     67148                         <NA>
# ...

Get lookalikes as structured JSON:

uv run python cli.py fetch lookalikes linkedin:crunchbase --format json
# [
#  {
#    "organization": {
#      "id": 86910,
#      "name": "Uber",
#      "description": "We are Uber. The go-getters...",
#      "website_url": "http://www.uber.com",
#      "linkedin_url": "https://linkedin.com/company/uber-com",
#      "employee_count": 122487,
#      "founded_year": null
#    },
#    "score": 1.0
#  },
#  {
#    "organization": {
#      "id": 247381,
#      "name": "DiDi",
#      "description": "DiDi Global Inc. is a leading mobility technology platform. ...",
#      "website_url": "http://www.didiglobal.com",
#      "linkedin_url": "https://linkedin.com/company/didiglobal",
#      "employee_count": 25878,
#      "founded_year": null
#    },
#    "score": 0.7185925781557272
#  },
#  {
#    "organization": {
#      "id": 177350,
#      "name": "Lyft",
#      "description": "Whether it\u2019s an everyday commute or a journey that changes everything, ...",
#      "website_url": "https://www.lyft.com/",
#      "linkedin_url": "https://linkedin.com/company/lyft",
#      "employee_count": 25731,
#      "founded_year": 2012
#    },
#    "score": 0.6859793660660187
#  },
#  ...
# ]

Get competitors as CSV for spreadsheet analysis:

uv run python cli.py fetch competitors linkedin:uber-com --format csv
# score,organization.id,organization.name,organization.description,organization.website_url,organization.linkedin_url,organization.employee_count,organization.founded_year
# 1.0,86910,Uber,"We ar...",http://www.uber.com,https://linkedin.com/company/uber-com,122487,
# 0.719,247381,DiDi,"DiDi ...",http://www.didiglobal.com,https://linkedin.com/company/didiglobal,25878,
# 0.686,177350,Lyft,"Wheth...",https://www.lyft.com/,https://linkedin.com/company/lyft,25731,2012
# 0.677,513291,Bolt,"At Bo...",http://bolt.eu,https://linkedin.com/company/bolt-eu,12674,2013
# 0.640,150106,Ola,"Ola i...",http://Olacabs.com,https://linkedin.com/company/olacabs-com,27548,2010
# 0.616,166825,Careem,"Caree...",http://www.careem.com,https://linkedin.com/company/careem,5945,2012
# 0.585,239295,Grab,"Grab ...",https://grab.careers,https://linkedin.com/company/grabapp,49809,2012
# 0.574,176962,Gojek,"Gojek...",https://www.gojek.io/careers,https://linkedin.com/company/gojek-gotogroup,0,
# 0.560,347141,inDrive,"inDri...",http://www.inDrive.com,https://linkedin.com/company/indrive,8588,
# 0.532,213690,DoorDash,"At Do...",https://careersatdoordash.com/,https://linkedin.com/company/doordash,67148,
# ...

Get help for any command:

uv run python cli.py --help
# Usage: cli.py [OPTIONS] COMMAND [ARGS]...
#
# โ•ญโ”€ Options โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
# โ”‚ --install-completion          Install completion for the current shell.      โ”‚
# โ”‚ --show-completion             Show completion for the current shell, to copy โ”‚
# โ”‚                               it or customize the installation.              โ”‚
# โ”‚ --help                        Show this message and exit.                    โ”‚
# โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
# โ•ญโ”€ Commands โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
# โ”‚ leadgen                                                                      โ”‚
# โ”‚ fetch     Fetch competitors or lookalikes for a given company.               โ”‚
# โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

Get detailed help for the fetch command:

uv run python cli.py fetch --help
# Usage: cli.py fetch [OPTIONS] ENDPOINT:{competitors|lookalikes} SLUG
#
# Fetch competitors or lookalikes for a given company.
#
# โ•ญโ”€ Arguments โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
# โ”‚ *    endpoint      Type of data to fetch [required]                          โ”‚
# โ”‚ *    slug          Company identifier, can be company ID, Linkedin slug or   โ”‚
# โ”‚                    domain name. For example, to get Uber both                โ”‚
# โ”‚                    `linkedin:uber-com` and `domain:uber.com` work [required] โ”‚
# โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
# โ•ญโ”€ Options โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
# โ”‚ --format        [table|json|csv|parquet]  Output format [default: table]     โ”‚
# โ”‚ --help                                    Show this message and exit.        โ”‚
# โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

Export Formats

Format Description Use Case
table Human-readable table Quick analysis
json Structured JSON API integration
csv Comma-separated values Spreadsheet analysis
parquet Columnar format Big data workflows

๐Ÿ”ง Setup

  1. Clone the repository

    git clone https://github.com/your-org/markets-examples.git
    cd markets-examples
  2. Install dependencies

    uv sync
  3. Configure API credentials There's a free tier to play around with the API. If you don't set up anything, you'll use it automatically. Sign up to get an API key. With an API key, there's two options:

    # add API key to your env
    export RAPIDAPI_API_KEY="your-rapidapi-api-key"
    
    # or run via uv with env-file
    uv run --env-file=.env python cli.py

๐Ÿ’ก Examples

Market Research Workflow

# Export competitor data for analysis
uv run python cli.py fetch competitors linkedin:uber-com --format csv > competitors.csv

# Get lookalikes in multiple formats (once via domain and once via linkedin slug)
uv run python cli.py fetch lookalikes domain:uber.com --format json > lookalikes.json
uv run python cli.py fetch lookalikes linkedin:uber-com --format parquet > lookalikes.parquet

Integration with Data Science Tools

import pandas as pd

# Load Parquet data directly into pandas
df = pd.read_parquet('competitors.parquet')
print(df.head())

๐Ÿ›ก๏ธ Requirements

  • Python 3.13+
  • Valid Apistemic Markets API key
  • Dependencies managed with uv

๐Ÿ“š API Reference

The CLI wraps the powerful Apistemic Markets API, providing:

  • Company Intelligence - Detailed company profiles and metrics
  • Market Mapping - Comprehensive competitive landscapes
  • Real-time Data - Up-to-date company information
  • Global Coverage - Companies from around the world

See the API docs for the full OpenAPI specification and more information.

๐Ÿค Contributing

We welcome contributions! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

๐ŸŒŸ Show Your Support

Give a โญ๏ธ if this project helped you with your market research!


Built with โค๏ธ by the Apistemic team

About

Discover competitors and lookalike companies with this feature-rich command-line interface. Export data in multiple formats and integrate seamlessly into your business intelligence workflows.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages