All Projects → dinubs → Jam Api

dinubs / Jam Api

Licence: other
Parse web pages using CSS query selectors

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Jam Api

Dictfier
Python library to convert/serialize class instances(Objects) both flat and nested into a dictionary data structure. It's very useful in converting Python Objects into JSON format
Stars: ✭ 67 (-95.13%)
Mutual labels:  api, json
Covid19
JSON time-series of coronavirus cases (confirmed, deaths and recovered) per country - updated daily
Stars: ✭ 1,177 (-14.4%)
Mutual labels:  api, json
Jokeapi
A REST API that serves uniformly and well formatted jokes in JSON, XML, YAML or plain text format that also offers a great variety of filtering methods
Stars: ✭ 71 (-94.84%)
Mutual labels:  api, json
Sirvy
🔗 Kirby Services API
Stars: ✭ 59 (-95.71%)
Mutual labels:  api, json
Pager Api
Easy API pagination for Rails
Stars: ✭ 86 (-93.75%)
Mutual labels:  api, json
Gophergameserver
🏆 Feature packed, easy-to-use game server API for Go back-ends and Javascript clients. Tutorials and examples included!
Stars: ✭ 61 (-95.56%)
Mutual labels:  api, json
Rki Covid Api
🦠🇩🇪📈 An API for the spread of covid-19 in Germany. Data from Robert-Koch-Institut.
Stars: ✭ 98 (-92.87%)
Mutual labels:  api, json
Lumen Api Starter
Quickstarter for Lumen
Stars: ✭ 54 (-96.07%)
Mutual labels:  api, json
Tortilla
Wrapping web APIs made easy.
Stars: ✭ 1,215 (-11.64%)
Mutual labels:  api, json
Mirth Transforms
Welcome to Datica's open-source repository of Mirth Transforms and supplementary resources!
Stars: ✭ 77 (-94.4%)
Mutual labels:  api, json
Http Prompt
An interactive command-line HTTP and API testing client built on top of HTTPie featuring autocomplete, syntax highlighting, and more. https://twitter.com/httpie
Stars: ✭ 8,329 (+505.75%)
Mutual labels:  api, json
Behat Api Extension
API extension for Behat, used to ease testing of JSON-based APIs
Stars: ✭ 92 (-93.31%)
Mutual labels:  api, json
Jsonapi
[Bolt Extension] JSON API for Bolt CMS
Stars: ✭ 55 (-96%)
Mutual labels:  api, json
Countries States Cities Database
🌍 World countries, states, regions, provinces, cities, towns in JSON, SQL, XML, PLIST, YAML, and CSV. All Countries, States, Cities with ISO2, ISO3, Country Code, Phone Code, Capital, Native Language, Timezones, Latitude, Longitude, Region, Subregion, Flag Emoji, and Currency. #countries #states #cities
Stars: ✭ 1,130 (-17.82%)
Mutual labels:  api, json
Easyjson
Provides an unified JSON access API, you can adapter any JSON library to Gson, Jackson, FastJson with easyjson。 提供了一个JSON门面库,就像slf4j一样。easyjson本身不做json的操作,完全依赖于底层实现库。可以直接使用Easyjson的API,底层的JSON库随时可切换。也可以使用其中某个json的API,然后通过easyjson适配给其他的json库
Stars: ✭ 54 (-96.07%)
Mutual labels:  api, json
Fipe Json
🚘 FIPE API - Listagem com preço médio de veículos: carro, moto e caminhão.
Stars: ✭ 71 (-94.84%)
Mutual labels:  api, json
Cucumber Api
API validator in BBD style with Cucumber
Stars: ✭ 50 (-96.36%)
Mutual labels:  api, json
Json Api Dart
JSON:API client for Dart/Flutter
Stars: ✭ 53 (-96.15%)
Mutual labels:  api, json
Sec Edgar Financials
Extract financial data from the SEC's EDGAR database
Stars: ✭ 73 (-94.69%)
Mutual labels:  api, json
Api Client Generator
Angular REST API client generator from Swagger YAML or JSON file with camel case settigs
Stars: ✭ 92 (-93.31%)
Mutual labels:  api, json

This project is no longer active developement, please see CoolQLCool for a similar more active project (ref)

Jam API

Jam API is a service that allows you to turn any site into a JSON accessible api using CSS selectors. To get started simply run a post request to https://www.jamapi.xyz with formdata of "url" and "json_data", here's an example of what your data should look like:

{
  "title": "title",
  "logo": ".nav-logo img",
  "paragraphs": [{ "elem": ".home-post h1", "value": "text"}],
  "links": [{"elem": ".home-post > a:first-of-type", "location": "href"}]
}

Using API you can simply generate JSON data from any website.

Code samples

nodejs

const request = require('request');
request.post('https://www.jamapi.xyz/', {form: {url: 'http://www.gavin.codes/', json_data: '{"title": "title"}'}}, function(err, response, body) {
  console.log(body);
})  

Javascript

fetch('https://www.jamapi.xyz', {
    method: 'POST',
    headers: {
      'Accept': 'application/json',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      url: 'http://www.gavin.codes/',
      json_data: '{"title": "title"}'
    })
  }).then(function(response) {
    return response.json();
  }).then(function(json) {
    document.body.innerHTML = json;
  });  

Ruby

require 'httparty'
response = HTTParty.post("https://www.jamapi.xyz/",
  :body => { "url" => "http://www.gavin.codes/", "json_data" => "{'title': 'title'}"})  
puts response.to_json

Python

import requests
payload = {'url': 'http://www.gavin.codes/', 'json_data': '{"title": "title"}'}

r = requests.post("https://www.jamapi.xyz", data=payload)
print(r.json())

curl

curl -X POST \
  -F 'url=http://www.gavin.codes/' \
  -F 'json_data={"title":"title"}' \
  https://www.jamapi.xyz

Features

Will auto pull the img src on corresponding elements, will auto pull the href from links. If passing JSON, you must provide a "elem" property, and then the element attributes you want. When you pass an array with JSON you'll get a structure that looks as follows:

[
  {
      "index": 0,
      "value": {
          "value": "Porter Robinson – Sad Machine (Cosmo’s Midnight Remix)"
      }
  },
  {
      "index": 1,
      "value": {
          "value": "Listen to Rachel Platten’s “Stand By You”"
      }
  }]

All the attributes you provide as JSON will be put inside of the value property, and the index property is to be able to track what index it ocurred in the DOM. I nested JSON values into it's own so that you can still have an "index" property returned and not run into issues.

How it works

Main power of the program is in services/html_to_json.js. Start site with node index after doing npm install.

Suggested node version is at least 4.2.2

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].