Skip to main content

PyPI - Version PyPI - Python Version Downloads

Tests Issues Stargazers MIT License


Logo

MagicalAPI Python SDK

MagicalAPI Python SDK lets developers integrate AI-powered resume parsing, resume scoring, resume matching, and LinkedIn public data extraction into Python applications. MagicalAPI.com
Report Bug · Request Feature

Table of Contents

What is MagicalAPI?

MagicalAPI is your AI edge in careers and data insights, Your ultimate tool for Resume Parsing, LinkedIn data and more. It offers services like:

  • Resume Parsing: Extract structured data from resumes.
  • LinkedIn Data Extraction: Scrape and analyze LinkedIn profiles.
  • Career Insights: Gain AI-driven recommendations for career development.

What you can build

  • Resume parsing pipelines for HR platforms
  • Candidate scoring and job matching workflows
  • LinkedIn profile enrichment tools
  • Recruiting automation systems
  • ATS integrations

Features

  • Resume Parsing: Parse resumes to extract key information like skills, experience, and education.
  • LinkedIn Profile Scraping: Extract data from LinkedIn profiles for analysis.
  • Career Insights: Leverage AI to get actionable career recommendations.
  • Type-Annotated and Async: Built for modern Python with type hints and asynchronous support.

Supported APIs

  • Resume Parser
  • Resume Checker(Review)
  • Resume Matcher(Score)
  • LinkedIn Profile Scraper
  • LinkedIn Company Scraper

About The Project

This is a Python client that provides easy access to the MagicalAPI.com services, fully type-annotated and asynchronous.

(back to top)

Getting Started

This is an example of how you can install the client and use it in your own scripts and projects.

Installation

Install the package using pip

pip install magicalapi

(back to top)

Usage

Here are some samples of how to use the client for each service. At first, you have to create an object of AsyncClient like this:

from magicalapi.client import AsyncClient

API_KEY = "mag_123456"
client = AsyncClient(api_key=API_KEY)

You can pass the API_KEY on the code, or put it on a .env file and the client will read from there.

Config .env File

Example of using .env file, all settings start with the prefix MAG_ and are case insensitive, so MAG_EXAMPLE, Mag_example, and mag_EXAMPLE are equal.

# .env

MAG_API_KEY="mag_1234567"

So now you can leave api_key parameter empty.

from magicalapi.client import AsyncClient

client = AsyncClinet()

Using Webhooks (Optional)

For asynchronous response delivery, you can provide a webhook_url when initializing the client. The API will send the response to your webhook endpoint instead of using the polling mechanism.

from magicalapi.client import AsyncClient

# Your webhook must be whitelisted in MagicalAPI panel
webhook_url = "https://your-domain.com/webhook"
client = AsyncClient(webhook_url=webhook_url)

Important: Webhook domains must be registered in the MagicalAPI panel. For setup guide, see the webhook documentation and example.


Here is an example of how to parse a resume using Resume Parser service:

import asyncio

from magicalapi.client import AsyncClient
from magicalapi.errors import APIServerError, APIServerTimedout
from magicalapi.types.base import ErrorResponse

resume_url = (
    "https://resume-resource.com/wp-content/uploads/00123-sales-professional-resume.pdf"
)
output_file_name = "resume_parser.json"


async def main():
    try:
        # the api_key will load from the .env file
        async with AsyncClient() as client:
            response = await client.resume_parser.get_resume_parser(url=resume_url)

            if isinstance(response, ErrorResponse):
                # got error from api
                print("Error :", response.message)
            else:
                # got response successfully
                print("credists :", response.usage.credits)
                # save response in json file
                with open(output_file_name, "w") as file:
                    file.write(response.model_dump_json(indent=3))

                    print(f"response saved to {output_file_name}")
    except (APIServerError, APIServerTimedout) as e:
        # handling server errors
        print(e)
    except Exception as e:
        print("An error occurred:", str(e))


asyncio.run(main())

All of the methods in the client have type hints and help to simply use.

For full examples, please see the Examples Directory

(back to top)

Contributing

Contributions are what makes the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

Here is the Contributing Guidelines. Don't forget to give the project a star! Thanks again!

(back to top)

License

Distributed under the MIT License. See LICENSE for more information.

(back to top)

Metadata

Release files for magicalapi 1.6.0

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

Source distribution (sdist)

Source distribution for magicalapi 1.6.0
File Size Uploaded Provenance
magicalapi-1.6.0.tar.gz 154.2 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 176.3 kB

Release files / magicalapi-1.6.0.tar.gz

Download URL magicalapi-1.6.0.tar.gz
Size 154.2 kB
Tags Source
SHA-256 checksum
How to use checksums
d49ab831057a0f4298ed3d8ada0fb23c33f2a574ef012f4da98db9b8cf3b149b
BLAKE2b-256 checksum
How to use checksums
31c37c4163626fee831aa0190acdfeb045324042b20370475218f65ed9aa426a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / magicalapi-1.6.0-py3-none-any.whl

Download URL magicalapi-1.6.0-py3-none-any.whl
Size 22.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d903a043484f160820fcc454e184185642bbd8c60d1e19c28558efc760be1621
BLAKE2b-256 checksum
How to use checksums
9af75d59448750626d1e9fd00f0f0d13ac3ec5b612cbae8f08b96a5f263c3a55
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for magicalapi 1.6.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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