Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fotology-x

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fotology-x

Simplifies Image Searching

  • 1.2.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8
increased by166.67%
Maintainers
1
Weekly downloads
 
Created
Source

Fotology

Fotology is a simple way to get the urls of images via Google Image Search.

The api is very simple:

fotology(searchTerm, [options], callback);

To find pictures of cats:

var fotology = require("fotology");
fotology("cats", function (imageURLs) {
    for (i in imageURLs)
        console.log imageURLs[i];
});

Options

To modify behaviour, pass in an options object between the search term and callback. For example:

let options = {
    size: "large", // large images only
    language: "fr", // French
    safe: true, // force safe search on
    color: "white" // white cats only please
}
fotology("cats", options, callback);
OptionDescriptionExample value
safeSafe searchtrue
sizeImage seize"large"
languageLanguage"fr"
colorImage color"white"
limit# of Results5

safe

By default, fotology uses moderate safe search, which is what you get on Google Images by default. It will mostly use safe search unless it thinks you do not want it.

To force safe search to be on all the time, set it as true.

safe: true

To disable it, set it as false.

You cannot set safe search to moderate because it is a boolean type. The only way to use moderate safe search is by not passing it as an option, which fotology interprets as wanting moderate safe search.

size

There are 4 possible sizes:

  • small
  • medium
  • large
  • huge

For example:

size: "small"

By default, the size is not monitored for, so any size can be used.

language

This modifies the language to use when making the search. By default, it uses English.

To modify the language, please pass it in like such:

language: "fr"

for French and

language: "de"

for German.

color

By default, the images can be of any colour.

To get images of a specific colour only, please pick from and ONE OF THESE ONLY:

  • black
  • blue
  • brown
  • gray
  • green
  • orange
  • pink
  • purple
  • red
  • teal
  • white
  • yellow

Using a colour not in here will cause Google's servers to ignore you.

limit

Return between 1 and 8 result

rights

Limit search results to given license

  • cc_publicdomain
  • cc_attribute
  • cc_sharealike
  • cc_noncommercial
  • cc_nonderived

Keywords

FAQs

Package last updated on 11 Aug 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc