Skip to content

ellispinsky/captchaAPI

 
 

Repository files navigation

Captcha API

A lightweight Captcha API made with Flask. This version is a new, fast and completely rewritten API, originally by Vixen, which was discontinued.

made-with-python

The API is live at PythonAnywhere (specifically, here).

Usage

Wrappers

Manual Usage

Simply make a HTTP get request to the API endpoint and treat it like a JSON.

import requests

response = requests.get('https://captchaAPI.pythonanywhere.com/api/img').json()

print(response["solution"], response["url"])

or, if you'd like a async request

import aiohttp
import asyncio

async def main():
    async with aiohttp.ClientSession() as session:
        async with session.get('https://captchaAPI.pythonanywhere.com/api/img') as responseget:
            return await responseget.json()

loop = asyncio.get_event_loop()
response = loop.run_until_complete(main())
print(response["solution"], response["url"])

For more examples check out https://captchaAPI.pythonanywhere.com/examples !

For contributing please check out CONTRIBUTING.md

Documentations

  • /api/img

Method: get

Return Type: text / json

Description: URL (CDN) of the captcha and it's solution.

Parameters

  • requests

Type: number

Default Value | Max Value: 10 | 20

Description: The number of how many times the image can be accessed before it expires.


  • /api/cdn/<key>

Method: get

Return Type: image

Description: An image (the captcha).

About

a Flask API that generates captchas

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 50.5%
  • HTML 34.2%
  • CSS 13.5%
  • Batchfile 1.8%