SW/APIs 21/01/2013 às 17:37

Webservices SAPO para a academia

ZZ1800340B

Ao longo dos últimos anos o SAPO tem vindo a re-organizar os seus projectos de forma a que estes participem numa vasta arquitetura orientada a serviços. Atualmente a plataforma de SDB do SAPO disponibiliza mais de 200 webservices num total de mais de 1000 operações, com conteúdo e serviços do SAPO e de outras empresas do grupo PT, nomeadamente, PTi, MEO, e TMN.

Esta plataforma tem um catálogo disponível em services.sapo.pt no qual estão presentes entradas cujo conteúdo seja público. No entanto, existe todo conjunto adicional de webservices que poderão ser utilizados em projectos desenvolvidos no âmbito dos Labs SAPO. Estes, podem fornecer conteúdo e acesso a algumas das funcionalidades que estejam disponíveis nas nossas plataformas.

Por exemplo, se olharmos para o webservice das fotografias, poderemos efetivamente aceder ao conteúdo do projeto fotos.sapo.pt através de uma interface simplificada mas, podemos também interagir com o projeto em questão, fazendo uploads de fotografias. Adicionalmente, é possível aceder a informação como votação de fotos, número de acessos e comentários de toda a plataforma e, com isto, caracterizar por exemplo, o perfil de utilização ao longo do tempo, ou em função de algum acontecimento social.

Neste sentido, o agregado desta informação deve ser entendida no seu sentido mais amplo, quer por áreas ligadas à tecnologia, quer por áreas ligadas à sociologia, estatística, economia, marketing, matemática, línguas ou outra. Acreditamos que podem ser feitas diversas iniciativas interessantes com estas áreas do conhecimento e com o conteúdo disponibilizado por estas interfaces.

Neste artigo são elencados apenas alguns serviços que se julgam interessantes para projectos académicos, não sendo esta uma lista exustiva. Para uma visão mais global do conteúdo existente na rede SAPO, sugerimos que aceda à homepage do SAPO e visualize a lista de projectos e conteúdos (barra verde, carregar em “todo o SAPO”). Se um conteúdo existe no SAPO sob a forma de página Web, existirá sob a forma de API.

