Skip to main content

FindOrg — Named Entity Recognition for Organizations using LLMs

FindOrg is a Python package that performs Named Entity Recognition (NER) targeting organizations within a given text. It leverages large language models from OpenAI or Google Gemini to extract organization names and return them as a tidy pandas DataFrame.

Installation

pip install FindOrg

To enable saving results as Excel files (.xlsx), install with the optional extra:

pip install FindOrg[excel]

Quick start

from findorg import org

text = (
    "In the heart of Silicon Valley, a collaboration has emerged between "
    "global tech giants such as Google, Apple, and Meta, aiming to "
    "revolutionize the digital landscape."
)

# OpenAI (default provider)
df = org(text, api_key="YOUR_OPENAI_API_KEY")
print(df)
  Organizations
0        Google
1         Apple
2          Meta

Using Google Gemini instead

df = org(text, provider="gemini", api_key="YOUR_GEMINI_API_KEY")

If api_key is omitted, FindOrg reads it from the environment: OPENAI_API_KEY for OpenAI or GEMINI_API_KEY for Gemini. This keeps keys out of your source code:

df = org(text)                      # uses OPENAI_API_KEY
df = org(text, provider="gemini")   # uses GEMINI_API_KEY

Analyzing multiple texts at once

Pass a list of strings. The result gains a Text_ID column (1-based index of the input text):

texts = [
    "Petrobras signed an agreement with the World Bank.",
    "The event took place in Brasília, with no companies involved.",
]

df = org(texts, verbose=True)
print(df)
   Text_ID Organizations
0        1     Petrobras
1        1    World Bank

Saving results

df = org(text, save_path="organizations.xlsx")   # Excel (requires openpyxl)
df = org(text, save_path="organizations.csv")    # CSV

Arguments

Argument Type Default Description
text str or list[str] required Text(s) to be analyzed.
api_key str None API key for the chosen provider. If omitted, read from OPENAI_API_KEY or GEMINI_API_KEY.
provider str "openai" "openai" or "gemini".
model str provider default Model name. Defaults to gpt-4o-mini (OpenAI) or gemini-3.5-flash (Gemini).
save_path str None If given, saves the result to this path (.xlsx or .csv).
unique bool False If True, removes duplicated organization names.
verbose bool False If True, prints progress messages.

Returns

pandas.DataFrame with one row per extracted organization:

  • Single text input → column Organizations.
  • List input → columns Text_ID and Organizations.

Extraction rules

  • Geographic locations (countries, states, cities) are not extracted — organization names only.
  • When an organization's name is followed by its acronym in brackets, only the full name is extracted.
  • Texts with no organizations return an empty DataFrame.

Migrating from version 0.x

Version 1.0.0 introduces breaking changes:

Version 0.x Version 1.0.0
from FindOrg import org from findorg import org (lowercase)
org(text, openai_key="...") org(text, api_key="...")
save=True (fixed filename) save_path="organizations.xlsx" (any path, .xlsx or .csv)
OpenAI only, gpt-3.5-turbo OpenAI or Gemini; default model is now gpt-4o-mini

The change of default model was required because OpenAI is shutting down gpt-3.5-turbo in October 2026.

How to cite

Neves, L. F. F. (2026). FindOrg: Named Entity Recognition for Organizations using LLMs (Version 1.0.0) [Python package]. https://pypi.org/project/FindOrg/

Contact

luiz.felipe@ufg.br

Metadata

Release files for FindOrg 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for FindOrg 1.0.1
File Size Uploaded
findorg-1.0.1.tar.gz 6.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for FindOrg 1.0.1
File Interpreter ABI Platform
findorg-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 13.8 kB

Release files / findorg-1.0.1.tar.gz

Download URL findorg-1.0.1.tar.gz
Size 6.7 kB
Tags Source
SHA-256 checksum
How to use checksums
14014ec7ab64ef7f60af68e6edbb3a050965117ad4f3450fabcf822525569561
BLAKE2b-256 checksum
How to use checksums
b1c61f12f24a01c02ff6214cecdab23c07126e2e082b92bef73a7c63be7a3f21
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.8

Release files / findorg-1.0.1-py3-none-any.whl

Download URL findorg-1.0.1-py3-none-any.whl
Size 7.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e95e54d8d650c5ffea2d9c89b3c796225ea426daac4f4afef6bf7429b02017fd
BLAKE2b-256 checksum
How to use checksums
bc75955a985e51ba5f5d8e501d57b270e3727edf08387462d232164faeba3b4e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.8

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

0.6

2 release files

0.5

1 release file

0.4

1 release file

0.3

1 release file

0.2

3 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page