Graph API Version

URL /?id={url}

Represents a URL shared on a timeline or in a comment.

Refer to our News Tab Indexing API documentation for additional information.

Reading

Get fields such as AppLinks data and engagement numbers for a URLNode. Note that engagement values are intentionally not precise, but you can be confident they accurately reflect user engagement with a URL.

You are limited to 10 GET requests per URL, per app, per hour.

Requirements

TypeDescription
Access Tokens

Any access token can be used to make this request.

Features

Not applicable.

Page Tasks

Not applicable.

Permissions

Not applicable.

Example Request

GET /{version}/?id={url} HTTP/1.1
Host: graph.facebook.com

Example Response

{
  "id": "{url}"
}

Query String Parameters

Include the following query string parameters to augment the request.

ParameterDescription

access_token

Required

string

An access token.

fields

string

A comma-separated list of fields you want to request.

id

string

The url to be shared.

scopes

string

A comma-separated list of scopes.

Fields

Property Name Description Type
app_links DeprecatedAppLinks data associated with this URL, if available.AppLinks

id

The URL itself.

string

engagement

Counts of different ways people interacted with the URL Note that engagement values are intentionally not precise, but you can be confident they accurately reflect user engagement with a URL.

object

comment_count

Number of comments on the URL.

int

comment_plugin_count

Number of comments on the plugin gathered using the Comments Plugin on your site.

int

reaction_count

Number of reactions to the URL.

int

share_count

Number of times the URL was shared.

int

og_object

The Open Graph object that is canonically associated with this URL.

OGObject

id

ID of object.

string

description

The description of the object, if available.

string

title

The title of the object, if available.

string

type

The object type.

og:type

updated_time

When the object was last updated.

datetime

Example Request

Graph API Explorer
GET v11.0/?id=https://www.facebook.com?fields=engagement HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
try {
  // Returns a `Facebook\FacebookResponse` object
  $response = $fb->get(
    '?id=https://www.facebook.com?fields=engagement',
    '{access-token}'
  );
} catch(Facebook\Exceptions\FacebookResponseException $e) {
  echo 'Graph returned an error: ' . $e->getMessage();
  exit;
} catch(Facebook\Exceptions\FacebookSDKException $e) {
  echo 'Facebook SDK returned an error: ' . $e->getMessage();
  exit;
}
$graphNode = $response->getGraphNode();
/* handle the result */
/* make the API call */
FB.api(
    "?id=https://www.facebook.com",
    {
        "fields": "engagement"
    },
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
Bundle params = new Bundle();
params.putString("fields", "engagement");
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "?id=https://www.facebook.com",
    params,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
NSDictionary *params = @{
  @"fields": @"engagement",
};
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"?id=https://www.facebook.com"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];

Example Response

{
  "engagement": {
    "reaction_count": 514919172,
    "comment_count": 68687082,
    "share_count": 975739682,
    "comment_plugin_count": 1641
  },
  "id": "https://www.facebook.com"
}

Creating

You can't perform this operation on this endpoint.

Updating

Update a URL.

Requirements

TypeDescription
Access Tokens

Any access token can be used to make this request.

Features

Not applicable.

Page Tasks

Not applicable.

Permissions

Not applicable.

Example Request

POST /{version}/?id={url}&scrape=true HTTP/1.1
Host: graph.facebook.com

Example Response

{
  "success": true
}  

Query String Parameters

Include the following query string parameters to augment the request.

ParameterDescription

access_token

Required

string

An access token.

fields

string

A comma-separated list of fields you want to request.

id

Required

string

The url to be updated. The url must be encoded so that it does not interfere with the scrape parameter.

scrape

Required

boolean

Value must be true.

Example Request

POST /{version}/?id={url}&scrape=true
Host: graph.facebook.com

Example Response

{
  "success": true
}

Deleting

You can't perform this operation on this endpoint.