Lista de serviços e conteúdo para os Labs SAPO

    • ADSL – Exposes common methods related to SAPO ADSL coverage and support. The coverage check of ADSL service is made through the insertion of valid telephone number.
      • Checks ADSL coverage given a telephone number.

 

    • Alerts – (alertas.sapo.pt) Sapo Alerts service provides a mean for users to subscribe to events and be notified of their occurrence in the most suitable manner, such as email, sms or IM/XMPP.
      • Sets the Active status of a subscription.
      • Adds a new destination associated with an user
      • Adds a new subscription associated with an user
      • Creates a new user
      • Gets a list of all available delivery channels, such as SMTP, SMS, XMPP
      • Gets an user destination list
      • Gets an user destination list by subscription
      • Gets detailed event information, like the properties that can be filtered
      • Gets a list of all available events

 

    • Astrology -(astrologia.sapo.pt) Search of news related with astrology in Sapo Astrology
      • Get the characteristic traits of all signs.
      • Get the characteristic traits of all signs.
      • Search content related with astrology in Sapo Astrology website

 

    • Auto – (auto.sapo.pt) Search of auto vehicles in the contents of AutoSapo WebService. It is possible to search by brand or model, by the price of the vehicle, etc. You can also search using wildcards, like renau*, ou by range of data.
      • Search of all auto vehicles, by: vt – Tipo de Viatura (Automóvel, Comercial, Moto, Barco); cyd – Id da Categoria; mp – Preço mínimo; xp – Preço Máximo; my – Ano Mínimo; xy – Ano Máximo; fid – Id Combustível; did – Id Distrito; coid – Id Concelho; bid – Id Marca; mid – Id Modelo; v – Versão; mk – Kms Mínimos; xk – Kms Máximos; mhp – Cavalos Mínimo; xhp – Cavalos Máximo; trid – Id Transmissão; cid – Id Cor; ns – Número de lugares; mcc – Cilindrada Mínimo; xcc – Cilindrada Máximo; stxt – SearchText;

 

    • Blogs – (blogs.sapo.pt) Management of blogs and its contents (members, articles (posts), comments etc.) +500.000 portuguese blogs.
      • Returns a list of articles
      • Returns a list of comments
      • Search blogs posts (opensearch)

 

    • Calculator – Allows for arithmetical operations and returns results

 

    • Captcha – This service allows the generation and showing of a customizable captcha. It allows customization of font, colors and method for captcha generation. It does not provide for captcha validation. This should be done withing the application. Upon generation, an XML result will provide the application with the code and id.

 

    • Chart – Renders a image chart upon parameters. This service generates an image in PNG format as response to an URL request. The API is the same as Google Charts. The documentation can be accessed at http://code.google.com/apis/chart.

 

    • Cinema – (cinema.sapo.pt) Search movie and theater show-times by location and other filters. Fetch opening dates for upcoming movies and get in-depth information on movies, theaters, persons and other related data. About Movie elements: – Included is a Release element with information on the release in a certain country (defaults to Portugal, but can be overridden if a valid ReleaseCountryId is provided) – Includes Cinema information for BRAZIL.
      • Get the article list (recent articles first) that match any of the given tags.
      • Get the given country’s rating authority details, including the possible movie ratings
      • Get movie genres list. PageNumber defaults to 1; RecordsPerPage defaults to 0;
      • Get movie details.
      • Highlight movie of week
      • List movies with premiere data associated

 

    • Culture – Events by municipality or district, or by themes. Examples: culture – shows, national exhibitions, dance theatre, classic music, modern music, jazz/blues, cycles/festivals; museums – Gulbenkian.
      • Returns a list of categories
      • Returns a list of districts
      • Returns a list of municipalities
      • Search of most recent events
      • Search of events in municipality
      • Search of events related with themes

 

    • Comments – This API was created with the purpose of allowing to quickly add a forum or a data structure associated to an URL. Practical examples can be: add comments to a photo or adding a mini-forum to a page. This project manage +2M comments in the SAPO Portal, including News, Photos, Videos, Blogs, etc.
      • This API supports SOAP protocol.
      • Reports a comment
      • Adds an url to an interface
      • Approves a comment
      • Creates a new interface
      • Creates a new user in the plattaform
      • Removes a comment
      • Fetch a comment given its id
      • Returns a list of comments from an url
      • Returns a list of entries put by a user given a service
      • Returns a list of received entries given a user and a service
      • Return the list of urls with more comments in the last n days
      • Returns if a given URL is moderated

 

    • Dictionary – Dictionary with the definitions of Portuguese language (non spelling agreedment)
      • It returns the word of search with it gender, definitions and most used expressions
      • Will include expression where the word is used

 

    • Dictionary – Orthographic Agreement converter – Using Portuguese Spelling Agreement, converts both the European and Brazilian Portuguese

 

    • Elections – Service for Portuguese Elections. Cape Verde Elections.
      • List the STAPE allowed locations and location codes for searching results.
      • Search results for a district
      • Search results for a location using STAPE location code.
      • Search results for a municipality
      • Search results for a parish

 

    • Exchange – Returns currency exchange rates.

 

    • Fama – (fama.sapo.pt) – Articles and galleries from fama.sapo.pt
      • Get Article
      • Get Articles By Category
      • Search

 

    • Finance – The Finance service gets REUTERS content about stock, including news, graphs, quotes and company descriptions.
      • stocks charts
      • company description
      • quotes of company
      • Search of most recent news about company
      • Search of the story full content of news
      • Search of quotes of company

 

    • FlightInformation – Information about Flights [Airport departure / arrival time, Flight Number, Time, Change flight status, etc.], Airports [Destination / Departure from where Arrival / Departure flights], Cities [Destination / Departure from where Arrival / Departure flights] by ANA
      • Get aircraft type by indicated code. This code can be IATA or ICAO.
      • Gets aircraft types.
      • Get airline by indicated code. This code can be IATA ou ICAO
      • Gets airlines list with descriptions and codes
      • Get airport by indicated code. The code can be IATA or ICAO
      • Gets a list of airports codes and descriptions
      • Gets information about a flight by indicated flight code
      • Gets flight information for indicated airport and arrival ou departure (movType). It can also be indicated scheduleDateTime and/or airline

 

    • Games – SAPO games opensearch api
      • Searches the game ‘nnnn’ in Sapo Games

 

    • Gastronomy – (sabores.sapo.pt) Search a recipes, restaurants and wines database. The database also contains many gastronomy articles.
      • Returns cuisine types. For example: portuguese, indian, chinese, etc.
      • Returns recipes difficulties. For example: easy, medium, hard, etc.
      • Returns recipes ingredients. For example: chicken, salt, tomato, etc.
      • Returns source recipes. For example: Leo Gusman, Bhavesh Natavarlal, Michelle, etc.
      • Returns recipes times. For example: slow, medium, fast, etc.
      • Returns recipes types. For example: meat, fish, sweets, etc.

 

    • GeoClipping – Geographic clipping of information flowing into GIS service.
      • Adds a new word to the specified dictionary
      • Removes a word
      • Updates the specified word. Only the indicated values will be updated. The optional synonyms list will replace all

 

    • GIS – Operations related to obtaining points of interest by giving several parameters: geographical coordinates, free text, a location, a zip code, phone number, etc.
      • Returns a list of categories given a tag
      • Returns a list of categories
      • Returns a list with all the countries in the system
      • Returns the data of a district given an id
      • Returns a list of districts ordered by id
      • Returns a list of districts ordered by name
      • Returns the last registered POIs, given a category id
      • Returns the last registered POIs
      • Returns a location from a given pair of coordinates
      • Returns the data of a location data given a telephone number

 

    • Health – (saude.sapo.pt) – Search of news related with health in Sapo Health.
      • Get an Article by it’s URL
      • gets articles (xml)
      • gets articles by Category
      • Get Dossier by URL
      • Get Dossiers
      • Get details on a given emotional state
      • Get list of emotional states
      • Get list of featured articles
      • Get list of recipes of a given type
      • Get list of recipes type

 

    • Holidays – Returns a list of national, regional and municipal holidays for a given year. Supports calculation of holidays for years between 1582 and 2299.
      • Returns all holidays (national, regional and municipal) for a given year.
      • Returns Carnivals date for a given year
      • Returns Corpus Christis date for a given year
      • Returns Easters date for a given year
      • Returns GoodFridays date for a given year
      • Returns all holidays for a given year and municipality and optionally includes national holidays in results
      • Returns all municipal holidays for a given year
      • Returns all national holidays for a given year
      • Returns all regional holidays for a given year

 

    • Kids – (kids.sapo.pt) Information related to Sapo Kids’ project
      • general purpose curiosities that are to be shown on the Magellan notebook application
      • highlights that are to be shown on the Magellan notebook application
      • general purpose curiosities that are to be shown on the Magellan notebook application
      • highlights that are to be shown on the Magellan notebook application

 

    • Knowledge – (saber.sapo.pt) Allows to access information of Sapo Saber encylopedia.
      • Returns a watchlist feed (must be logged in)
      • Get basic page information such as namespace, title, last touched date, etc
      • Get titles/revisions/pageids, values are separate with pipes: info, revisions; meta – metadata to get about the site, values separated with pipes: siteinfo; title – a list of titles to work on; vprop – a list of properties to get for each revision, values are separated with pipes: timestamp, user, comment, content;format
      • Get data with content for the last revision of titles API and Main Page.
      • Get last n revisions of the Main Page
      • Searches in Sapo Knowledge database using indexed information with Solr

 

    • Leisure – Search for content related with leisure activities like concerts, expositions, fairs, festivals, literature, etc.
      • List of leisure events

 

    • Maps – (mapas.sapo.pt) Similar to Google Maps. Also used to calculate routes, searching first the point of departure and then the point of arrival, and also the type of course you want more (faster car, more short drive or short walk).
      • Returns graphics within the bounding box
      • Returns a network link layer for Google Maps from given coordinates
      • Returns the image of a map image given the coordinates according to OGC WMS specification (see http://www.opengeospatial.org/standards/wms for more details)
      • Returns an image of a map from given coordinates with markers of returned POIs from a GIS query
      • Returns an image of a map from given coordinates with the specified markers (format ::
      • Returns an image of a map from given coordinates with markers of locations in a GeoRSS endpoint
      • Returns an image of a map from given coordinates
      • Returns routing information and polyline coordinates for a route given a start and a destination coordinates, in JSON format
      • Returns routing information and polyline coordinates for a route given a start and a destination coordinates
      • Returns INE statistic details such as dimensions, division colors, etc.
      • Returns a value indicating if the given bounding box has coverage from InfoPortugal orthophotos. Possible values are: Full, Partial and None.
      • Return the current location
      • Returns the nearest POIs by the given a zoom level, latitude and longitude.
      • Requests the creation of an high resolution image of a desired map zone

 

    • Microformats – Extracts microformats from a given url and transform them in a specific format.
      • Extracts microformats from a given url and transform them in xml.
      • Extracts microformats from a given url and transform them in JSON.

 

    • MEO: EPG – Returns EPG for different channels from MEO offerts.
      • Accepts a channel sigla and two date strings in format yyyy-mm-dd hh:mm:ss and returns a list of channel programs for the period between given dates
      • Accepts a channel sigla and returns all details about that channel.
      • Returns a list of providers channels offerts
      • Accepts a list of channels siglas separated by commas and two date strings in format yyyy-mm-dd hh:mm:ss and returns a list of the channels programs for the period between given dates
      • Returns a list of providers channels offerts ordered by channel name
      • Returns a list of channels with tuner position information
      • Accepts a Meo comercialOfferId and two date strings in format yyyy-mm-dd hh:mm:ss and returns a list of channels for a specific Meo comercial offer between given dates
      • Returns Meo Commercial Offer
      • Accepts a program identifier (Id) and returns all details about that program
      • Accepts a channel sigla and two date strings in format yyyy-mm-dd hh:mm:ss and returns all details about the programs assigned to that period

 

    • MEO: Recordings – Service for managing MEO recordings.
      • Authenticates a MEO account
      • Endpoint for scheduling recordings
      • Cancels a scheduled recording
      • Obtains a list of scheduled recordings

 

    • MEO: VOD – Meo Video On Demand Catalog.
      • Gets videos of an actor
      • Get videos by category
      • Gets videos by director
      • Gets videos of a given genre
      • Get video by title
      • List actors present in VODs
      • List VOD categories

 

    • MOBILE detection – Identifies Mobile Devices, Browsers and robots by the UserAgent sent in the HTTP Request.Obtains Device properties
      • Gets a list of widely used properties for the device identified by the UserAgent
      • Gets the template associated with the mobile device.
      • Gets a specific property for the Device identified by the UserAgent
      • verifies if user agent is from a Web View in a SAPO Mobile Application (android / iPhone / …)
      • Checks if the UserAgent string represents a MobileDevice

 

    • MOBILE: MMS – MMS Mobile Gateway
      • listMMS
      • ReadMMS
      • SendMMS
      • TrackMMS

 

    • MOBILE: SMS – SMS Mobile Gateway
      • listSMS
      • ReadSMS
      • SendSMS
      • TrackSMS

 

    • News – Search of news in Sapo Noticias, Sapo Desporto, Sapo Tecnologia and Sapo Local. These news are obtained from sites of oficial media, first from available RSS feeds and then from searches inside of each media site.
      • List most recent national and international news
      • List most recent news related with Brasil
      • List most recent news related with Cabo Verde
      • List most recent news related with Angola
      • List most recent news related with Timor
      • List most recent news related with Mozambique
      • List most recent news related with technology

 

    • News: SOL – News provided by Sol newspaper

 

    • News: Economy – Search for subjects related to economy in portuguese news media and return an RSS feed.

 

    • News: Technology – Search for subjects related to technology in portuguese news media and return an RSS feed.

 

    • News: Sports – Search for subjects related to sports in portuguese news media and return an RSS feed.

 

    • Pharmacy – WebService that allows pharmacy search by a location (parish, municipality or district) or by geographical coordinates (ANF)

 

    • PHR – (meu.saude.sapo.pt) managing Sapo PHR solution

 

    • POND – Pond is a social media aggregator and publisher that allows you to follow your friends, collect information about them and share your own content in some of the most popular online social content services available. In Pond you decide what content you want to see and your friends don’t even have to use Pond. As long as you can add them as contacts in any of the services Pond supports or they provide a feed (eg., a blog RSS feed), you can add them to Pond and follow their stuff.

 

    • Photos – (fotos.sapo.pt) The SAPO Fotos 2.0 webservice API allows easier integration of third party services and applications, both internal and external, with the Fotos service. It is comprised of a growing set of methods for easy access and management of user accounts and images.
      • Returns an array of albums of a given user.
      • Adds an image to one or more albums
      • Creates an image in the Fotos platform. The image upload through the Fotos API is a two step process. First you need to call the ImageCreate method with the meta-info related to the image
      • Deletes an image
      • Edits an image’s details
      • Returns a list of images closely related to the specified image unique average color in RGB format
      • Searches the Fotos database for images related to the search terms
      • Gets a list of images marked with the given tags. It is also possible to narrow it down to a specific user, specify m18 access and the order of the list.
      • Gets all the user’s images

 

    • PunyURL – (puny.sapo.pt) Given an url, it returns two compressed url’s: One in Unicode basead on RFC3492 of PunyCode and other with alphanumeric characters in lowercase.
      • Returns the content of the element which has the same class passed in the operation’s parameter
      • Returns the list of websites in the database, which is possibile to extract the content.
      • Returns the content of an url

 

    • Scrapper – Extracts the content of a website
      • Returns the content of an url

 

    • SemanticLists – SemanticLists is a service for providing lists of words belonging to pre-determined semantic categories, as for example lists of nationalities, organizations, jobs and others. The data available by this service is only for the portuguese language.
      • Returns all the lists (category and, if available, sub-category) where the given word is included in.
      • Returns (in JSON format) the name and a brief description of all the available lists.
      • Returns, for a given list defined by its “tag” and “subtag”, all the words and its syntactic categories that are associated.
      • Returns, for a given list defined by its “tag” (this case nationalities), all the words and its syntactic categories that are associated.

 

    • Search – (pesquisa.sapo.pt) RSS OpenSearch of SAPO search given to Blogs, Notícias and Web

 

    • SimpleForum – This API was created with the purpose of allowing to quickly add a forum or a data structure associated to an URL. Practical examples can be: add commets to a photo, add a mini-forum to a page.
      • Approves a post given an id or token and a user
      • Removes an entry given an id and a user
      • Devolve uma lista das entradas associadas a um dado URL (já inicializado), iniciando numa dada posição com um dado limite. A informação é ordenada de acordo com a flag recentFirst
      • Returns a list of entries put by a user given a service
      • Returns a list of received entries given a user and a service
      • Return the list of urls with more comments in the last n days
      • Returns if a given URL is moderated (already initialized)
      • Returns the number of comments given a URL array and a type
      • Returns the number of foruns given a user and a type
      • Removes all entries given a user

 

    • Soccer – (desporto.sapo.pt) This services exposes various soccer related resources.
      • Returns all the fixtures and respective matches for a certain league/competition
      • Returns the match collection for the specified fixture.
      • Return the matches collection for the specified teamID
      • Get Competitions
      • Returns the fixtures basic info for the specified LeagueID
      • Returns the full list of all Live Matches, along with their current status
      • Lists events related to a certain Live Match
      • Returns all events containing videos for a certain Live Match
      • Returns all details and statistics available for a certain Match listed on the Calendar
      • Returns a list of soccer related photo galleries.
      • Return all articles produced on site.

 

    • Statistics INE – (mapas.sapo.pt) Powered by INE
      • Returns a list of statistic data filtered by dimensions and indicator id
      • Returns a list of themes containing indicators
      • Returns a list of indicators by its theme
      • Returns a list of indicator filtered by a query

 

    • Traffic – List information related with the current status of traffic.
      • List traffic information in Geo RSS format
      • List traffic information in JSON format

 

    • Transport – Information service of public transports and route calculation. The available information is public operators, lines, stops, paths e timetables. The route calculation is based in public transports and pedestrian.
      • Returns a route from a start to an end point and obeying to a set of filters: start or end date, mode(s) of transport, operators and a route mode
      • Returns a timetable of a specific line, starting at a specific hour.
      • Returns a list of stops given the desired operators and bounding box
      • Returns a list of stops given a list of operators
      • Gets a stop by it’s identifier.
      • Returns the list of operators
      • Returns a list of lines of a given operator
      • Returns a list of lines in a given bounding box
      • Returns a line given its identifier

 

    • Transport: Fuel Info – Returns public information about fuel and statons published in DGEG system.
      • Get stations by address
      • Get stations by fuel type
      • Get stations by municipality
      • Get stations by parish

 

    • Travel – (netviagens.sapo.pt) Search of news related with traveling in Sapo Travel.

 

    • Videos – (videos.sapo.pt) API created to allow an easy access to video different main features, such as video adding, editing and removing from the.platform. It also allows content listing using this API
      • Add a new video to the platform
      • Add video to playlist
      • Returns the information for a specific video
      • Create Playlist on user account
      • Remove a video
      • Change the data of a specific video
      • Returns the encoding parameters of the video for a certain encoding profile
      • Returns an array of encoding profiles, which can be uploaded by the user when authenticated in the webservice.

 

    • Verbetes – Verbetes is a service that answers to requests of type “WhoIs” for public personalities.
      All the information from Verbetes is collected automatically from news sources, and its information is updated on a hour basis, as new news are collected. Verbetes also answers to requests of type “WhoIs” for jobs of public personalities mentioned on news.

      • Returns a list with all the jobs with at with at least 5 occurrences
      • Returns a list with all the people that has verbetes with at least 2 occurrences.
      • Returns a list with all the personalities with verbetes, where each verbete has at least 10 occurrences.
      • search for verbetes of people which job is “Deputado Socialista” and returns an XML structure
      • search for verbetes of people whose job is “técnico” and there are at least 3 equal identified verbetes.
      • search for verbetes of people which job is “nnnnn”
      • returns a JSON structure with all the available verbetes for the person “nnnn”

 

    • Voxx – (voxx.sapo.pt) – There are numerous different news sources for Portuguese, and the amount of news published daily is astonish, making harder tasks as following topics and personalities or identifying and measuring hot topics or personalities. Voxx is a system that partially fills this gap. This system automatically extracts, identifies and classifies quotes from online news without any human interaction, organizing the information on a website available at http://voxx.sapo.pt. This system processes more than one thousand news per day, identifying about one hundred quotes (direct and indirect) every day. The Voxx web-services presented here allow a quick and structured access to this information.
      • Returns a list with the N(‘numberPersonalities’) most active personalities and the number of quotations of each one
      • Returns a list of the top personalities for a specific topic
      • Returns a list with the N(‘numberTopics’) most active topics and the number of quotations of each one in the last 7 days
      • Returns a list with the top topics from a given sender
      • Returns the latest N (‘numberQuotations’) quotations
      • Returns the latest N (‘numberQuotations’) quotations of the defined author
      • Returns the latest N (‘numberQuotations’) quotations of the defined topic
      • Returns the N latest quotes that have the tags given by the user
      • Returns a list of pairs (job/position – frequency of occurrence)
      • Returns a list of N topics between the given dates

 

  • Weather – This service allows to get information related with the weather report, current or forecast.
    • The information can be obtained in function of a specified city or district, or for all available cities.
    • This information contains data related to the maximum and minimum temperature, the wind speed and direction, visibility, etc.

Deixe um comentário

obrigatório

obrigatório

opcional