ByteChef LogoByteChef

One Simple API

A toolbox with all the things you need to get your project to success: Image resize and CDN, PDF and Screenshots generation, Currency Exchange and Discounts, Email Validation, QR codes, and much more!

Categories: Developer Tools

Type: oneSimpleAPI/v1


Connections

Version: 1

custom

Properties

NameLabelTypeDescriptionRequired
tokenAPI TokenSTRINGtrue

Connection Setup

Create API Token

  1. Navigate to OneSimpleApi dashboard.
  2. Click on your account icon.
  3. Click on API Tokens.
  4. Enter name of your token.
  5. Click on Create.
  6. Here you can see your API Token.
  7. Done 🚀.

Actions

Add Screenshot

Name: addScreenshot

Turn a URL into a screenshot.

Properties

NameLabelTypeDescriptionRequired
sourceSourceSTRING
Options URL, HTML
Provide either a URL to capture or raw HTML content.true
urlURLSTRINGPlace the URL you want to turn into screenshot.true
htmlHTMLSTRINGPlace the raw HTML to render.true
custom_cssCustom CSSSTRINGCustom CSS to inject into the page.false
waitWaitINTEGERTime to wait before capturing (milliseconds).false
screenScreen sizeSTRING
Options default, phone, landscape-phone, tablet, landscape-tablet, retina, 4k, 8k, custom_size
Predefined screen size or custom dimensions.false
widthWidth (px)INTEGERtrue
heightHeight (px)INTEGERtrue
backgroundTransparent backgroundBOOLEAN
Options true, false
Make the background transparent (PNG only).false
fullpageFull Page ScreenshotBOOLEAN
Options true, false
Capture the entire scrollable page.false
forceForce refreshBOOLEAN
Options true, false
Force a new screenshot even if cached.false

Example JSON Structure

{
  "label" : "Add Screenshot",
  "name" : "addScreenshot",
  "parameters" : {
    "source" : "",
    "url" : "",
    "html" : "",
    "custom_css" : "",
    "wait" : 1,
    "screen" : "",
    "width" : 1,
    "height" : 1,
    "background" : false,
    "fullpage" : false,
    "force" : false
  },
  "type" : "oneSimpleAPI/v1/addScreenshot"
}

Output

Type: OBJECT

Properties

NameTypeDescription
widthINTEGERScreenshot width.
heightINTEGERScreenshot height.
fullpageSTRINGWhether the screenshot was captured as full page.
urlSTRINGThe URL that was captured.
elapsedINTEGERThe total time taken to generate the screenshot.

Output Example

{
  "width" : 1,
  "height" : 1,
  "fullpage" : "",
  "url" : "",
  "elapsed" : 1
}

Currency Converter

Name: currencyConverter

Convert currency from one to another.

Properties

NameLabelTypeDescriptionRequired
from_currencyFrom CurrencySTRING
Options AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BRL, BSD, BTN, BWP, BYN, BZD, CAD, CDF, CHF, CLP, CNY, COP, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, FOK, GBP, GEL, GGP, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, IMP, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KID, KMF, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRU, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SOS, SRD, SSP, STN, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TVD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VES, VND, VUV, WST, XAF, XCD, XDR, XOF, XPF, YER, ZAR, ZMW
Currency from which you want to convert.true
to_currencyTo CurrencySTRING
Options AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BRL, BSD, BTN, BWP, BYN, BZD, CAD, CDF, CHF, CLP, CNY, COP, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, FOK, GBP, GEL, GGP, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, IMP, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KID, KMF, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRU, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SOS, SRD, SSP, STN, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TVD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VES, VND, VUV, WST, XAF, XCD, XDR, XOF, XPF, YER, ZAR, ZMW
Currency to which you want to convert.true
from_valueValueNUMBERValue to convert.true

Example JSON Structure

{
  "label" : "Currency Converter",
  "name" : "currencyConverter",
  "parameters" : {
    "from_currency" : "",
    "to_currency" : "",
    "from_value" : 0.0
  },
  "type" : "oneSimpleAPI/v1/currencyConverter"
}

Output

Type: OBJECT

Properties

NameTypeDescription
from_currencySTRING
from_valueSTRING
to_currencySTRING
to_valueNUMBER
to_exchange_rateSTRING

Output Example

{
  "from_currency" : "",
  "from_value" : "",
  "to_currency" : "",
  "to_value" : 0.0,
  "to_exchange_rate" : ""
}

URL Shortener

Name: urlShortener

Shorten your desired URL

Properties

NameLabelTypeDescriptionRequired
urlURLSTRINGPlace the URL you want to shortentrue

Example JSON Structure

{
  "label" : "URL Shortener",
  "name" : "urlShortener",
  "parameters" : {
    "url" : ""
  },
  "type" : "oneSimpleAPI/v1/urlShortener"
}

Output

Type: OBJECT

Properties

NameTypeDescription
urlSTRING
single_useSTRING
temporary_redirectSTRING
forward_paramsSTRING
short_urlSTRING

Output Example

{
  "url" : "",
  "single_use" : "",
  "temporary_redirect" : "",
  "forward_params" : "",
  "short_url" : ""
}

Web Page Information

Name: webInformation

Get information about a certain webpage

Properties

NameLabelTypeDescriptionRequired
urlURLSTRINGPlace the web page url you want to get info fromtrue

Example JSON Structure

{
  "label" : "Web Page Information",
  "name" : "webInformation",
  "parameters" : {
    "url" : ""
  },
  "type" : "oneSimpleAPI/v1/webInformation"
}

Output

Type: OBJECT

Properties

NameTypeDescription
generalOBJECT
Properties {STRING(title), STRING(description), STRING(canonical)}
twitterOBJECT
Properties {STRING(site), STRING(title), STRING(description)}
ogOBJECT
Properties {STRING(title), STRING(url), STRING(image), STRING(description), STRING(type)}

Output Example

{
  "general" : {
    "title" : "",
    "description" : "",
    "canonical" : ""
  },
  "twitter" : {
    "site" : "",
    "title" : "",
    "description" : ""
  },
  "og" : {
    "title" : "",
    "url" : "",
    "image" : "",
    "description" : "",
    "type" : ""
  }
}

What to do if your action is not listed here?

If this component doesn't have the action you need, you can use Custom Action to create your own. Custom Actions empower you to define HTTP requests tailored to your specific requirements, allowing for greater flexibility in integrating with external services or APIs.

To create a Custom Action, simply specify the desired HTTP method, path, and any necessary parameters. This way, you can extend the functionality of your component beyond the predefined actions, ensuring that you can meet all your integration needs effectively.

How is this guide?

Last updated on

On this page